This is a lamp/lemp development machine.
- Vagrant (It's recommended to install directly from official page)
- Ansible (It's recommended to install directly from official page)
- NFS (It's installed by default in Mac, in Linux, you should install a package named
To bring up a simple VM (Virtual Machine) that can be used for PHP development, run the next commands inside the root folder:
sudo ansible-galaxy install -r provisioning/requirements.yml --force vagrant plugin install vagrant-hostsupdater
Go to the VM root folder and copy
config.ymlfile, follow the instructions into the file and edit as necessary.
Be careful with this point, specifically with the synced folder settings, this settings is critical for the proper operation of the VM, With this setting you can specify the folder in your local machine that will contain the sites to sync with the VM.
Once you've built everything it is possible that your machine runs the most recent version of PHP in the cli, no matter what you wrote in the config.yml, so if you want the cli to be the same, you'll have to do it manually for example, if you want to have the cli running PHP 5.6, then you could do so by running:
vagrant ssh sudo update-alternatives --set php /usr/bin/php5.6
If you need to provision again (or have edited config.yml to add sites/databases/hosts), run:
To connect via ssh to the vm:
To restart the VM:
To import databases we have a specialized script to make your life better, just follow the instructions bellow:
- Go to your synced folder
- Copy your database dump there (synced folder path)
- Go to your VM root path
- And just follow the instructions given by the script.
This VM is shipped with apachesolr, two webservers (apache and nginx), xdebug and some other undocumented stuff.
In order to create a database or add a site, edit config.yml and re-run
This machine uses NFS file sharing in order to share a folder that will have the sites (/www). If you have an encrypted home folder, NFS will most likely make your computer kaboom and the earth explode.
And there is no workaround for that. As per:
Therefore, it is advised to clone this repository in an unencrypted folder or if you're using Full Disk Encryption, you're ok.
To create a core, edit config.yml and re-run
Solr core will be accessible at
By default this is the shipped configuration:
- nginx: port 80
- apache: port 81
- varnish: port 82 using nginx as backend
You can change those settings in config.yml file and run
vagrant provision to apply your changes.
Some configurations are managed by variables. You can find and change them in
Right now this is deploying an Ubuntu Trusty (14.04) VM.
This config creates a VM with this software:
- apache (2.4)
- drush (cloning from 8.x branch)
- Some other stuff