Vagrant and Puppet, Part I: Getting Started

Vagrant and Puppet are two tools I use every day for work and side projects.

Vagrant provisions a virtual machine and Puppet configures packages, services, and even users on the VM.

These tools allow me to create a set of configuration files for a virtual machine, keep it in my repository, then use it to easily create the virtual machine on any computer I’m working on. This keeps my environments consistent as well as anyone working on a project with me. The configuration can even be used to create a production environment for further consistency.

Vagrant and Puppet also end the need to have web server software running locally on my machine.

There are tools out there to graphically guide you through the creation and setup of a Vagrant box, the most popular being PuPHPet, but I prefer the control and flexibility of writing the files myself. This series will guide you through this.

In order to get started you will need to download and install Vagrant and a provider for Vagrant to use.

Step 1: VirtualBox

VirtualBoxVagrant needs a provider to run the virtual machine. A provider can be VMWare, VirtualBox, or even AWS and Digital Ocean. For these tutorials we’ll be using VirtualBox.

Download and install VirtualBox for your platform. That’s it. You will not even need to start the program. You’re done with this step.

Step 2: Vagrant

Next you’ll need Vagrant itself. Download and install the version for your platform and make sure it is in your OS’ environment path.

That is all for this article. Next we will work through creating a Vagrant box.

Leave a Reply