SlideShare une entreprise Scribd logo
1  sur  46
Télécharger pour lire hors ligne
Puppet:
      Orchestration Framework?

Tuesday, February 26, 13
Dan Bode
           dan@puppetlabs
     bodepd on <twitter,freenode>



Tuesday, February 26, 13
Puppet




Tuesday, February 26, 13
ensures
                  consistency...
                                 Puppet
                                 Master




          DB1              DB2   Tomcat1   Tomcat2




Tuesday, February 26, 13
With Resources




Tuesday, February 26, 13
Describe the configuration state of elements

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




Tuesday, February 26, 13
user { ‘dan’:          # a user named dan
      ...




Tuesday, February 26, 13
user { ‘dan’:          # a user named dan
     ensure => present,    # should exist
     ...




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




Tuesday, February 26, 13
Properties

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




Tuesday, February 26, 13
Implementing
                 Properties

                             retrieve current state

                           converge to desired state




Tuesday, February 26, 13
Puppet’s
                            Model


Tuesday, February 26, 13
dpkg-query --search git
                           current   desired   package { ‘git’:
                                                 ensure => present
rpm -q git
                            state     state    }




Tuesday, February 26, 13
Idempotent
dpkg-query --search git
                           current          desired    package { ‘git’:
                                                         ensure => present
rpm -q git
                            state            state     }




                             absent   ==?    present




Tuesday, February 26, 13
Events
dpkg-query --search git
                                  current                  desired       package { ‘git’:
                                                                           ensure => present
rpm -q git
                                   state                    state        }




                                           absent   ==?     present




                     apt-get install git                                        transition

                     yum install git
                                                    Sync              Event     absent -> present




Tuesday, February 26, 13
Noop
dpkg-query --search git
                           current          desired       package { ‘git’:
                                                            ensure => present
rpm -q git
                            state            state        }




                             absent   ==?    present




                                                                 potential transition
                                                       Event     absent -> present




Tuesday, February 26, 13
Puppet DSL and
             Resources




Tuesday, February 26, 13
Puppet DSL

    Composes collections of resources.




Tuesday, February 26, 13
Package/File/Service
    class webserver {
      package { ‘apache2’: ... }
      file { ‘/etc/apache2/apache2.conf’:
        ...
        require => Package[‘apache2’],
      }
      service { ‘apache2’:
        ...
        subscribe => File[‘/etc/apache2/apache2.conf’]
      }
    }



Tuesday, February 26, 13
configure a node

    include webserver




Tuesday, February 26, 13
Catalogs

                             Package




                               File


                                      (refresh)


                              Service



Tuesday, February 26, 13
Text is awesome




Tuesday, February 26, 13
Text is awesome
             Integrates with version control

             Easy to share/collaborate




Tuesday, February 26, 13
Application stacks




Tuesday, February 26, 13
ensure
                     consistency?
                           Puppet




                             IaaS
                           Endpoint


Tuesday, February 26, 13
With Resources?




Tuesday, February 26, 13
GCE example
             Express stacks as:

             * VM Instances

             * Networks

             * Firewalls

             * Disks




Tuesday, February 26, 13
GCE as resources?




Tuesday, February 26, 13
class app_stack {
  ...




Tuesday, February 26, 13
class app_stack {
    gce_network { ‘dansnetwork’:
      ensure    => present,
      gateway    => '10.0.1.1',
      range      => '10.0.1.0/24’,
    } ->
  ...




Tuesday, February 26, 13
class app_stack {
    gce_network { ‘dansnetwork’:
      ensure      => present,
      gateway     => '10.0.1.1',
      range       => '10.0.1.0/24’,
    } ->
    gce_firewall { ‘webhttp’:
      ensure => present,
      allowed => 'tcp:80’,
      network => ‘appnet’,
    } ->
  ...




Tuesday, February 26, 13
class app_stack {
    gce_network { ‘dansnetwork’:
      ensure      => present,
      gateway     => '10.0.1.1',
      range       => '10.0.1.0/24’,
    } ->
    gce_firewall { ‘webhttp’:
      ensure => present,
      allowed => 'tcp:80’,
      network => ‘appnet’,
    } ->
    gce_instance { ‘server1’:
      ensure => present,
      network => ‘appnet’
    }
  }

Tuesday, February 26, 13
infrastructure only

   exists to be consumed


Tuesday, February 26, 13
Puppet assigns roles



Tuesday, February 26, 13
Step 1: distribute
                  content
            gce_instance { ‘dansinstance’:
              ensure => present,
              …
              modules =>
               [‘mysql’, ‘memcached’]
            }


Tuesday, February 26, 13
forge.puppetlabs.com

                           I get all of
                           my content
                            from the
                              forge!




Tuesday, February 26, 13
Step 2: classify

            gce_instance { ‘dansinstance’:
              ensure => present,
              …
               classes => {
                 ‘mysql’ => {bind_address => 0.0.0.0}
               },
            }


Tuesday, February 26, 13
Awesomeness




Tuesday, February 26, 13
Composable
                             Standard
                           Configuration
                             Language

Tuesday, February 26, 13
Idempotency



Tuesday, February 26, 13
Noop



Tuesday, February 26, 13
Limitations/
                            unknowns



Tuesday, February 26, 13
Parallel processing
          of Catalogs
                                       VLAN


                                   DB1    DB1

                           VM1   VM2   VM2 ...   VMN


                                         LB




Tuesday, February 26, 13
Proxy Nodes
                      (credential
                     management)

Tuesday, February 26, 13
Application Stacks
                are
            Persistent


Tuesday, February 26, 13
Master vs.
                           Masterless?



Tuesday, February 26, 13

Contenu connexe

Tendances

Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Trevor Roberts Jr.
 
Create guaranteed restore point
Create guaranteed restore pointCreate guaranteed restore point
Create guaranteed restore pointViaggio Italia
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeperSaurav Haloi
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationMydbops
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterI Goo Lee
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxNeoClova
 
Tungsten University: Replicate Between MySQL And Oracle
Tungsten University: Replicate Between MySQL And OracleTungsten University: Replicate Between MySQL And Oracle
Tungsten University: Replicate Between MySQL And OracleContinuent
 
Reactive Microservices with JRuby and Docker
Reactive Microservices with JRuby and DockerReactive Microservices with JRuby and Docker
Reactive Microservices with JRuby and DockerJohn Scattergood
 
Xtrabackup工具使用简介 - 20110427
Xtrabackup工具使用简介 - 20110427Xtrabackup工具使用简介 - 20110427
Xtrabackup工具使用简介 - 20110427Jinrong Ye
 
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Continuent
 
MariaDB and Cassandra Interoperability
MariaDB and Cassandra InteroperabilityMariaDB and Cassandra Interoperability
MariaDB and Cassandra InteroperabilityColin Charles
 
MySQL replication & cluster
MySQL replication & clusterMySQL replication & cluster
MySQL replication & clusterelliando dias
 
Percona XtraDB 集群文档
Percona XtraDB 集群文档Percona XtraDB 集群文档
Percona XtraDB 集群文档YUCHENG HU
 
Setup & Operate Tungsten Replicator
Setup & Operate Tungsten ReplicatorSetup & Operate Tungsten Replicator
Setup & Operate Tungsten ReplicatorContinuent
 
Fatkulin presentation
Fatkulin presentationFatkulin presentation
Fatkulin presentationEnkitec
 
Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...
Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...
Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...Continuent
 
Jafka guide
Jafka guideJafka guide
Jafka guideAdy Liu
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuningelliando dias
 
Backup automation in KAKAO
Backup automation in KAKAO Backup automation in KAKAO
Backup automation in KAKAO I Goo Lee
 

Tendances (20)

Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013
 
Create guaranteed restore point
Create guaranteed restore pointCreate guaranteed restore point
Create guaranteed restore point
 
Rac nonrac clone
Rac nonrac cloneRac nonrac clone
Rac nonrac clone
 
Introduction to Apache ZooKeeper
Introduction to Apache ZooKeeperIntroduction to Apache ZooKeeper
Introduction to Apache ZooKeeper
 
Percona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL AdministrationPercona Toolkit for Effective MySQL Administration
Percona Toolkit for Effective MySQL Administration
 
Introduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB ClusterIntroduction to MySQL InnoDB Cluster
Introduction to MySQL InnoDB Cluster
 
MySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptxMySQL8.0_performance_schema.pptx
MySQL8.0_performance_schema.pptx
 
Tungsten University: Replicate Between MySQL And Oracle
Tungsten University: Replicate Between MySQL And OracleTungsten University: Replicate Between MySQL And Oracle
Tungsten University: Replicate Between MySQL And Oracle
 
Reactive Microservices with JRuby and Docker
Reactive Microservices with JRuby and DockerReactive Microservices with JRuby and Docker
Reactive Microservices with JRuby and Docker
 
Xtrabackup工具使用简介 - 20110427
Xtrabackup工具使用简介 - 20110427Xtrabackup工具使用简介 - 20110427
Xtrabackup工具使用简介 - 20110427
 
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
 
MariaDB and Cassandra Interoperability
MariaDB and Cassandra InteroperabilityMariaDB and Cassandra Interoperability
MariaDB and Cassandra Interoperability
 
MySQL replication & cluster
MySQL replication & clusterMySQL replication & cluster
MySQL replication & cluster
 
Percona XtraDB 集群文档
Percona XtraDB 集群文档Percona XtraDB 集群文档
Percona XtraDB 集群文档
 
Setup & Operate Tungsten Replicator
Setup & Operate Tungsten ReplicatorSetup & Operate Tungsten Replicator
Setup & Operate Tungsten Replicator
 
Fatkulin presentation
Fatkulin presentationFatkulin presentation
Fatkulin presentation
 
Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...
Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...
Tungsten University: MySQL Multi-Master Operations Made Simple With Tungsten ...
 
Jafka guide
Jafka guideJafka guide
Jafka guide
 
PostgreSQL Performance Tuning
PostgreSQL Performance TuningPostgreSQL Performance Tuning
PostgreSQL Performance Tuning
 
Backup automation in KAKAO
Backup automation in KAKAO Backup automation in KAKAO
Backup automation in KAKAO
 

Similaire à Puppet: Orchestration framework?

Automatic Configuration of Your Cloud with Puppet
Automatic Configuration of Your Cloud with PuppetAutomatic Configuration of Your Cloud with Puppet
Automatic Configuration of Your Cloud with PuppetPuppet
 
Cloud building talk
Cloud building talkCloud building talk
Cloud building talkbodepd
 
When Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of TorqueboxWhen Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of Torqueboxrockyjaiswal
 
Socal piggies-app-deploy
Socal piggies-app-deploySocal piggies-app-deploy
Socal piggies-app-deployjtimberman
 
Cloudstack talk
Cloudstack talkCloudstack talk
Cloudstack talkbodepd
 
Rabbitmq Boot System
Rabbitmq Boot SystemRabbitmq Boot System
Rabbitmq Boot SystemAlvaro Videla
 
Apachecon cassandra transport
Apachecon cassandra transportApachecon cassandra transport
Apachecon cassandra transportzznate
 
Ruby Programming Introduction
Ruby Programming IntroductionRuby Programming Introduction
Ruby Programming IntroductionAnthony Brown
 
David Cramer: Building to scale
David Cramer: Building to scaleDavid Cramer: Building to scale
David Cramer: Building to scaleit-people
 
Openstack grizzley puppet_talk
Openstack grizzley puppet_talkOpenstack grizzley puppet_talk
Openstack grizzley puppet_talkbodepd
 
Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deploymentzeeg
 
Modules and the Puppet Forge
Modules and the Puppet ForgeModules and the Puppet Forge
Modules and the Puppet ForgePuppet
 
Learning the command line
Learning the command lineLearning the command line
Learning the command lineAdrian Cardenas
 
Testing Drupal with Ghosts and Gherkin
Testing Drupal  with Ghosts and GherkinTesting Drupal  with Ghosts and Gherkin
Testing Drupal with Ghosts and GherkinPhase2
 
Debian Loves Haskell
Debian Loves HaskellDebian Loves Haskell
Debian Loves HaskellKiwamu Okabe
 
Lunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraLunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraMarc Seeger
 
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...Puppet
 

Similaire à Puppet: Orchestration framework? (20)

Automatic Configuration of Your Cloud with Puppet
Automatic Configuration of Your Cloud with PuppetAutomatic Configuration of Your Cloud with Puppet
Automatic Configuration of Your Cloud with Puppet
 
Cloud building talk
Cloud building talkCloud building talk
Cloud building talk
 
When Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of TorqueboxWhen Ruby Meets Java - The Power of Torquebox
When Ruby Meets Java - The Power of Torquebox
 
Socal piggies-app-deploy
Socal piggies-app-deploySocal piggies-app-deploy
Socal piggies-app-deploy
 
Cloudstack talk
Cloudstack talkCloudstack talk
Cloudstack talk
 
Rabbitmq Boot System
Rabbitmq Boot SystemRabbitmq Boot System
Rabbitmq Boot System
 
Apachecon cassandra transport
Apachecon cassandra transportApachecon cassandra transport
Apachecon cassandra transport
 
Ruby Programming Introduction
Ruby Programming IntroductionRuby Programming Introduction
Ruby Programming Introduction
 
David Cramer: Building to scale
David Cramer: Building to scaleDavid Cramer: Building to scale
David Cramer: Building to scale
 
Openstack grizzley puppet_talk
Openstack grizzley puppet_talkOpenstack grizzley puppet_talk
Openstack grizzley puppet_talk
 
Practicing Continuous Deployment
Practicing Continuous DeploymentPracticing Continuous Deployment
Practicing Continuous Deployment
 
Modules and the Puppet Forge
Modules and the Puppet ForgeModules and the Puppet Forge
Modules and the Puppet Forge
 
Grails 2.0 Update
Grails 2.0 UpdateGrails 2.0 Update
Grails 2.0 Update
 
MySQL Sandbox 3
MySQL Sandbox 3MySQL Sandbox 3
MySQL Sandbox 3
 
Dtalk shell
Dtalk shellDtalk shell
Dtalk shell
 
Learning the command line
Learning the command lineLearning the command line
Learning the command line
 
Testing Drupal with Ghosts and Gherkin
Testing Drupal  with Ghosts and GherkinTesting Drupal  with Ghosts and Gherkin
Testing Drupal with Ghosts and Gherkin
 
Debian Loves Haskell
Debian Loves HaskellDebian Loves Haskell
Debian Loves Haskell
 
Lunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and CapybaraLunch and learn: Cucumber and Capybara
Lunch and learn: Cucumber and Capybara
 
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
PuppetConf 2016: Deconfiguration Management: Making Puppet Clean Up Its Own M...
 

Puppet: Orchestration framework?

  • 1. Puppet: Orchestration Framework? Tuesday, February 26, 13
  • 2. Dan Bode dan@puppetlabs bodepd on <twitter,freenode> Tuesday, February 26, 13
  • 4. ensures consistency... Puppet Master DB1 DB2 Tomcat1 Tomcat2 Tuesday, February 26, 13
  • 6. Describe the configuration state of elements user { ‘dan’: ensure => present, shell => ‘/bin/bash’, } Tuesday, February 26, 13
  • 7. user { ‘dan’: # a user named dan ... Tuesday, February 26, 13
  • 8. user { ‘dan’: # a user named dan ensure => present, # should exist ... Tuesday, February 26, 13
  • 9. user { ‘dan’: # a user named dan ensure => present, # should exist shell => ‘/bin/bash’, # with this shell } Tuesday, February 26, 13
  • 10. Properties user { ‘dan’: ensure => present, # existence shell => ‘/bin/bash’, # shell } Tuesday, February 26, 13
  • 11. Implementing Properties retrieve current state converge to desired state Tuesday, February 26, 13
  • 12. Puppet’s Model Tuesday, February 26, 13
  • 13. dpkg-query --search git current desired package { ‘git’: ensure => present rpm -q git state state } Tuesday, February 26, 13
  • 14. Idempotent dpkg-query --search git current desired package { ‘git’: ensure => present rpm -q git state state } absent ==? present Tuesday, February 26, 13
  • 15. Events dpkg-query --search git current desired package { ‘git’: ensure => present rpm -q git state state } absent ==? present apt-get install git transition yum install git Sync Event absent -> present Tuesday, February 26, 13
  • 16. Noop dpkg-query --search git current desired package { ‘git’: ensure => present rpm -q git state state } absent ==? present potential transition Event absent -> present Tuesday, February 26, 13
  • 17. Puppet DSL and Resources Tuesday, February 26, 13
  • 18. Puppet DSL Composes collections of resources. Tuesday, February 26, 13
  • 19. Package/File/Service class webserver { package { ‘apache2’: ... } file { ‘/etc/apache2/apache2.conf’: ... require => Package[‘apache2’], } service { ‘apache2’: ... subscribe => File[‘/etc/apache2/apache2.conf’] } } Tuesday, February 26, 13
  • 20. configure a node include webserver Tuesday, February 26, 13
  • 21. Catalogs Package File (refresh) Service Tuesday, February 26, 13
  • 22. Text is awesome Tuesday, February 26, 13
  • 23. Text is awesome Integrates with version control Easy to share/collaborate Tuesday, February 26, 13
  • 25. ensure consistency? Puppet IaaS Endpoint Tuesday, February 26, 13
  • 27. GCE example Express stacks as: * VM Instances * Networks * Firewalls * Disks Tuesday, February 26, 13
  • 28. GCE as resources? Tuesday, February 26, 13
  • 29. class app_stack { ... Tuesday, February 26, 13
  • 30. class app_stack { gce_network { ‘dansnetwork’: ensure => present, gateway => '10.0.1.1', range => '10.0.1.0/24’, } -> ... Tuesday, February 26, 13
  • 31. class app_stack { gce_network { ‘dansnetwork’: ensure => present, gateway => '10.0.1.1', range => '10.0.1.0/24’, } -> gce_firewall { ‘webhttp’: ensure => present, allowed => 'tcp:80’, network => ‘appnet’, } -> ... Tuesday, February 26, 13
  • 32. class app_stack { gce_network { ‘dansnetwork’: ensure => present, gateway => '10.0.1.1', range => '10.0.1.0/24’, } -> gce_firewall { ‘webhttp’: ensure => present, allowed => 'tcp:80’, network => ‘appnet’, } -> gce_instance { ‘server1’: ensure => present, network => ‘appnet’ } } Tuesday, February 26, 13
  • 33. infrastructure only exists to be consumed Tuesday, February 26, 13
  • 34. Puppet assigns roles Tuesday, February 26, 13
  • 35. Step 1: distribute content gce_instance { ‘dansinstance’: ensure => present, … modules => [‘mysql’, ‘memcached’] } Tuesday, February 26, 13
  • 36. forge.puppetlabs.com I get all of my content from the forge! Tuesday, February 26, 13
  • 37. Step 2: classify gce_instance { ‘dansinstance’: ensure => present, … classes => { ‘mysql’ => {bind_address => 0.0.0.0} }, } Tuesday, February 26, 13
  • 39. Composable Standard Configuration Language Tuesday, February 26, 13
  • 42. Limitations/ unknowns Tuesday, February 26, 13
  • 43. Parallel processing of Catalogs VLAN DB1 DB1 VM1 VM2 VM2 ... VMN LB Tuesday, February 26, 13
  • 44. Proxy Nodes (credential management) Tuesday, February 26, 13
  • 45. Application Stacks are Persistent Tuesday, February 26, 13
  • 46. Master vs. Masterless? Tuesday, February 26, 13