WordCamp DFW 2014: Development Environments in Distributed Teams Using Vagrant
When there’s a larger development project you’re typically going to split the work amongst an entire team. Most of us have probably experienced a situation when working in a distributed team where a part of the local development environment does not match the rest of the team, or worse, the production server. Often this isn’t discovered until the project is being deployed and something ends up breaking. You can avoid this by using a development tool like Vagrant.
Distributed Teams Use Vagrant
Vagrant is a virtual environment used to emulate the server conditions for your project. Vagrant works with your chosen package format (ex. VirtualBox, VMware, AWS, etc.) to create a consistent development environment for distributed projects. This way the same server environment is being used across different systems, by different users, in different locations.
Vagrant’s name stems from this idea of the portability of a development environment. You could walk the earth with your laptop and still have the same environment available for your project.
There are three key advantages to using Vagrant for your development. The tool is lightweight, results are easily reproducible, and it’s very portable.
Vagrant is Lightweight
Because it’s lightweight, the technical requirements to run Vagrant are small. This means you can leverage a variety of machines to run the environment, minimally powered laptops, high-end desktops, and a variety of configurations in-between.
Vagrant is Reproducible
Vagrant is easy to set up and can be configured and ready in under an hour. The best part is that the development tools synchronize between any developer using that platform regardless of their operating system. You no longer have to leverage different development tools if you’re on a PC, Mac, or Linux.
Vagrant is Portable
Vagrant can run on a variety of platforms while maintaining the same results. Whether you’re on a Mac, PC, or a Linux box, the environment behaves consistently.
Easy to Use
Vagrant is a command-line tool. You run a basic initialization to start and it downloads and configures everything you need to get started. Then you start it up and it’s running. At this point, you don’t have any WordPress tools available to you, but you have started a server emulation locally. You then want to login to the server and begin development. When you finish development stop the server and regain your computer’s resources.
Once you have the server installed you’ll want to provision your server. You can use a variety of provisioning languages to install the services and directories you need. As new requirements are needed for your project, you can add them to the provisioning scripts for your environment. Share these scripts in a version control system so that all of your team members have access to the required tools and utilities.
There are some great pre-built installs to get users up to speed on using WordPress with Vagrants without having to build their own scripts. If you have any questions about Vagrant, or setting up a workflow for your development please reach out to us.