Vagrant – Intro

Vagrant makes it possible to quickly create a virtual environment for development. It is different than cloning or snapshots in that it uses minimal base OSes and provides a provisioning mechanism to setup and configure the environment exactly the way you want for development.

Benefits:

  • All developers work in the exact same environment
  • Developers can get a new environment up in minutes
  • Developers don’t need to be experts at setting up the environment.
  • System details can be versioned and stored alongside code.

You need to create a single Vagrantfile and everything will be configured as you requested.

Vagrant is using different provides but by default VirtualBox is the free and easy to use.

We’ll use a separate work folder to keep things together.

You can download any vagrant image and keep it locally for future instantiation.

A huge list of vagrant images are available on HashiCorp’s Atlas box catalog.

The above script includes the fix for

bootstrap.ssh

If vagrant image is running you need to use

You can see the vagrant instance by browsing http://localhost:8000/

To share (you need to register to https://atlas.hashicorp.com/vagrant)

You can see it via http://delighted-jackal-2074.vagrantshare.com

To stop the VM:

or