Engineering

Vagrant : A new weapon in the automation artillery

It was absurd, the time, when we use to write shell scripts just to automate the installation process. Being into DevOps team, introduced me to new topics and tools for automating the process we do in a regular basis. There were scenarios, when we got stuck and tried to find new (rather say weird) ideas. Pointing one problem here, was project specific installations. I use to work over LAMP stack, but as I jumped on to DevOps it became very evident to do performance tuning as per the requirement and the usage of the application. So for that I tasted all possible flavors of Linux, along with combinations of web-servers to try out. I figured out first thing, that if you have to get in to Vertical scaling of the application, only if you find the web-server not supporting the provided infrastructure. So now, I had different kinds of Web-Servers, along with different packages/libraries installed according to the different application I had to work with. This was a cumbersome job, to install-upgrade-or-degrade packages from application to application. This whole scenario lead towards only one thing, which was virtualisation.

What is Vagrant ?

I tried different tools, softwares in the whole process and settled with Vagrant. For the readers, who doesn’t know about Vagrant, here is what Vagrant is;

“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.” 

Why Vagrant (and Puppet)!

In simple words, Vagrant can manage your VMs. Now again, coming back to the problem with which we started. So far we had resolved the problem with handling the different flavors of OS’s. Moving ahead, I always wanted to create a generic approach for the installation process, and to make it much less painful. I got my answers when I read about “Puppet” along with “Vagrant”.
 
Puppet is one of the main provisioners available to Vagrant. I will not explain the differences between Puppet and Chef here, but Google will keep you occupied for hours on the subject! From the Puppet website,

“Puppet uses its own configuration language, which was designed to be accessible to sysadmins.”

 So with the combination, the search ended with a very scalable approach towards setting up environments. The two, Vagrant and Puppet; works with a lot of ease. I tried it with different flavors of applications, with different web-servers / configuration and libraries. Surprisingly, this solved our problem to get into different dev-environments, along with multiple configurations automated with the help of Puppet. I have not put the steps of creating and setting up Vagrant over your Virtual Box, coz you will get it all over the Internet. Though, I am including all the URL’s which might help you guys, in the process;
  1. Make Vagrant Up yours
  2. Vagrant : Getting Started
  3. Development Environment the right way with Vagrant and Puppet
  4. Rapidly Building LAMP Development Environments with Vagrant

In this all learning’s, I got one amazing tool, a Web UI called PUPHPET (http://puphpet.com/), to create and customize your environment (specifically PHP) and gives you a downloadable manifest; vagrant up and you are done. It’s a short and easy way to create manifest, and automating it along with the GUI. I will cover my experience and extremities with PuPHPet in the next post. 

Standard

Leave a comment