LAMP Stacks Made Easy with Vagrant & Puppet
Recently one of our web developers came to ops and asked, “How can I quickly model a PHP application I am working on without having to bother you for a VM?” I said, “Sure, we can do that,” and so we worked to get him what he needed and on his way.
Later, as I thought about it some more, I pondered this request from a service perspective and wondered what it would be like if I were in a developer’s shoes — that is, having to ask for an environment to do my work. I came to the conclusion that this the whole process is quite cumbersome. Luckily it does not have to be! With tools like Puppet and Vagrant, any developer should just be able to do what they do best — “git clone ...” — and be off to the races with their code.
So here you are: LAMP stacks made easy with Vagrant and Puppet.
Using this code, any developer, or anyone for that matter, can quickly launch a LAMP Stack environment in minutes to get them going on what matters most: the application.
All you have to do is:
1. Install Virtualbox & Vagrant
2. Install your favorite Vagrant Box. For example:
vagrant box add precise32 http://files.vagrantup.com/precise32.box
3. git clone https://github.com/jrodriguezjr/puppet-lamp-stack.git
4. mkdir webroot
5. vagrant up
Done! Off to the races.
Now all you have to do as a developer is:
1. Log in to your new vagrant box
2. Create your mysql database
3. Drop your code into the webroot locally
It’s that easy. Happy coding!