Instant LAMP Stack with Vagrant and Puppet Patrick Lee Boise Code - - PowerPoint PPT Presentation

instant lamp stack with vagrant and puppet
SMART_READER_LITE
LIVE PREVIEW

Instant LAMP Stack with Vagrant and Puppet Patrick Lee Boise Code - - PowerPoint PPT Presentation

Instant LAMP Stack with Vagrant and Puppet Patrick Lee Boise Code Camp March 16, 2013 Developer Preview @ BWT Meetup Agenda What is the problem anyway? What is Vagrant? Examples! What is Puppet? More examples!


slide-1
SLIDE 1

Instant LAMP Stack with Vagrant and Puppet

Patrick Lee Boise Code Camp March 16, 2013

Developer Preview @ BWT Meetup

slide-2
SLIDE 2

Agenda

  • What is the problem anyway?
  • What is Vagrant?
  • Examples!
  • What is Puppet?
  • More examples!
  • Simulating production architecture?
  • Even more examples!
  • Integration with Amazon EC2
  • One more example!
  • Related topics
  • Questions?
  • References
slide-3
SLIDE 3

What is the problem anyway?

Setting up a development environment is not a fun way to spend an afternoon. Options:

  • Using a remote server
  • Installing everything locally
  • Creating a virtual machine

Let's take a look at each of these...

slide-4
SLIDE 4

Using a remote server

Pros:

  • It's separate from your machine
  • No divergence of environments
  • You can rebuild your own machine at will

Cons:

  • You have to push code to it
  • You probably have to share it with others
  • It's just inefficient at best
  • What if you're out of the office?
slide-5
SLIDE 5

Installing everything locally

Pros:

  • You have complete control over it
  • Nobody else is breaking using it

Cons:

  • It's time-consuming
  • It's not easily repeatable
  • Barrier to rebuilding your machine
  • No standards among teammates
slide-6
SLIDE 6

Creating a virtual machine

Pros:

  • It keeps your own machine cleaner
  • VM's can be snapshotted
  • VM's are portable (sort of)

Cons:

  • Initial installation is time-consuming
  • Virtual machine images are big
  • There's still configuration when copying them
slide-7
SLIDE 7

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 will

Cons:

  • Expectation of increased productivity?
slide-8
SLIDE 8

What is Vagrant?

Vagrant is a tool that allows developers to...

"Create and configure lightweight, reproducible, and portable development environments."

  • Available for Linux, Mac, and Windows
  • Also available as a Ruby Gem
  • Uses Oracle's VirtualBox
  • Uses Puppet or Chef for provisioning
slide-9
SLIDE 9

Examples!

slide-10
SLIDE 10

What is Puppet?

"Puppet is IT automation software that helps system administrators manage infrastructure throughout its lifecycle, from provisioning and configuration to patch management and compliance."

  • Define all your configuration in text files
  • Apply the configuration to machines
  • Modify the configuration at will
  • Ensure that all machines are up-to-date
  • Simple yet powerful technology
slide-11
SLIDE 11

More examples!

slide-12
SLIDE 12

Simulating production architecture?

A single VM is all well and good, but we need to simulate production. No problem!

  • Create as many types of VM's as you like
  • Spin up one of each or entire clusters
  • The only limit is your hardware
slide-13
SLIDE 13

Even more examples!

slide-14
SLIDE 14

Integration with Amazon EC2

  • Yes. Several possible workflows. Here's mine...
  • 1. Define all configuration in Puppet
  • 2. Test the configuration with Vagrant
  • 3. Create EC2 instances
  • 4. Run a setup script on each instance
  • 5. Run headless Puppet on each instance

Tools are evolving rapidly, so this approach is probably already kludgy... but it works.

slide-15
SLIDE 15

One more example!

slide-16
SLIDE 16

Related topics

PuppetForge is a repository of Puppet modules provided 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 configuration management, provisioning, application deployments, auto-scaling, routing, load balancing, and more.

slide-17
SLIDE 17

Questions?

slide-18
SLIDE 18

Resources

Code: https://github.com/patrickdlee/vagrant-examples Slides: TBD (on SlideShare) Me: @patrickdlee on Twitter 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/
slide-19
SLIDE 19

Feedback?

Looking for feedback on...

  • time spent on slides vs code
  • explaining problem and options
  • introducing Vagrant
  • introducing Puppet
  • spreading examples through the talk
  • number of examples
  • complexity of examples
  • difficulty level of material
  • anything else...