instant lamp stack with vagrant and puppet
out of 22
Post on 05-Dec-2014
Embed Size (px)
DESCRIPTIONDo you enjoy installing and configuring Apache, PHP, and MySQL every time you reinstall your OS or switch to a new machine? Neither do I. And we never have to do it again. Vagrant can use the VirtualBox API and configuration defined in Puppet to spin up a development VM in a couple of minutes. And it's really easy to do. I'll start with the simplest possible example and work up to a cluster of VM's. Feel free to bring your laptop and follow along.
- 1. Instant LAMP Stack with Vagrant and Puppet Patrick Lee Boise Code Camp March 16, 2013
- 2. ResourcesCode: https://github.com/patrickdlee/vagrant-examples *Slides: http://www.slideshare.net/patrickdleeMe: @patrickdlee on Twitter Patrick.Lee@bodybuilding.com* Use the vagrant1.1 branch.
- 3. Who am I? Former high school teacher (5 years) Recovering software developer (10 years) Brand new release engineer (one week) Organizer of Boise Web Tech Meetup (4 years) Incurable techie (38 years and counting)I have worked at Bodybuilding.com for 4-1/2 years.Yes, we are hiring. Talk to me if youre interested.
- 4. AssumptionsI am assuming that you are familiar with the followingor at least know of them... VirtualBox Linux Apache / PHP / MySQL Software configuration Cloud computingBut if not, Ill explain them briefly so dont worry.
- 5. A brief analogyRemember the days before source control?What did you do? Zip files named by date?Do you miss doing that?Heres the analogy...Vagrant : manual env setup :: Zip files : SCM
- 6. Agenda What is the problem anyway? What is Vagrant? Examples! What is Puppet? More examples! Simulating production architecture? Even more examples! Integration with Amazon AWS One more example! Related topics Questions? Links
- 7. What is the problem anyway?Setting up a development environment is not afun way to spend an afternoon.Options: Using a remote server Installing everything locally Creating a virtual machineLets take a look at each of these...
- 8. Using a remote serverPros: Its separate from your machine No divergence of environments on team You can rebuild your own machine at willCons: You have to push code to it You probably have to share it with others Its just inefficient at best What if youre out of the office?
- 9. Installing everything locallyPros: You have complete control over it Nobody else is breaking using itCons: Its time-consuming and error-prone Its not easily repeatable Barrier to rebuilding your machine No standards among teammates
- 10. Creating a virtual machinePros: It keeps your own machine cleaner VMs can be snapshotted VMs are (mostly) portableCons: Initial installation is time-consuming Virtual machine images are big Theres still configuration when copying them
- 11. Enter Vagrant!Pros: Can be run entirely on your machine Defines all configuration externally Consistent, repeatable, and reliable Can standardize environments for your team Keeps your own machine cleaner You can rebuild your own machine at willCons: Expectation of increased productivity?
- 12. What is Vagrant?Vagrant is a tool that allows developers to..."Create and configure lightweight, reproducible, andportable development environments." Created by Mitchell Hashimoto Open source and on GitHub Available for Linux, Mac, and Windows Uses Oracles VirtualBox Uses Puppet or Chef for provisioning
- 13. Examples!
- 14. What is Puppet?"Puppet is IT automation software that helps systemadministrators manage infrastructure throughout itslifecycle, from provisioning and configuration to patchmanagement and compliance." Define all your configuration in text files Apply the configuration to your machines Modify the configuration at any time Ensure that all machines are up-to-date Straightforward, yet powerful technology
- 15. More examples!
- 16. Simulating production architecture?A single VM is all well and good, but we needto simulate production.No problem! Create as many types of VMs as you like Spin up one of each or entire clusters The only limit is your hardware
- 17. Even more examples!
- 18. Integration with Amazon AWSVagrant 1.1 (released 3/14) supports multipleproviders... VirtualBox (the default) Amazon AWS Rackspace Cloud VMWare ...and more to come. You can even add your own.
- 19. One more example!
- 20. Related topicsPuppetForge is a repository of Puppet modulesprovided by the community.rspec-puppet is a tool for testing Puppet modules.Chef is another option for provisioning with Vagrant.AWS OpsWorks is a new service for configurationmanagement, provisioning, application deployments,auto-scaling, routing, load balancing, and more.
- 21. Questions?
- 22. Links http://www.vagrantup.com/ https://puppetlabs.com/ http://forge.puppetlabs.com/ http://rspec-puppet.com/ http://www.opscode.com/chef/ https://aws.amazon.com/opsworks/
View more >