Skip to content

Latest commit

 

History

History
58 lines (37 loc) · 2.2 KB

File metadata and controls

58 lines (37 loc) · 2.2 KB

Vagrant Python-dev Setup

This vagrant build is aimed at making it easy to get a full Python development environment setup on your computer, regardless of what operating system you run with minimal fuss. To accomplish this, vagrant is used to control a virtual machine runner called Virtual Box, which sets up a debian based VM on your machine (Ubuntu 10.04 in this case), and provisions it with a few goodies and your choice of Python versions to make life easy.

Installing

Note: VirtualBox 4.1.x currently seems to have a nasty kernel panic issue with Lion , use the second link provided in 2.1 to install the previous version which is stable in OSX Lion.

  1. Install Vagrant: http://downloads.vagrantup.com/tags/v1.0.1
  2. Install Virtualbox (do not install this in OSX Lion): http://www.virtualbox.org/wiki/Downloads
  1. Install Virtualbox (use this in Lion): https://www.virtualbox.org/wiki/Download_Old_Builds_4_0

  2. Install the box VM used:

    $ vagrant box add lucid64 http://files.vagrantup.com/lucid64.box
    
  3. Clone the repo, edit Vagrantfile as needed, and run!:

    $ git clone git://github.com/bbangert/vagrant-pythondev.git ossdev
    $ cd ossdev
    $ vim ossdev/manifests/pythondev.pp  # Edit as needed for desired python version
    $ vagrant up
    

Using

Once its all setup, you can enter the box via:

$ vagrant ssh

By default, vagrant will mount the ossdev directory as /vagrant in the VM, so you can checkout and run code there if you need access to it from the native environment.

On OSX and linux systems, NFS generally performs better and requires the hostonly networking option, which can be added to the Vagrantfile config like so:

config.vm.network :hostonly, "192.168.20.2"
config.vm.share_folder "MOUNT_NAME", "/home/vagrant/MOUNT_DIR", "/PATH/TO/DIR/ON/HOST", :nfs => true

Then you can access all the files on your native system easily from within the VM.

More Vagrantfile configuration options: http://vagrantup.com/docs/vagrantfile.html

Feel free to file issues if these instructions don't work for you.