Here is what’s awesome about Vagrant:
- Uses Chef or Puppet to add packages to a base VM
- Easily maintain and rebuild VMs
- Pretty straightforward install process on OS X, Linux, and Windows
- Mounts your source project internally so you can work on your code in the VM
Here’s what I don’t like about Vagrant:
- SSH’ing into the VM all the time is a pain
- Creating your own box from scratch is a bit difficult
- Working in a group/team environment is left up to you to figure out
Enter: veewee. Veewee helps you build your own vagrant boxen instead of using predefined boxes that come with Vagrant. If you’re an untrusting person, as well you should be, you kinda want to build your own VM from scratch.
Combined with something like Dropbox or a local server, you can easily set up a group/team environment, build your own boxen, and then distribute them to your teammates.
Once you have your base VirtualBox boxen defined, you can skip straight to running the last step of loading the box into vagrant, of course, so this is really only necessary if you want to define your own boxen.
Here’s how I did it:
- Download and install VirtualBox
- Download and install Vagrant
- Setup Dropbox and put my Ubuntu ISOs in a shared location
- git clone email@example.com:FundingGates/fg_veewee_scripts.git
- Run fg_veewee_scripts/setup.sh
- Follow the instructions to build a box
- Note, the validation of veewee-validation nfs mount may fail; it appears to be a transient bug in VBox. It doesn’t appear NFS is at fault, so it seems you can safely ignore it.
- Place the VirtualBox boxen in Dropbox (box box box).
- Load the boxen into vagrant, run
vagrant upin your project (check in a Vagrantfile to all your projects). The end!
I created a little shell script to help share the virtual box definitions within our team. You can see how the shell script works for more information but basically I do two things:
- Pull down veewee
- Symlink /definitions and /iso into veewee from shared locations
Now that we’ve got a repeatable, sharable dev/vagrant setup, we can now work on integrating it with all of our projects!