Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team.
To achieve its magic, Vagrant stands on the shoulders of giants. Machines are provisioned on top of VirtualBox, VMware, AWS, or any other provider. Then, industry-standard provisioning tools such as shell scripts, Chef, or Puppet, can be used to automatically install and configure software on the machine.I use it with VirtualBox to quickly install and launch different virtual machines for both development and testing tasks. Some of the teams that I work with have used vagrant within their build process to facilitate test automation or to provide environment consistency in a delivery pipeline.
Its very easy to set up, and is similar for most operating systems
- Install VirtualBox
- Install Vagrant
- Navigate to where you want to install a vm
- Goto a site like http://www.vagrantbox.es/ and choose a prebuilt box
- Then do:
$ vagrant box add {title} {url} $ vagrant init {title} $ vagrant up
Once you have the box built you can use the following commands to bring up, shut down, or rebuild the box
# to start the box $ vagrant up # to stop the box $ vagrant halt # to rebuild the box $ vagrant destroy --force && vagrant up
You can then bring tools like puppet into the equation to manage installations and configurations on the box.