In late 2012 I got religion about Vagrant ( http://vagrantup.com ) after hearing about it all year.

What is Vagrant?

Using virtual machines running locally on your workstation, Vagrant lets you define the environment your application will run in and quickly iterate on both your application and its environment.

Your Vagrant environment can consist of a single VM or multiple VMs running a wide variety of operating systems listed at http://www.vagrantbox.es (most are unofficial, except those from files.vagrantup.com).

Vagrant quickstart

Vagrant operates on the file named Vagrantfile in your current working directory. Here's an example Vagrantfile that sets up an Ubuntu 12.04 (Precise Pangolin) environment:

Vagrant::Config.run do |config|
  config.vm.box     = "precise64"
  config.vm.box_url = "http://files.vagrantup.com/precise64.box"
end

Once you have Vagrant installed, you can run vagrant init to create a Vagrantfile in your current working directory. Try replacing its content with the lines above and running vagrant up. After the VM has booted try vagrant ssh and sudo to root. Then log out and run vagrant destroy.

Vagrantfile examples

To see more complicated environments, look at the Vagrantfile for these projects:

Vagrant snapshots (with Sahara)

  • vagrant sandbox on
  • vagrant sandbox commit or vagrant sandbox rollback
  • vagrant sandbox off

After installing https://github.com/jedi4ever/sahara

Vagrant base boxes

https://github.com/englishm/betterboxes/wiki


Home | About | Sitemap | Recent changes | © 2016 Philip Durbin | @philipdurbin | philipdurbin@gmail.com