Why Vagrant?
The Problem
To understand the need for a tool like Vagrant, it is important to understand the old ways that Vagrant is trying to replace.
Before Vagrant, the preferred method for working on a application was to install and configure all the software locally on our development machine.
On the past of web development this make a lot of sense because of the few and easy steps to make software arrays like LAMP working.
This method also works well with many projects in parallel due to the easy Apache virtual hosting and MySQL database isolation.
But today, modern web applications are a lot more modular,per consequence the dependencies configuration options are bigger so the development environment installation process is a bit painful due to the software architecture complexity.
While PHP and MySQL are still very popular, they no longer clearly dominate the market, and languages and Frameworks like Angular JavaScript, Python, Ruby on Rails and Laravel for PHP are quickly becoming the dynamic languages of choice.
Quickly we see that a properly configured and installed local software array of this various combinations of new technologies that we want to use can be a nightmare.
Solution
The use of Vagrant in a real case working environment can make magic on the development work-flow. Vagrant isolate dependencies and her configurations on a virtual environment, without make developers loose her daily work tools.
Once the vagrantfile is created , we just need to vagrant up
and everything is installed and configured to work.
After this the other members of the team can create their development environments with this configuration file , so we can have all the team working on the same environments , same dependencies , and equals configurations whenever platform we have.
All of this with minimal human interaction.
"The existence of Vagrant is transparent and unimportant in the mind of the developer. Vagrant is the workhorse that creates consistent and stable development environments."
If something goes wrong or we just want to start over from a clean slate just running vagrant destroy
we will removes all traces of the development environment from our machines.Then a vagrant up
again will re-create the development in a blink.
At the end of the day, Vagrant can suspend vagrant suspend
, halt with vagrant halt
, or just like we said before, destroy the development environment, keeping the overall system clean. When ready, vagrant up will bring back a ready-to-go development environment in just a few minutes.
So why Vagrant?
In a nutshell "Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent work flow to help maximize the productivity and flexibility of you and your team."