appendix c: Getting started with Vagrant

 

Vagrant is an open source software product for building and running virtual machines. You can use it to simulate a production environment or test your code on various operating systems. It’s also a great way to try out new software in an environment that’s isolated from your development workstation.

Updates

You can find an updated and evolving version of this getting started guide online at http://vagrant-getting-started.the-data-wrangler.com.

Installing VirtualBox

First, you must install VirtualBox. This is the software that runs the virtual machine within your regular computer (the host). You can download it from the VirtualBox download page at https://www.virtualbox.org/wiki/Downloads.

Download and install the package that fits your host operating system. Please follow the instructions on the VirtualBox web page.

Installing Vagrant

Now you should install Vagrant. This is a scripting layer on top of VirtualBox that allows you to manage the setup of your virtual machine through code (Ruby code). You can download it from the Vagrant downloads page at https://www.vagrantup.com/downloads.html.

Download and install the package that fits your host operating system. Please follow the instructions on the Vagrant web page.

Creating a virtual machine

Installing software on your virtual machine

Running code on your virtual machine

Turning off your virtual machine