As developers, we must work quickly and efficiently on websites to get them ready for our clients. To do that, each of us keeps a copy of the whole project on our own computer, and we coordinate with each other using git. This makes it much more efficient to work on a site at the same time as other developers.
Unfortunately, it also takes the site off the web server where it will eventually live (the production server). This may not sound like a major issue, but there can be multiple idiosyncrasies between server environments. It is important to make sure you build and test on a server that accurately depicts your production server. To facilitate that, we run Virtual Machines using Vagrant and VirtualBox.
A Virtual Machine is a setup for your computer that emulates an additional computer system with a different configuration. Essentially, you can run a completely separate Operating System (OS) and software behind the scenes on your computer. This is important for our work, since most of our sites are hosted on a Linux OS, but most of us are working in Mac or Windows environments.
What’s more, we can make sure we are always running the same versions of software such as PHP and MySQL as our production servers. This helps prevent any unexpected bugs when we go live because all the development took place in a matching system.
We use VirtualBox and Vagrant to manage our Virtual Machines. VirtualBox is a program that loads and runs the virtual machines; Vagrant is a program that helps developers organize, reuse, and distribute them. This is helpful because when we make an update to one of our environments, Vagrant can help us make sure that we are up to date across the board.
Additionally, Vagrant can help us quickly get involved with a new environment without having to spend time setting it up ourselves. It also allows us to share development environments with others including new employees, freelancers, and clients.
This ability to easily and quickly duplicate a server environment is invaluable to developers working as a team. Matching your development environment to your production environment is key to ensuring there are no unwanted surprises on launch day.
Want to learn more, or need help with Vagrant? Contact us today!