quantopian/zipline — pull request #187 by jdricklefs (2013-07-02 02:49:49+00:00)
Title: Add a VirtualBox-based Vagrant config file.

This is a very simple change to automate the building of a Zipline development environment using Vagrant (www.vagrantup.com).

This particular configuration requires VirtualBox, though I'm sure it could be customized to work with EC2 using the other Vagrant Provider (https://github.com/mitchellh/vagrant-aws).

This VagrantFile will, on "vagrant up"...
- Create a simple, minimal Precise Pangolin (12.04) Ubuntu 64 bit VM
- Customize the VM with 2 virtual CPU's and 2048MB of RAM
- Configure SSH for passwordless access (from the command-line)
- Add the required packages from the Ubuntu repo to support zipline
- Add (and compile) ta-lib
- Add the required Pip packages

This takes ~25 minutes on my fairly beefy macbook, mostly spent in downloading packages from the Ubuntu mirrors.

When Vagrant is done, you can start hacking on zipline with a ...
- vagrant ssh
- cd /vagrant
- python {some python script that uses zipline}

In the spirit of making this a disposable dev environment, I decided to forego configuring virtualenv and instead install everything in site-packages.

"nosetests" and "examples/dual_moving_average.py" both succeed after the configuration finishes.

Let me know if you have any questions!