TimeOut Vagrant Environment Setup |
Before the Vagrant environments, many of the developers were working directly on their host machines. Every developer was in charge of which operating system they chose to install on their machines. This meant projects were being developed locally in a wide array of operating systems and versions inconsistent with production environments. This also made it very difficult to set up the projects from scratch as there was no set of instructions that could work universally across the board. Nor could there be local configuration files committed into the project repos that would also work across the board. This led to constant assistance being required from more experienced members of the projects to help with troubleshooting or sending you their version of configuration files and hacking them to eventually work on yours.
On average it was taking 2 days for a new person on a new machine to get the relevant projects up and running locally. This was clearly inefficient and distracting other developers from doing the work they were scheduled to do.
To solve this problem, robust virtual environments were implemented for developers to use when developing locally. Simple instructions on how to kickstart the automated setup were included in the README of the Github repository.
The environments contained ready to use LEMP (Linux Nginx Mysql & PHP) stacks similar to the production setup to aid accurate development of new features. The environment provisioning was fully automated using Ansible, Virtualbox and Vagrant. This reduced the setup time from 2 days to around 30 minutes!!!
Amongst other benefits, developers could develop features locally, compile front end assets and run unit and BDD tests in a uniform and consistent way. This enabled developers to get accurate test suite feedback before submitting pull requests to be tested in the Jenkins environment. This reduced the amount of requests in the Jenkins queue and therefore gave faster pull request feedback. Members of the QA team also benefitted by being able to setup projects locally unassisted and contribute to the automated test suites.
Technologies Used
Vagrant | Virtual Box | Ansible | |||
Selenium | Wiremock | Git | |||
Symfony 2 | MySQL | Behat | |||
PHP 5 | Memcache | PHPUnit | |||
Grunt | NPM | Phing | |||
Karma | Less | Javascript | |||
JQuery | CSS | Angular JS | |||
JSON |