What is Vagrant?
Article to summarize Vagrant, a tool for creating complete development environments based on virtual machines, independent of platform and suitable for any technology development.
In this article, we will talk about a tool that certainly concerns us all developers and even more to those who work on open technologies and client/server architectures, such as the web.
It is known Vagrant, a tool that lets you create any development environment based on virtual machines. Provides an easy interface to create perfectly configured and independent of the server operating system developer. But this can be done quickly and eliminates any configuration needed by developers, who can focus on what really matters, which is to improve the productivity of your work.
Vagrant is an open source project, compatible with any operating system and all development team should use, to make life easier for both developers and project managers.
Problems of development environments
Generally, each developer on a project developed locally. Each is responsible for installing all these software packages on your machine and upgrade versions, configure libraries, etc. They are not unusual situations how are you:
- Something that works for you does not work for other
- Someone added a new library or changed configuration software did not document
- Other software on the machine from one of the developers is causing problems in installing the project
- Something that works locally does not work on remote
- Enter a new developer in the project and have to waste time explaining how to install the environment
This problem is compounded when you are working with multiple developers and various tools (languages, databases, libraries …) and also their versions. In general it tends to generate a large range of configurations present in each of the development environments of each of the team members. As the project grows and more and more dependencies, this often lead to major problems.
Then there is the usual problem that some developers working on Windows and Mac and then others on the production server are on Linux. When it is interesting to have a development environment as close as possible to the environment where the application will run in production.
Solution:Â visualization
The solution is for all components of the development team working on the same environment, configured in the same manner and with the same “ingredients” to be taken into the production server. All this can be achieved by visualizing a machine on the computers of the components of the development team. Each has its own virtual machine and place on it.Among all can share the status of the machine, so that the configurations of one of the developers replicate visualizations other.
That idea seems a little complicated if you do not have a tool like Vagrant, as you would play pretty much do everything from scratch with VirtualBox or other visualization software, and set it all step by step. You should create the machine, install the operating system from scratch, configure the network, putting on programs or libraries you need, etc.
You require to have a lot more knowledge of systems, to perform configurations and visualization software being used to organize shared folders and stuff. In addition, it would solve the problem of synchronization of the machine with all developers team, and the need for long waits to provision development environments when they change.
Vagrant above is a software that allows us to solve all these problems by creating a simple interface and independent visualization system configuration that each use, as VirtualBox, VMware, Parallels, etc.
You can find more information Vagrant on the project page. https://www.vagrantup.com/
You can make the idea Vagrant is like a layer of your visualization software, which offers functionality designed to create virtual machines for development. These machines can be configured through a text file and share with the rest of the team the same file for everyone to create virtual machines exactly like yours.
Tools that facilitate working with Vagrant
As Vagrant is a layer above VirtualBox or VMWare, above Vagrant also find other tools or layers that make an entire ecosystem that can provide us much life.
A benchmark is PuPHPet, a website that has a kind of wizard that lets you create machines with different characteristics, distributions of Linux, servers, firewall, languages, libraries, etc. Once the wizard finishes you just have to download the configuration file so that when you create the machine with Vagrant, you configure it as you have entered in the wizard.
I mean,you can understand PuPHPet as the ideal complement to Vagrant if you’re not a sysadmin, allowing us to create machines with perfectly configured environments fully automatically, without having to deal us with the configuration of elements such as web servers, languages as PHP, NodeJS, Ruby, etc., database engines, etc. with its settings.
On their website, you can find more information. https://puphpet.com/
Conclusion
It’s a great way to manage your development environments an independent and detail, which allows save tens of problems that you have faced hundreds of times. Vagrant is one of those tools that sure in a short space of time will figure prominently in any development team place.