After botching my local Homebrew development environment by following command-line output advice (I knew as I was typing chown -R that it was probably a bad idea), I decided to create a virtual instance to facilitate FG development. This way, no matter what crazy things I might decide to do on my Mac in the future, nothing would affect my ability to contribute to the project. And if (when) I screwed up my virtual environment again, I could quickly recover it. I The sequence is shown below:
- Configure vagrant and spin up the VM
- Add port forwarding
- Update/install packages
- Append host file
- Enable proxy writing
- Configure Apache
- Setup the database
- Vagrant port forwarding (host)
- Provide server admin scripts
- Install node
- Install/enable APC
- Migrate from apache to nginx (it’s actually easier to setup apache, then convert)
- Hook up a DB GUI by configuring vagrant ssh
- Configure local PhpStorm IDE
- Configure Xdebug
- Downgrade PHP (production runs an older version – this is much harder to do than it sounds)
- Install PDFlib
- Install Composer (and all other libraries)
- Add a bunch of troubleshooting
In the end, my documentation provided a template for the steps required to build a local environment programmatically using Ansible so that current and future developers have only to clone the software repo, download VirtualBox and vagrant, and vagrant up to begin coding.