Vagrant for frontend development

As a frontend developer you’ll often have to set up working environments for the websites you’re working on. It’s not too hard to set up a MAMP stack of Apache,  PHP , MySQL etc on a machine, but sometimes you’ll have different requirements for different projects. For instance one website might require PHP 5.6 on nginx and another 5.3 on Apache.

You could try setting up configurable environments and switch between them, but are you 100% sure that the environment you’re running is identical to the production server it will need to run on when you’ve finished?

What you need is a way of your team to easily create and work on a specifically configured environment that is identical, quick and easy. That’s where vagrant comes in.

Vagrant is a tool for building and managing virtual machine environments in a single workflow. With an easy-to-use workflow and focus on automation, Vagrant lowers development environment setup time, increases production parity, and makes the “works on my machine” excuse a relic of the past.

Who benefits?

  • Developers
    Vagrant will isolate dependencies and their configuration within a single disposable, consistent environment, without sacrificing any of the tools you are used to working with (editors, browsers, debuggers, etc.)
  • DevOps
    Vagrant gives you a disposable environment and consistent workflow for developing and testing infrastructure management scripts. You can quickly test things like shell scripts, Chef cookbooks, Puppet modules, and more using local virtualization such as VirtualBox or VMware.
  • Designers
    Vagrant will automatically set everything up that is required for that web app in order for you to focus on doing what you do best: design.