One Vagrant to rule them all

Have you ever been in a situation when an application works perfectly fine on your computer, but it is crashing very often on main production server? Even though you tried to recreate exactly the same environment on your computer or somebody wanted to test some new experimental feature on environment that was working exactly like production server? There is a simple solution to have unified environment for everybody, no matter if it’s a developer, project manager or non-technical person. It is called Vagrant.

But what Vagrant exactly is? Vagrant is a micro Virtual Machines based on ready to use recipes. More advanced users say that having working recipe is the solution to our problem and adding more layers like additional operating system that is running on virtual machine can cause more problems. But they are forgetting about other important things.

What kind of problems we want to solve? Mainly we want to avoid problems that may occur on a production server and not on a developer’s machine itself. At our company we are mainly using MacBooks to develop new code for our fantastic applications. MacBooks are running on Mac OS X operating system, which is a Unix-like OS. But our main servers are set up using Linux machines, that are also Unix-like OS. Both systems are similar, on in both we can find similar problems, but solving them can be quite a challenge, because of the difference between them.

Recently I found myself in a situation when my project needed reconfiguration of the whole environment in order to use additional, essential library and its dependencies. It shouldn’t be a problem at all and also main developers knew it, but the solution was very poorly documented. Funny thing, everything was working as a charm on a staging server.

And what is the easiest and the fastest solution we can use in that situation? Vagrant is the answer. With Vagrant you can use the very same type of Linux image on a production server as well as on staging. Thanks to our unified solutions I could use our default Vagrant settings file and start my own environment that is working exactly the same as staging one.

So OS level is also very important and adding it is not a complication but a solution. Of course this is another part of software which can fail, but until now the effort put on fixing problems with Vagrant was significantly smaller then trying to match local environments with external.

One Vagrant to rule them all

Leave a Reply

Your email address will not be published. Required fields are marked *