Home  →  Articles  →  Vagrant: Software development collaboration & deployment heaven
Vagrant: Software development collaboration & deployment heaven

Vagrant: Software development collaboration & deployment heaven

Sep. 10, 2014 by Rein Petersen

Many developers have been swallowed up in the hype of Docker which has promised (and delivered) a single environment from machine to machine where applications just work like their supposed to.

And the hype is more than just talk - VC's have funded the company to the tune of multiple millions and have given it a stellar valuation of 400 million dollars - extremely high considering they haven't worked out how they will monetize their success. Hype aside, Docker works by virtualizing a software environment that can be moved from developers machines to production so that all dependencies are bundled with the software being developed. This takes the pain out of collaborative development, testing and deployment - an expensive affair.

But, as my friend good Phillip has noted, Docker is virtualization run amok. Especially if you run solutions in the cloud, you are already running a virtual private server - now add docker and you've added another layer of virtualization. Imagine for a moment, you have (perhaps) a Red Hat cloud server (Digital Ocean or Amazon EC2?) configured to allow virtual private servers that can run whatever (linux) O/S desired (maybe it is CoreOS). Now, add Docker, with yet another O/S and application stack (your application environment that could be Ubuntu) and the result is you have Red Hat virtualizaing CoreOS, virtualizing Ubuntu. Even with the advances of sandboxing in Linux it should clear to even the lay-person that this excess of virtualization can only slow things down.

There is a better way that will make developers *and* the server admins of any organization so very happy. A portable way to pass environments from machine to machine (during development, testing and staging) that can match the native environment set down by production server admins. It is a way to create and configure lightweight, reproducible, and portable development environments so that the tired excuse "it works on my machine" is never heard again.

That way is Vagrant (vagrantup.com) and it allows developers to match a target environment and share their code and environment with other developers, testers and whoever needs to evaluate or run the software without having the troubles of ensuring the environment and dependencies that can support the application are already installed and configured correctly on their machine.

How it works is like this: the developer installs Vagrant on their local development machine. Afterwards they configure the Vagrant environment to match the production environment and all dependencies - these environments are basically scripts that can be shared or distributed by production teams. They code and test locally and when they're ready, pass it on to colleagues or stakeholders or qa who can run the application in the same environment and produce the same results. Once the app is ready, it is deployed (without the need for vagrant) to the production system with specific environment for which the application was developed - no server virtualization required.

Vagrant has long run atop windows but since version 1.6, it also allows developers to create full-fledged Windows development environments - it's not just for LAMP stacks (Linux/Apache/MySql/Php) anymore. If your projects are developed by teams of developers and need to be reviewed and quality assessed by other individuals then finally deployed to strictly guarded production servers, it's time to seriously look into Vagrant as a tool that will increase productivty by making collaboration, testing and deployment a breeze.

Rein Petersen is a software engineer and architect with over 20 years of professional experience. Rein is also the Managing Partner for Excel Softsources' Peru office

Download 'The Excel Advantage'
Get a Quick Quote

Jr. Mid Sr.
Java Developer ▶
.Net Developer ▶
Web Developer ▶
Mobile Developer ▶
QA Developer ▶
PHP Developer ▶