⚠️ This project is no longer maintained
LAMP development box with Vagrant and Chef Solo
Sets up a LAMP dev box running Ubuntu 14.04 LTS
.
- LAMP packages installed:
- apache2
- mysql-server
- php5
- php5-cli
- php5-dev
- php5-mysql
- php-pear
- xdebug
- Other miscellaneous packages installed:
- vim
- Default Apache site enabled
- Apache modules enabled
- mod_rewrite
- mod_alias
- MySQL can be accessed from the host machine
- host: 10.10.10.2
- user: root
- password: root
- Sample
composer.json
included that contains useful QA + static analysis tools. - Xdebug installed and setup to allow remote debugging
Prerequisites
- Chef Development Kit
- Virtualbox
- Vagrant >=1.5 with the following plugins installed:
- vagrant-cachier - Caches downloads on the box (saves you bandwidth)
- vagrant-omnibus - Upgrades chef to the latest version on the box
- vagrant-berkshelf - Installs cookbooks listed in
Berksfile
- vagrant-vbguest - Upgrades VirtualBox guest additions on the box
vagrant plugin install vagrant-cachier vagrant plugin install vagrant-omnibus vagrant plugin install vagrant-berkshelf vagrant plugin install vagrant-vbguest
- Composer
Usage
Setup and provision the box:
vagrant up
Once Vagrant has done its stuff, if you navigate to http://10.10.10.2/
in a browser you should see the default Apache welcome page.
To install QA + static analysis tools (from the host):
composer install --prefer-dist
FAQ's
How can i speed up provisioning?
At the top of the Vagrantfile
there is the constant USE_PRECONFIGURED_LAMP_BOX
which is set to false
by default. If you set this to true
a preconfigured LAMP base box will be used instead of a blank ubuntu base box. You should still leave the default recipes in the run list so any config values are set accordingly but any packages that these recipes install will already be installed on the base box speeding up provisioning significantly. You can see more information about the preconfigured base box here.
Notes
I have only tested this on OS X (>=10.9). In theory it should work on most operating systems, although Windows will probably have a problem using NFS for synced folders. See NFS alternatives here.