Writing a Vagrant configuration file
Before we discuss how to write the Vagrant configuration file, it is important to mention a few artifacts of Vagrant.
The important elements of Vagrant are the following:
- The Vagrant binary (CLI): We learned how to download and install this in the previous section, Installing Vagrant.
- The base image of the VM, called Vagrant Boxes, will be used and mentioned in the configuration file. This image can be either public, that is, published in the Vagrant cloud, or local on the machine.
- The configuration file defines the composition of our VM that we want to create locally.
Now that we have looked at the different elements of Vagrant, we are going to write the configuration file of our VM. To begin, we are going to check which base machine we are going to use.
Using Vagrant Cloud for Vagrant Boxes
To use basic Vagrant images, HashiCorp has set up a portal that allows you to publish and publicly share images of VMs that...