Everything that one needs to create development environments with Vagrant and Chef.
This repo is very much a work in progress. There are many things that can be improved. Annotations were made in comment form within the example Vagrantfile, regarding room for improvement. Issues and pull-requests are encouraged.
- XDebug - PHP Debugging extension
- WebGrind - Profiling tool
- MailCatcher - Easy local mail testing
- Git
- Subversion
- LAMP (including PHP 5.4)
- Sqlite
- Composer
- Curl, TMUX, screen
These instructions are merely one way to use these tools. I'm presenting them because I feel that they're both reasonable and simple.
These are instructions for creating a development environment utilizing Vagrant for virtual-machine management and Chef for installing and configuring software.
You would install this individually into each site repo. When working on a site, you'd bring up the server. When you're done, you suspend it. I repeat. Each individual site repo has its own virtual-machine that is brought up when you're working on that specific site, and then suspended when you're done.
This should work on any Windows, OSX, or Linux box.
-
Add this repository to yours.
$ cd mysiterepo
$ git submodule add git@github.com:ShawnMcCool/vagrant-chef.git
-
Copy an example Vagrantfile
$ cp vagrant-chef/vagrant/vagrantfiles/Vagrantfile .
-
Read the Vagrant file and uncomment / modify where appropriate
-
(optional) Add this entry to hosts file
10.10.10.10 app.local
$ vagrant up
Wait until Vagrant / Chef are done, then in your browser http://app.local/ or http://10.10.10.10
You have the choice of either... Supending the application (takes a small bit more disk space). Recommended
$ vagrant suspend
or.. you can halt the box (saves like 200meg?) but requires you to start it all up again. (You don't have to rebuild the VM)
$ vagrant halt
If configurations change you can simply run:
$ vagrant reload
It will then apply your changes to the Vagrantfile or cookbooks.
$ vagrant ssh
$ cd /vagrant
$ phpunit
There is a known Mac issue with VirtualBox crashing your VMs. Here are more details and the solution.
I've made many annotations of issues in the Vagrantfile example, each could use a solution.
Trying to install this on your system and reporting back any issues that you've had with instructions listed would be a huge help.
Know a bit about Vagrant / Chef and want to complain that something could be done better? Please open an issue!
Much configuration was taken directly from https://github.com/r8/vagrant-lamp.