WTF is it?
Vagrant is an interesting tool I have been using for years. It allows you to quickly spin up a VMs for performing experiments. Fundamentally it’s used for the management of your development environments in VMs.
- Ensures all developers on your team are running a development environment which are the same as a remote production box. Stop developers saying “it works on my machine”.
- Provides a VM playground so you can spin up a box play around with it the destroy it after.
- Use it to practice deployment automation.
- Ship a Vagrantfile with your source and deployment scripts so you can build a production like environment with your code.
Install Virtualbox for your platform
Install vagrant for your platform
In my code directory I to run the following command
This creates a boilerplate Vagrantfile.
Set your VM distro
change config.vm.box = “base” in your Vagrantfile to config.vm.box = “
You can browse and download boxes here.
I’m using ubuntu/xenial64 so mine looks like this config.vm.box = “ubuntu/xenial64”
Start the VM
Stop the VM
Access the VM
Reload VM after making changes to Vagrantfile
In my next post about vagrant I’ll create a simple tutorial on how to provisioning your VM in vagrant.