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:
- Install Virtualbox & Vagrant
- Install your favorite Vagrant Box. For example:
vagrant box add precise32 http://files.vagrantup.com/precise32.box
- git clone https://github.com/jrodriguezjr/puppet-lamp-stack.git
- mkdir webroot
- vagrant up
Done! Off to the races.
Now all you have to do as a developer is:
- Log in to your new vagrant box
- Create your mysql database
- Drop your code into the webroot locally
It’s that easy. Happy coding!