SlideShare a Scribd company logo
1 of 29
Puppetized Application Stacks
with GCE
 Dan Bode| Puppet Labs
 dan@puppetlabs.com
What is a resource ?




                               http://www.sharepointblog.co.uk/tag/bamasterclass/


  # puppetconf   # puppetize                            @ puppetlabs
Puppet Resources
 Simple way to describe the configuration state of
 individual elements of the system being managed.


 user { ‘dan’:
     ensure => present,
     shell          => ‘/bin/bash’,
 }



     # puppetconf                     # puppetize   @ puppetlabs
Puppet Resources


 user { ‘dan’:                               # a user named dan
     ensure => present,                      # should exist
     shell          => ‘/bin/bash’,          # with this shell
 }




     # puppetconf                     # puppetize                @ puppetlabs
Puppet Resources


package { ‘apache2’: # a package named apache2
    ensure => present, # should be installed
}




     # puppetconf         # puppetize          @ puppetlabs
Puppet DSL and Resources




                             http://dustrucshin.deviantart.com/art/Lego-Rainbow-170415743


# puppetconf   # puppetize                                  @ puppetlabs
Puppet DSL and Resources


The Puppet DSL can be used to compose collections of
simple resources into classes or defined resources.




  # puppetconf         # puppetize         @ puppetlabs
Common Pattern:
     Package, File, Service
class webserver {
  package { ‘apache2’:
    ensure => present,
  }
  file { ‘/etc/apache2/apache2.conf’:
    content => template(‘apache2/apache2.erb’),
    require => Package[‘apache2’],
  }
  service { ‘apache2’:
    ensure => running
    subscribe => File[‘/etc/apache2/apache2.conf’]
  }
}

 # puppetconf          # puppetize           @ puppetlabs
Package, File, Service
Now we can build webservers with:


 node my_node {
     include webserver
 }




      # puppetconf       # puppetize   @ puppetlabs
Text is Awesome




                                  http://cwd.co.uk/asciimoo/view/29


# puppetconf        # puppetize                     @ puppetlabs
Text is awesome

 •    Integrates with version control

 •    Easy to share and collaborate on

 •    Easy to re-use.




 # puppetconf            # puppetize     @ puppetlabs
Resources redefined:

Anything whose state can be managed on our system
can be expressed as a resource.




   # puppetconf        # puppetize        @ puppetlabs
Puppet Devices
Resource can now describe objects on other
systems.




 # puppetconf       # puppetize        @ puppetlabs
Google Compute Engine

 Express stacks as:

 •VM Instances
 •Networks
 •Firewalls
 •Disks

 # puppetconf         # puppetize   @ puppetlabs
GCE objects as resources?

 •    All GCE objects have state (they can exist, not
      exist)

 •    GCE objects can be managed remotely using
      the Puppet Device Pattern




 # puppetconf            # puppetize           @ puppetlabs
gce_disk { ‘dansdisk’:
    ensure          => present,
    size_gb         => '2',
}




     # puppetconf             # puppetize   @ puppetlabs
gce_network { ‘dansnetwork’:
    ensure          => present,
    gateway         => '10.0.1.1',
    range           => '10.0.1.0/24’,
}




     # puppetconf              # puppetize   @ puppetlabs
gce_instance { ‘dansinstance’:
    ensure               => present,

    zone                 => 'us-central1-a',
    machine          => 'n1-standard-1',

    image                => 'projects/google/images/ubuntu-12-04-v20120621',
    description => “I’m gonna be a database (as soon as I figure out how)!”,

    tag                  => ’danstag’,
}




          # puppetconf                     # puppetize            @ puppetlabs
New Pattern for stacks:
Network, Firewall, Instance
 Class app_stack {
   gce_network { ‘appnet’:
     ensure => present,
     range => '10.0.1.0/24’,
   }
  gce_firewall { ‘webhttp’:
     ensure => present,
     allowed => 'tcp:80’,
     network => ‘appnet’,
   }
   gce_instance { ‘server1’:
     ensure => present,
     network => ‘appnet’
   }
}

      # puppetconf             # puppetize   @ puppetlabs
We don’t really want
compute resources, we want
applications that consume
those resources.


  # puppetconf   # puppetize   @ puppetlabs
Step 1. Get content from the
forge.

gce_instance { ‘dansinstance’:
    ensure => present,
    …
    modules => [‘puppetlabs-mysql’, ‘saz-memcached’]
}




        # puppetconf       # puppetize         @ puppetlabs
forge.puppetlabs.com
 Over 500 modules!!!!
                                      I get all of
                                      my content
                                       from the
                                         forge




                                       http://for.some.reason.i.ma.de/this


 # puppetconf           # puppetize                                @ puppetlabs
Step 2. Classify the
instances using forge
content
  gce_instance { ‘mysql-server’:
     ensure => present,
     ….
     modules => [‘martasd-mysql’],
     classes => {‘mediawiki' => {
       'server_name'   => '$gce_external_ip’
     },
   }



  # puppetconf         # puppetize             @ puppetlabs
Why is this awesome




                     http://activerain.com/image_store/uploads/5/1/1/2/5/ar118906407752115.jpg


# puppetconf      # puppetize                                      @ puppetlabs
Puppet is a proper
composition language


 •    Easy to organize complicated stacks.

 •    Supports higher level interfaces.

 •    Better than copy and paste configuration.




 # puppetconf            # puppetize          @ puppetlabs
Resources support noop

 •    Possible to see if your description matches the
      current stack.




 # puppetconf            # puppetize           @ puppetlabs
Writable configuration
language
  • People already know how to compose
        complex configurations with Puppet




   # puppetconf           # puppetize        @ puppetlabs
Thank You
Dan Bode | Puppet Labs
dan@puppetlabs.com
Google compute presentation puppet conf

More Related Content

What's hot

Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteBram Vogelaar
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Łukasz Proszek
 
From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011Carlos Sanchez
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Carlos Sanchez
 
神に近づくx/net/context (Finding God with x/net/context)
神に近づくx/net/context (Finding God with x/net/context)神に近づくx/net/context (Finding God with x/net/context)
神に近づくx/net/context (Finding God with x/net/context)guregu
 
Creating Reusable Puppet Profiles
Creating Reusable Puppet ProfilesCreating Reusable Puppet Profiles
Creating Reusable Puppet ProfilesBram Vogelaar
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOpsAgile Spain
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012Carlos Sanchez
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Puppet
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)Soshi Nemoto
 
Why Task Queues - ComoRichWeb
Why Task Queues - ComoRichWebWhy Task Queues - ComoRichWeb
Why Task Queues - ComoRichWebBryan Helmig
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统yiditushe
 
Javascript is your (Auto)mate
Javascript is your (Auto)mateJavascript is your (Auto)mate
Javascript is your (Auto)mateCodemotion
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with AnsibleIvan Serdyuk
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)Soshi Nemoto
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionJoshua Thijssen
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Soshi Nemoto
 
Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2nottings
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)Wesley Beary
 

What's hot (20)

Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
 
Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.Take control of your Jenkins jobs via job DSL.
Take control of your Jenkins jobs via job DSL.
 
From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011From Dev to DevOps - Apache Barcamp Spain 2011
From Dev to DevOps - Apache Barcamp Spain 2011
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
神に近づくx/net/context (Finding God with x/net/context)
神に近づくx/net/context (Finding God with x/net/context)神に近づくx/net/context (Finding God with x/net/context)
神に近づくx/net/context (Finding God with x/net/context)
 
Creating Reusable Puppet Profiles
Creating Reusable Puppet ProfilesCreating Reusable Puppet Profiles
Creating Reusable Puppet Profiles
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
 
From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012From Dev to DevOps - FOSDEM 2012
From Dev to DevOps - FOSDEM 2012
 
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
Beaker: Automated, Cloud-Based Acceptance Testing - PuppetConf 2014
 
Puppet fundamentals
Puppet fundamentalsPuppet fundamentals
Puppet fundamentals
 
DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)DevOps(3) : Ansible - (MOSG)
DevOps(3) : Ansible - (MOSG)
 
Why Task Queues - ComoRichWeb
Why Task Queues - ComoRichWebWhy Task Queues - ComoRichWeb
Why Task Queues - ComoRichWeb
 
Facebook的缓存系统
Facebook的缓存系统Facebook的缓存系统
Facebook的缓存系统
 
Javascript is your (Auto)mate
Javascript is your (Auto)mateJavascript is your (Auto)mate
Javascript is your (Auto)mate
 
Getting started with Ansible
Getting started with AnsibleGetting started with Ansible
Getting started with Ansible
 
Preparation study of_docker - (MOSG)
Preparation study of_docker  - (MOSG)Preparation study of_docker  - (MOSG)
Preparation study of_docker - (MOSG)
 
Puppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 EditionPuppet for dummies - ZendCon 2011 Edition
Puppet for dummies - ZendCon 2011 Edition
 
Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)Fabric workshop(1) - (MOSG)
Fabric workshop(1) - (MOSG)
 
Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2Puppet camp chicago-automated_testing2
Puppet camp chicago-automated_testing2
 
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
fog or: How I Learned to Stop Worrying and Love the Cloud (OpenStack Edition)
 

Similar to Google compute presentation puppet conf

Greenfield Puppet: Getting it right from the start
Greenfield Puppet: Getting it right from the startGreenfield Puppet: Getting it right from the start
Greenfield Puppet: Getting it right from the startDavid Danzilio
 
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...Puppet
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012Carlos Sanchez
 
Toplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkToplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkPatrick LaRoche
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Carlos Sanchez
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStackPuppet
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackke4qqq
 
Puppet and CloudStack
Puppet and CloudStackPuppet and CloudStack
Puppet and CloudStackke4qqq
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpresoke4qqq
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetAchieve Internet
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetWalter Heck
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetOlinData
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013grim_radical
 
Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringAlessandro Franceschi
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet CampPuppet
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStackBram Vogelaar
 
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...Carlos Sanchez
 
Stanford Hackathon - Puppet Modules
Stanford Hackathon - Puppet ModulesStanford Hackathon - Puppet Modules
Stanford Hackathon - Puppet ModulesPuppet
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with PuppetAlessandro Franceschi
 

Similar to Google compute presentation puppet conf (20)

Greenfield Puppet: Getting it right from the start
Greenfield Puppet: Getting it right from the startGreenfield Puppet: Getting it right from the start
Greenfield Puppet: Getting it right from the start
 
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
Puppet Camp Boston 2014: Greenfield Puppet: Getting it right from the start (...
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
Toplog candy elves - HOCM Talk
Toplog candy elves - HOCM TalkToplog candy elves - HOCM Talk
Toplog candy elves - HOCM Talk
 
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
Continuous Delivery with Maven, Puppet and Tomcat - ApacheCon NA 2013
 
Puppet and Apache CloudStack
Puppet and Apache CloudStackPuppet and Apache CloudStack
Puppet and Apache CloudStack
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
 
Puppet and CloudStack
Puppet and CloudStackPuppet and CloudStack
Puppet and CloudStack
 
Puppetpreso
PuppetpresoPuppetpreso
Puppetpreso
 
Puppet - an introduction
Puppet - an introductionPuppet - an introduction
Puppet - an introduction
 
Harmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and PuppetHarmonious Development: Via Vagrant and Puppet
Harmonious Development: Via Vagrant and Puppet
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoring
 
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Campmodern module development - Ken Barber 2012 Edinburgh Puppet Camp
modern module development - Ken Barber 2012 Edinburgh Puppet Camp
 
Puppet and the HashiStack
Puppet and the HashiStackPuppet and the HashiStack
Puppet and the HashiStack
 
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
Infrastructure testing with Jenkins, Puppet and Vagrant - Agile Testing Days ...
 
Stanford Hackathon - Puppet Modules
Stanford Hackathon - Puppet ModulesStanford Hackathon - Puppet Modules
Stanford Hackathon - Puppet Modules
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with Puppet
 

More from bodepd

Openstack havana
Openstack havanaOpenstack havana
Openstack havanabodepd
 
Puppet as data_chicago
Puppet as data_chicagoPuppet as data_chicago
Puppet as data_chicagobodepd
 
Puppet: Orchestration framework?
Puppet: Orchestration framework?Puppet: Orchestration framework?
Puppet: Orchestration framework?bodepd
 
Cloud building talk
Cloud building talkCloud building talk
Cloud building talkbodepd
 
Cloudstack talk
Cloudstack talkCloudstack talk
Cloudstack talkbodepd
 
Openstack grizzley puppet_talk
Openstack grizzley puppet_talkOpenstack grizzley puppet_talk
Openstack grizzley puppet_talkbodepd
 
Hacking puppet
Hacking puppetHacking puppet
Hacking puppetbodepd
 
Openstack presentation
Openstack presentationOpenstack presentation
Openstack presentationbodepd
 

More from bodepd (8)

Openstack havana
Openstack havanaOpenstack havana
Openstack havana
 
Puppet as data_chicago
Puppet as data_chicagoPuppet as data_chicago
Puppet as data_chicago
 
Puppet: Orchestration framework?
Puppet: Orchestration framework?Puppet: Orchestration framework?
Puppet: Orchestration framework?
 
Cloud building talk
Cloud building talkCloud building talk
Cloud building talk
 
Cloudstack talk
Cloudstack talkCloudstack talk
Cloudstack talk
 
Openstack grizzley puppet_talk
Openstack grizzley puppet_talkOpenstack grizzley puppet_talk
Openstack grizzley puppet_talk
 
Hacking puppet
Hacking puppetHacking puppet
Hacking puppet
 
Openstack presentation
Openstack presentationOpenstack presentation
Openstack presentation
 

Google compute presentation puppet conf

  • 1. Puppetized Application Stacks with GCE Dan Bode| Puppet Labs dan@puppetlabs.com
  • 2. What is a resource ? http://www.sharepointblog.co.uk/tag/bamasterclass/ # puppetconf # puppetize @ puppetlabs
  • 3. Puppet Resources Simple way to describe the configuration state of individual elements of the system being managed. user { ‘dan’: ensure => present, shell => ‘/bin/bash’, } # puppetconf # puppetize @ puppetlabs
  • 4. Puppet Resources user { ‘dan’: # a user named dan ensure => present, # should exist shell => ‘/bin/bash’, # with this shell } # puppetconf # puppetize @ puppetlabs
  • 5. Puppet Resources package { ‘apache2’: # a package named apache2 ensure => present, # should be installed } # puppetconf # puppetize @ puppetlabs
  • 6. Puppet DSL and Resources http://dustrucshin.deviantart.com/art/Lego-Rainbow-170415743 # puppetconf # puppetize @ puppetlabs
  • 7. Puppet DSL and Resources The Puppet DSL can be used to compose collections of simple resources into classes or defined resources. # puppetconf # puppetize @ puppetlabs
  • 8. Common Pattern: Package, File, Service class webserver { package { ‘apache2’: ensure => present, } file { ‘/etc/apache2/apache2.conf’: content => template(‘apache2/apache2.erb’), require => Package[‘apache2’], } service { ‘apache2’: ensure => running subscribe => File[‘/etc/apache2/apache2.conf’] } } # puppetconf # puppetize @ puppetlabs
  • 9. Package, File, Service Now we can build webservers with: node my_node { include webserver } # puppetconf # puppetize @ puppetlabs
  • 10. Text is Awesome http://cwd.co.uk/asciimoo/view/29 # puppetconf # puppetize @ puppetlabs
  • 11. Text is awesome • Integrates with version control • Easy to share and collaborate on • Easy to re-use. # puppetconf # puppetize @ puppetlabs
  • 12. Resources redefined: Anything whose state can be managed on our system can be expressed as a resource. # puppetconf # puppetize @ puppetlabs
  • 13. Puppet Devices Resource can now describe objects on other systems. # puppetconf # puppetize @ puppetlabs
  • 14. Google Compute Engine Express stacks as: •VM Instances •Networks •Firewalls •Disks # puppetconf # puppetize @ puppetlabs
  • 15. GCE objects as resources? • All GCE objects have state (they can exist, not exist) • GCE objects can be managed remotely using the Puppet Device Pattern # puppetconf # puppetize @ puppetlabs
  • 16. gce_disk { ‘dansdisk’: ensure => present, size_gb => '2', } # puppetconf # puppetize @ puppetlabs
  • 17. gce_network { ‘dansnetwork’: ensure => present, gateway => '10.0.1.1', range => '10.0.1.0/24’, } # puppetconf # puppetize @ puppetlabs
  • 18. gce_instance { ‘dansinstance’: ensure => present, zone => 'us-central1-a', machine => 'n1-standard-1', image => 'projects/google/images/ubuntu-12-04-v20120621', description => “I’m gonna be a database (as soon as I figure out how)!”, tag => ’danstag’, } # puppetconf # puppetize @ puppetlabs
  • 19. New Pattern for stacks: Network, Firewall, Instance Class app_stack { gce_network { ‘appnet’: ensure => present, range => '10.0.1.0/24’, } gce_firewall { ‘webhttp’: ensure => present, allowed => 'tcp:80’, network => ‘appnet’, } gce_instance { ‘server1’: ensure => present, network => ‘appnet’ } } # puppetconf # puppetize @ puppetlabs
  • 20. We don’t really want compute resources, we want applications that consume those resources. # puppetconf # puppetize @ puppetlabs
  • 21. Step 1. Get content from the forge. gce_instance { ‘dansinstance’: ensure => present, … modules => [‘puppetlabs-mysql’, ‘saz-memcached’] } # puppetconf # puppetize @ puppetlabs
  • 22. forge.puppetlabs.com Over 500 modules!!!! I get all of my content from the forge http://for.some.reason.i.ma.de/this # puppetconf # puppetize @ puppetlabs
  • 23. Step 2. Classify the instances using forge content gce_instance { ‘mysql-server’: ensure => present, …. modules => [‘martasd-mysql’], classes => {‘mediawiki' => { 'server_name' => '$gce_external_ip’ }, } # puppetconf # puppetize @ puppetlabs
  • 24. Why is this awesome http://activerain.com/image_store/uploads/5/1/1/2/5/ar118906407752115.jpg # puppetconf # puppetize @ puppetlabs
  • 25. Puppet is a proper composition language • Easy to organize complicated stacks. • Supports higher level interfaces. • Better than copy and paste configuration. # puppetconf # puppetize @ puppetlabs
  • 26. Resources support noop • Possible to see if your description matches the current stack. # puppetconf # puppetize @ puppetlabs
  • 27. Writable configuration language • People already know how to compose complex configurations with Puppet # puppetconf # puppetize @ puppetlabs
  • 28. Thank You Dan Bode | Puppet Labs dan@puppetlabs.com