Vagrant has been successfully used by web developers worldwide for years now. It helps simplifying configuration, unify LAMP configuration per project and avoid sysadmin hurdle in order to configure LAMP stack.
Despite these great advantages in team environment however, in my professional career I saw developer who preferred other ways of LAPM or MAMP or WAMP management. That alternative (the old school) setup was causing ongoing issues in team environments that required (lots of) time to resolve. Some developers still have fears of diving into the vagrant, Virtualbox, ansible and related technologies, avoiding it. However the Vagrant box setup is super simple these days – with the beetboxvm.
Check out the opensource beetboxvm project on GitHub – it allows single file download and run the `vagrant up` command to get your environment ready out of the box, fast. At the time of writing this article, you only need to download the Vagrant file and place it in your web root. The rest will be configured for you – powerful LAMP, including mail proxy mailhog.
The advantages of the beetboxvm project versus other Vagrant boxes
- You only add config to your project and don’t need to manage a fork of the whole provisioning system.
- It uses a pre-provisioned base box so it’s much faster to provision.
- Each new version of the box gets published to Atlas only if all roles are provisioned making the box always stable.
- With linked clones each VM is a small clone of a single master.
- You can reuse the same provisioning system for a CI environment.
- Minimal host machine dependencies.
- Automated hosts file management
- Easy PHP version switching
How to add Vagrant box (beetbox) to your project
- Assuming you have composer installed, execute `composer require –dev beet/box`
- run `vagrant up` in terminal – whether you use MacOS, Windows or Linux
- The final screen will show you how to access your project in browser, mysql configuration and mailhog access details
- Ensure the dot folders create by the beetbox are excluded from your version control.
Enjoy your developer’s life!
Advanced config? Not an issue
Need nodejs or phpcs? It is all there, just enable it by updating the .beetbox/config.yml file