Some thoughts on Vagrant

Vagrant is great, because it makes it easy to share 100% identical development enviroments, and in general makes everything really consistent for your workflow with VM's. It is also great to have a streamlined way to manage VM's with provision of software and configuration.

I needed a Python 3 dev enviroment on the new Ubuntu 14.04 distro, as i really like this combination for Python development, so i made a small Vagrant setup for this:
https://github.com/adionditsak/vagrant-python-env

All you need to do, to download the distro, and to provision it with apt-get update, python (3) utils, pip, ipython and virtualenv is to run this one-liner:
$ curl -L https://raw.githubusercontent.com/adionditsak/vagrant-python-env/master/init.sh | bash

This will create a directory with the Vagrant setup called "vagrant-python-env", download the Vagrantfile and the provision.sh file, start the VM, and provision it. Then you can login to the VM, if your path is in the new vagrant-python-env dir, with $ vagrant ssh.

I think that is pretty neat.

For bigger setups i would provision the box with Puppet, but for small stripped enviroments like this, i think shell is perfect.

Give it a hour or two, and i am sure you will not use anything else for your local VM's in the future.

There is a lot of options with provisioning, networking, synced data, and others. Take a look at the docs.

Some standard URL's for boxes: http://www.vagrantbox.es/.

Explore on Github for other peoples Vagrant boxes. I have found a lot of useful ones myself, within categories like various CMS, Webservers (Apache, nginx, lighttpd, etc.) various frameworks (eg. Django, Ruby on Rails), API's (wrappers and backends), caching (all kind of caching, eg. Varnish), various databases, messaging, optimization.

Do you use Vagrant? What do you appreciate about this software?

comments powered by Disqus