Last Updated: February 25, 2016
·
596
· bebraw

Vagrant - Virtualization for Web Developers

If there's one tool each web developer should know, it's Vagrant. Setting up development environments isn't particularly fun. Imagine you have to resume some old project (maintenance, yay!). Can you remember how to set everything up?

Vagrant provides an excellent solution to this. You start out with a base box and then define what your box should actually contain by using provisioning. Basically this means you will describe which dependencies your environment should fulfill. The provisioner will then set it up accordingly.

After you have set up a box this way you can access it via a ssh tunnel. You can share your project directory with Vagrant virtual machine, run the project there and preview it on your host using your favorite browser and tools.

Vagrant is dead easy to use and makes these sort of scenarios way easier to handle. It is great in a team environment too. Just set it up once and share the configuration. Your team mates, on different platforms even, can use the same virtual machine for development.

Taken further the virtual machine you use to develop your project should mimic the server environment as closely as possible. One less issue to worry about. Better yet you can set up your provisioning so that it's easy for you to deploy and maintain. No need to ssh to your server manually, fiddle with it and cross your fingers anymore.