SlideShare una empresa de Scribd logo
1 de 53
Descargar para leer sin conexión
Integrating the
                    Cloud with
                    Puppet



Tuesday, February 26, 13
About me:

                    Dan Bode
                    Some Dude at PuppetLabs

                    @bodepd

                    bodepd <on> freenode




Tuesday, February 26, 13
Who is this talk for?

         Cloud Users

         Puppet beginners




Tuesday, February 26, 13
It will cover

         why integrate?

         explanation of Puppet’s architecture as it applies to
         integration

         using Puppet to model VM instances




Tuesday, February 26, 13
Why Integrate?




Tuesday, February 26, 13
Cloud

                            Provisions virtual machines


         deployVirtualMachine


                                   Self Service API



                                       VM1




Tuesday, February 26, 13
Puppet

                                       VMs -> Applications


           deployApacheServer


                                              Self Service API



                                                  VM1
                     Make me an
                     apache server                               Here are your
                                                                 instructions
                                     Puppet
                                     Master



Tuesday, February 26, 13
Together

                                                PaaS


                   deployAppStack


                                          Self Service API



                                    DB1       Apache1 Apache2   LB




Tuesday, February 26, 13
Puppet




Tuesday, February 26, 13
2 run modes


                           puppet apply



                           client/server




Tuesday, February 26, 13
Puppet Client/Server

                           Classifier            Modules

                                        Master



                            Facts                  Catalog




                                        VM1




Tuesday, February 26, 13
Facter

                             Classifier            Modules

                                          Master



                           Facts                     Catalog




                                          VM1




Tuesday, February 26, 13
Facter

        $ facter
        architecture       => x86_64
        domain             => local
        fqdn               => DansLapTop.local
        id                 => danbode
        ec2_instance_id    => abc123abc123abc123
        operatingsystem    => ‘Ubunbtu’
        osfamily           => ‘Debian’
        .....




Tuesday, February 26, 13
Facter

              Available as top scope variables from manifests

              ie : $::fact_name

              Creating custom facts is easy.




Tuesday, February 26, 13
Modules
                                                 Modules
                           Classifier

                                        Master



                            Facts                 Catalog




                                        VM1




Tuesday, February 26, 13
Modules

              Sharable Puppet content




Tuesday, February 26, 13
Module Forge

           http://forge.puppetlabs.com/puppetlabs/apache

                                  I get all of
                                  my content
                                   from the
                                     forge!




Tuesday, February 26, 13
Classes/defines compose resources




Tuesday, February 26, 13
Resources
           Describe the configuration state of individual
           system elements.




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
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
Classification                           (maps roles as classes)


                           Classifier
                                                 Modules

                                        Master



                                Facts              Catalog




                                        VM1




Tuesday, February 26, 13
Site manifest
          (/etc/puppet/manifests/site.pp)

          Map a host’s certname to content from a module

       node /^my_node/ {
         include apache
       }




Tuesday, February 26, 13
ENC
                                             ENC

                           Master


            The master can call out to arbitrary executables to
            figure out how a node should be classified.




Tuesday, February 26, 13
Puppet Client/Server

                           Classifier            Modules

                                        Master



                            Facts
                                                   Catalog

                                        VM1




Tuesday, February 26, 13
Catalog
          Resources
                                  Package

                           Package             File

                                                         File
  Dependencies             User         User

                                  Service
                                               Service

Tuesday, February 26, 13
Integration
                               is all about

                           Classification



Tuesday, February 26, 13
Using metadata/userdata

          deployApacheServer (with metadata=’puppet_class=apache’)


                                       Self Service API



                                           VM1




                              Puppet
                              Master




Tuesday, February 26, 13
Using metadata/userdata

          deployApacheServer (with metadata=’puppet_class=apache’)


                                       Self Service API


               I was provisioned
               with metadata               VM1
               puppet_class=apache


                              Puppet
                              Master




Tuesday, February 26, 13
Using metadata/userdata

          deployApacheServer (with metadata=’puppet_class=apache’)


                                       Self Service API


               I was provisioned
               with metadata               VM1
               puppet_class=apache
                                                    Oh cool!
                                                    You must be an
                              Puppet                apache server
                              Master




Tuesday, February 26, 13
Determine role based on facts

                           deployVirtualMachine (with metadata)




Tuesday, February 26, 13
Determine role based on facts

                           deployVirtualMachine (with metadata)
                           populate facter metadata service




Tuesday, February 26, 13
Determine role based on facts

                           deployVirtualMachine (with metadata)
                           populate facter metadata service

                           use fact for classification



   node default {
     include $::meta_data_role
   }



Tuesday, February 26, 13
Pros

   - simple

   - classification information set during provisioning process




Tuesday, February 26, 13
Cons

   - hosts become authoritative over their role

   - a single rooted host can pretend to be anyone else

   - metadata/userdata is not always read/write




Tuesday, February 26, 13
Using instance annotation data

          deployApacheServer (with group=‘apache’)


                                              Self Service API


            here is my id
                                    VM1

                                     Let me consult
                                     the cloud system
                           Puppet
                           Master         You were provisioned
                                          as an apache server




Tuesday, February 26, 13
Using instance annotation data

          deployApacheServer (with group=‘apache’)


                                      Self Service API



                             VM1




Tuesday, February 26, 13
Using instance annotation data

          deployApacheServer (with group=‘apache’)


                                          Self Service API


            here is my id
                                    VM1




                           Puppet
                           Master




Tuesday, February 26, 13
Using instance annotation data

          deployApacheServer (with group=‘apache’)


                                            Self Service API


            here is my id
                                    VM1

                                     Let me lookup your
                                     role based on your id
                           Puppet
                           Master




Tuesday, February 26, 13
Using instance annotation data

          deployApacheServer (with group=‘apache’)


                                              Self Service API


            here is my id
                                    VM1

                                     Let me lookup your
                                     role based on your id
                           Puppet
                           Master         You were provisioned
                                          as an apache server




Tuesday, February 26, 13
Pros

   - provisioning credentials are used to determine role

   - annotation field likely updatable




Tuesday, February 26, 13
Cons

   - puppetmaster must have API credentials

   - may require a custom ENC




Tuesday, February 26, 13
Decouple role assignment from
        provisioning
        After provisioning is completed, ssh into a machine,
        set a custom fact (using facts.d), and trigger a
        puppet run.

        pros - you can easily execute a script to install and
        bootstrap puppet

        cons - extra step




Tuesday, February 26, 13
facts.d

        facts.d comes with stdlib
        (http://forge.puppetlabs.com/puppetlabs/stdlib)

        it converts any ‘key=value’ pairs listed in /etc/
        facts.d/*.txt into facts




Tuesday, February 26, 13
VM provisioning with Puppet
            (experimental! use cases
            appreciated)




Tuesday, February 26, 13
Share Application Stacks as text

        class my_app_stack {
            cloudstack_instance { 'foo4':
                ensure     => present,
                group      => 'role=db',
            }
            cloudstack_instance { 'foo3':
                ensure     => present,
                group      => 'role=apache',
            }
        }




Tuesday, February 26, 13
Use resource defaults for
        common settings
        Cloudstack_instance {
            image          => 'CentOS 5.6 key+pass',
            flavor         => 'Small Instance',
            zone           => 'ACS-FMT-001',
            network        => 'puppetlabs-network',
            keypair        => 'dans_keypair4',
        }
        cloudstack_instance { 'foo4':
            ensure         => $::ensure,
            group          => 'role=db',
        }
        cloudstack_instance { 'foo3':
            ensure         => $::ensure,
            group          => 'role=apache',
        }




Tuesday, February 26, 13
More issues of trust




Tuesday, February 26, 13

Más contenido relacionado

Similar a Automatic Configuration of Your Cloud with Puppet

Puppet: Orchestration framework?
Puppet: Orchestration framework?Puppet: Orchestration framework?
Puppet: Orchestration framework?bodepd
 
Cloudstack talk
Cloudstack talkCloudstack talk
Cloudstack talkbodepd
 
Apachecon cassandra transport
Apachecon cassandra transportApachecon cassandra transport
Apachecon cassandra transportzznate
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandboxGiuseppe Maxia
 
Modules and the Puppet Forge
Modules and the Puppet ForgeModules and the Puppet Forge
Modules and the Puppet ForgePuppet
 
Laravel and Composer
Laravel and ComposerLaravel and Composer
Laravel and ComposerPhil Sturgeon
 
Testing early mysql releases in a sandbox
Testing early mysql releases in a sandboxTesting early mysql releases in a sandbox
Testing early mysql releases in a sandboxGiuseppe Maxia
 
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
 
Devoxx UK: Reliability & Scale in AWS while letting you sleep through the night
Devoxx UK: Reliability & Scale in AWS while letting you sleep through the night Devoxx UK: Reliability & Scale in AWS while letting you sleep through the night
Devoxx UK: Reliability & Scale in AWS while letting you sleep through the night Jos Boumans
 
Backend as a Service
Backend as a ServiceBackend as a Service
Backend as a ServiceLutz Kohl
 

Similar a Automatic Configuration of Your Cloud with Puppet (14)

Puppet: Orchestration framework?
Puppet: Orchestration framework?Puppet: Orchestration framework?
Puppet: Orchestration framework?
 
Cloudstack talk
Cloudstack talkCloudstack talk
Cloudstack talk
 
Apachecon cassandra transport
Apachecon cassandra transportApachecon cassandra transport
Apachecon cassandra transport
 
Html5 apis
Html5 apisHtml5 apis
Html5 apis
 
Testing mysql creatively in a sandbox
Testing mysql creatively in a sandboxTesting mysql creatively in a sandbox
Testing mysql creatively in a sandbox
 
Modules and the Puppet Forge
Modules and the Puppet ForgeModules and the Puppet Forge
Modules and the Puppet Forge
 
Laravel and Composer
Laravel and ComposerLaravel and Composer
Laravel and Composer
 
Testing early mysql releases in a sandbox
Testing early mysql releases in a sandboxTesting early mysql releases in a sandbox
Testing early mysql releases in a sandbox
 
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
 
Devoxx UK: Reliability & Scale in AWS while letting you sleep through the night
Devoxx UK: Reliability & Scale in AWS while letting you sleep through the night Devoxx UK: Reliability & Scale in AWS while letting you sleep through the night
Devoxx UK: Reliability & Scale in AWS while letting you sleep through the night
 
MySQL Sandbox 3
MySQL Sandbox 3MySQL Sandbox 3
MySQL Sandbox 3
 
Backend as a Service
Backend as a ServiceBackend as a Service
Backend as a Service
 
Docker intro
Docker introDocker intro
Docker intro
 
Nuxeo 5.2 Glassfish
Nuxeo 5.2 GlassfishNuxeo 5.2 Glassfish
Nuxeo 5.2 Glassfish
 

Más de Puppet

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyamlPuppet
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)Puppet
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscodePuppet
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twentiesPuppet
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codePuppet
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approachPuppet
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationPuppet
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliancePuppet
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowPuppet
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Puppet
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppetPuppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkPuppet
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping groundPuppet
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy SoftwarePuppet
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User GroupPuppet
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsPuppet
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyPuppet
 

Más de Puppet (20)

Puppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepoPuppet camp2021 testing modules and controlrepo
Puppet camp2021 testing modules and controlrepo
 
Puppetcamp r10kyaml
Puppetcamp r10kyamlPuppetcamp r10kyaml
Puppetcamp r10kyaml
 
2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)2021 04-15 operational verification (with notes)
2021 04-15 operational verification (with notes)
 
Puppet camp vscode
Puppet camp vscodePuppet camp vscode
Puppet camp vscode
 
Modules of the twenties
Modules of the twentiesModules of the twenties
Modules of the twenties
 
Applying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance codeApplying Roles and Profiles method to compliance code
Applying Roles and Profiles method to compliance code
 
KGI compliance as-code approach
KGI compliance as-code approachKGI compliance as-code approach
KGI compliance as-code approach
 
Enforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automationEnforce compliance policy with model-driven automation
Enforce compliance policy with model-driven automation
 
Keynote: Puppet camp compliance
Keynote: Puppet camp complianceKeynote: Puppet camp compliance
Keynote: Puppet camp compliance
 
Automating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNowAutomating it management with Puppet + ServiceNow
Automating it management with Puppet + ServiceNow
 
Puppet: The best way to harden Windows
Puppet: The best way to harden WindowsPuppet: The best way to harden Windows
Puppet: The best way to harden Windows
 
Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020Simplified Patch Management with Puppet - Oct. 2020
Simplified Patch Management with Puppet - Oct. 2020
 
Accelerating azure adoption with puppet
Accelerating azure adoption with puppetAccelerating azure adoption with puppet
Accelerating azure adoption with puppet
 
Puppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael PinsonPuppet catalog Diff; Raphael Pinson
Puppet catalog Diff; Raphael Pinson
 
ServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin ReeuwijkServiceNow and Puppet- better together, Kevin Reeuwijk
ServiceNow and Puppet- better together, Kevin Reeuwijk
 
Take control of your dev ops dumping ground
Take control of your  dev ops dumping groundTake control of your  dev ops dumping ground
Take control of your dev ops dumping ground
 
100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software100% Puppet Cloud Deployment of Legacy Software
100% Puppet Cloud Deployment of Legacy Software
 
Puppet User Group
Puppet User GroupPuppet User Group
Puppet User Group
 
Continuous Compliance and DevSecOps
Continuous Compliance and DevSecOpsContinuous Compliance and DevSecOps
Continuous Compliance and DevSecOps
 
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick MaludyThe Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
The Dynamic Duo of Puppet and Vault tame SSL Certificates, Nick Maludy
 

Último

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 

Último (20)

DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 

Automatic Configuration of Your Cloud with Puppet

  • 1. Integrating the Cloud with Puppet Tuesday, February 26, 13
  • 2. About me: Dan Bode Some Dude at PuppetLabs @bodepd bodepd <on> freenode Tuesday, February 26, 13
  • 3. Who is this talk for? Cloud Users Puppet beginners Tuesday, February 26, 13
  • 4. It will cover why integrate? explanation of Puppet’s architecture as it applies to integration using Puppet to model VM instances Tuesday, February 26, 13
  • 6. Cloud Provisions virtual machines deployVirtualMachine Self Service API VM1 Tuesday, February 26, 13
  • 7. Puppet VMs -> Applications deployApacheServer Self Service API VM1 Make me an apache server Here are your instructions Puppet Master Tuesday, February 26, 13
  • 8. Together PaaS deployAppStack Self Service API DB1 Apache1 Apache2 LB Tuesday, February 26, 13
  • 10. 2 run modes puppet apply client/server Tuesday, February 26, 13
  • 11. Puppet Client/Server Classifier Modules Master Facts Catalog VM1 Tuesday, February 26, 13
  • 12. Facter Classifier Modules Master Facts Catalog VM1 Tuesday, February 26, 13
  • 13. Facter $ facter architecture => x86_64 domain => local fqdn => DansLapTop.local id => danbode ec2_instance_id => abc123abc123abc123 operatingsystem => ‘Ubunbtu’ osfamily => ‘Debian’ ..... Tuesday, February 26, 13
  • 14. Facter Available as top scope variables from manifests ie : $::fact_name Creating custom facts is easy. Tuesday, February 26, 13
  • 15. Modules Modules Classifier Master Facts Catalog VM1 Tuesday, February 26, 13
  • 16. Modules Sharable Puppet content Tuesday, February 26, 13
  • 17. Module Forge http://forge.puppetlabs.com/puppetlabs/apache I get all of my content from the forge! Tuesday, February 26, 13
  • 19. Resources Describe the configuration state of individual system elements. Tuesday, February 26, 13
  • 20. user { ‘dan’: # a user named dan ... Tuesday, February 26, 13
  • 21. user { ‘dan’: # a user named dan ensure => present, # should exist ... Tuesday, February 26, 13
  • 22. user { ‘dan’: # a user named dan ensure => present, # should exist shell => ‘/bin/bash’, # with this shell } Tuesday, February 26, 13
  • 23. Puppet DSL and resources Tuesday, February 26, 13
  • 24. Puppet DSL Composes collections of resources. Tuesday, February 26, 13
  • 25. 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
  • 26. configure a node include webserver Tuesday, February 26, 13
  • 27. Classification (maps roles as classes) Classifier Modules Master Facts Catalog VM1 Tuesday, February 26, 13
  • 28. Site manifest (/etc/puppet/manifests/site.pp) Map a host’s certname to content from a module node /^my_node/ { include apache } Tuesday, February 26, 13
  • 29. ENC ENC Master The master can call out to arbitrary executables to figure out how a node should be classified. Tuesday, February 26, 13
  • 30. Puppet Client/Server Classifier Modules Master Facts Catalog VM1 Tuesday, February 26, 13
  • 31. Catalog Resources Package Package File File Dependencies User User Service Service Tuesday, February 26, 13
  • 32. Integration is all about Classification Tuesday, February 26, 13
  • 33. Using metadata/userdata deployApacheServer (with metadata=’puppet_class=apache’) Self Service API VM1 Puppet Master Tuesday, February 26, 13
  • 34. Using metadata/userdata deployApacheServer (with metadata=’puppet_class=apache’) Self Service API I was provisioned with metadata VM1 puppet_class=apache Puppet Master Tuesday, February 26, 13
  • 35. Using metadata/userdata deployApacheServer (with metadata=’puppet_class=apache’) Self Service API I was provisioned with metadata VM1 puppet_class=apache Oh cool! You must be an Puppet apache server Master Tuesday, February 26, 13
  • 36. Determine role based on facts deployVirtualMachine (with metadata) Tuesday, February 26, 13
  • 37. Determine role based on facts deployVirtualMachine (with metadata) populate facter metadata service Tuesday, February 26, 13
  • 38. Determine role based on facts deployVirtualMachine (with metadata) populate facter metadata service use fact for classification node default { include $::meta_data_role } Tuesday, February 26, 13
  • 39. Pros - simple - classification information set during provisioning process Tuesday, February 26, 13
  • 40. Cons - hosts become authoritative over their role - a single rooted host can pretend to be anyone else - metadata/userdata is not always read/write Tuesday, February 26, 13
  • 41. Using instance annotation data deployApacheServer (with group=‘apache’) Self Service API here is my id VM1 Let me consult the cloud system Puppet Master You were provisioned as an apache server Tuesday, February 26, 13
  • 42. Using instance annotation data deployApacheServer (with group=‘apache’) Self Service API VM1 Tuesday, February 26, 13
  • 43. Using instance annotation data deployApacheServer (with group=‘apache’) Self Service API here is my id VM1 Puppet Master Tuesday, February 26, 13
  • 44. Using instance annotation data deployApacheServer (with group=‘apache’) Self Service API here is my id VM1 Let me lookup your role based on your id Puppet Master Tuesday, February 26, 13
  • 45. Using instance annotation data deployApacheServer (with group=‘apache’) Self Service API here is my id VM1 Let me lookup your role based on your id Puppet Master You were provisioned as an apache server Tuesday, February 26, 13
  • 46. Pros - provisioning credentials are used to determine role - annotation field likely updatable Tuesday, February 26, 13
  • 47. Cons - puppetmaster must have API credentials - may require a custom ENC Tuesday, February 26, 13
  • 48. Decouple role assignment from provisioning After provisioning is completed, ssh into a machine, set a custom fact (using facts.d), and trigger a puppet run. pros - you can easily execute a script to install and bootstrap puppet cons - extra step Tuesday, February 26, 13
  • 49. facts.d facts.d comes with stdlib (http://forge.puppetlabs.com/puppetlabs/stdlib) it converts any ‘key=value’ pairs listed in /etc/ facts.d/*.txt into facts Tuesday, February 26, 13
  • 50. VM provisioning with Puppet (experimental! use cases appreciated) Tuesday, February 26, 13
  • 51. Share Application Stacks as text class my_app_stack { cloudstack_instance { 'foo4': ensure => present, group => 'role=db', } cloudstack_instance { 'foo3': ensure => present, group => 'role=apache', } } Tuesday, February 26, 13
  • 52. Use resource defaults for common settings Cloudstack_instance { image => 'CentOS 5.6 key+pass', flavor => 'Small Instance', zone => 'ACS-FMT-001', network => 'puppetlabs-network', keypair => 'dans_keypair4', } cloudstack_instance { 'foo4': ensure => $::ensure, group => 'role=db', } cloudstack_instance { 'foo3': ensure => $::ensure, group => 'role=apache', } Tuesday, February 26, 13
  • 53. More issues of trust Tuesday, February 26, 13