SlideShare a Scribd company logo
developing sysadmin -
                          sysadmining developers
                           develop your platform and your
                              application management

                                      GUUG Berlin
                                        01.11.2012
                                       Martin Alfke
                               <martin.alfke@buero20.org>

                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
Agenda

                           puppet environments
                              puppet modules
                             puppet templates
                            puppet and augeas
                           puppet multi master
                          puppet without master


                                 Ā© Martin Alfke - 2012

Freitag, 2. November 12
Environments


                              ā€œadminā€™s and devā€™s cooperate!ā€




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Environments
                     ā€¢    Split up modules into several repositories

                     ā€¢    ā€œproductionā€ is default and always there

                     ā€¢    Naming is abritrary

                     ā€¢    Master needs to know about environments

                     ā€¢    Client needs to send environment information




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Environments
                 ā€¢        puppet.conf
                          [master]
                            [test]
                               manifest = /etc/puppet/test/manifests/site.pp
                               modulepath = /etc/puppet/test/modules
                            [mailteam]
                               manifest = /etc/puppet/mail/manifests/site.pp
                               modulepath = /etc/puppet/mail/modules

                          [agent]
                             environment = test


                           Environments - Modules - Templates - Augeas - Master - Masterless
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
Environments
                 ā€¢        Each environment may have multiple modulepaths
                          [master]
                            [test]
                               manifest = /etc/puppet/test/manifests/site.pp
                               modulepath = /etc/puppet/test/modules:/data/puppet/team/test/modules
                            [mailteam]
                               manifest = /etc/puppet/mail/manifests/site.pp
                               modulepath = /etc/puppet/mail/modules:/data/puppet/team/core/modules




                           Environments - Modules - Templates - Augeas - Master - Masterless
                                                      Ā© Martin Alfke - 2012

Freitag, 2. November 12
Modules


                              ā€œplug things together simpleā€




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                   Ā© Martin Alfke - 2012

Freitag, 2. November 12
Modules
                     ā€¢    Difference between modules and classes

                          ā€¢   Module:

                              ā€¢   strict directory naming for autoloading

                              ā€¢   each module has at least one class

                          ā€¢   Class:

                              ā€¢   available but not applied automatically


                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Modules
                 ā€¢        directory structure
                          /etc/puppet/test/modules/    <-- modulepath
                             apache/                   <-- modulename
                             manifests/                <-- manifests path within module
                                 init.pp              <-- initial class fetched from autoloader
                                 server.pp            <-- additional class(es)
                             ļ¬les/                    <-- directory for module ļ¬le serving
                             templates/               <-- directory for module templates
                             lib/                     <-- directory for facts or functions
                             tests/                   <-- directory for tests during develop



                            Environments - Modules - Templates - Augeas - Master - Masterless
                                                          Ā© Martin Alfke - 2012

Freitag, 2. November 12
Modules
                 ā€¢        class, ļ¬le and template naming structure
                          /etc/puppet/test/modules/
                             apache/
                             manifests/
                                 init.pp              <-- class apache { ... }
                                 server.pp            <-- class apache::server {Ā ... }
                             ļ¬les/                    <-- ā€œpuppet:///modules/apache/<ļ¬lename>ā€
                             templates/               <-- template(ā€˜apache/<ļ¬lename>ā€™)
                             lib/
                             tests/



                            Environments - Modules - Templates - Augeas - Master - Masterless
                                                         Ā© Martin Alfke - 2012

Freitag, 2. November 12
Modules
                 ā€¢        class structure
                          class apache {
                                   package { ā€˜apache2ā€™: ensure => present, }
                                   ļ¬le { ā€˜/etc/apache2/apache2.confā€™:
                                      content => template(ā€˜apache/apache2.conf.erbā€™),
                                   }
                                   ļ¬le { ā€˜/etc/apache2/conf.d/charsetā€™:
                                      source => ā€˜puppet:///modules/apache/charsetā€™,
                                   }
                                   service { ā€˜apache2ā€™: ensure => running, }
                          }


                            Environments - Modules - Templates - Augeas - Master - Masterless
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
Modules
                 ā€¢        use classes
                          node ā€˜www01.domain.tldā€™ {
                                 class {Ā ā€˜apacheā€™: }      <-- old: include apache
                          }




                            Environments - Modules - Templates - Augeas - Master - Masterless
                                                       Ā© Martin Alfke - 2012

Freitag, 2. November 12
Modules
                 ā€¢        resources, classes, parameterized classes
                          resource_type { ā€˜titleā€™:
                                  attribute => value,
                          }

                          class <title> { ... }
                          class <title> ( $variable = value) { ... }

                          class { ā€˜<title>ā€™: }
                          class { ā€˜<title>ā€™:
                                    variable => value,
                          }

                             Environments - Modules - Templates - Augeas - Master - Masterless
                                                             Ā© Martin Alfke - 2012

Freitag, 2. November 12
Modules
                 ā€¢        using ruby in classes
                          /etc/puppet/test/modules/apache/manifests/init.rb

                          hostclass :apache do
                            package :apache2, :ensure => present
                            package :libapache2-php, :ensure => present
                            service :apache2, :ensure => running
                          end




                            Environments - Modules - Templates - Augeas - Master - Masterless
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
Templates


                                        ā€œcode your conļ¬gā€




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Templates
                     ā€¢    Ruby ERB template engine

                     ā€¢    Normally requires in-depth conļ¬guration review

                     ā€¢    Be aware of variable scoping !




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Templates
                 ā€¢        use variables from puppet in templates
                          $ntpserver = ā€˜10.2.3.4ā€™
                          ļ¬le { ā€˜/etc/ntp.confā€™:
                                    content => template(ā€˜ntp/ntp.conf.erbā€™),
                          }

                          # ntp.conf.erb
                          <% if @ntpserver %>                <-- old: if has_variable(ā€˜ntpserverā€™)
                          server <%= @ntpserver %>           <-- @ syntax is new. uses current scope
                          <% else %>
                          server pool.ntp.org
                          <% end %>

                            Environments - Modules - Templates - Augeas - Master - Masterless
                                                          Ā© Martin Alfke - 2012

Freitag, 2. November 12
Augeas


                                        ā€œclean your lensesā€




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Augeas
                     ā€¢    Make changes to single lines

                     ā€¢    Do not manage the complete conļ¬guration ļ¬le in
                          puppet




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Augeas
                 ā€¢        augeas uses lenses to split up conļ¬g ļ¬les
                          augtool print /ļ¬les/etc/sysctl.conf
                          augtool set net.ipv4.forward 1

                          augeas { ā€˜set_ipv4_forwardā€™:
                                   context => ā€˜/ļ¬les/etc/sysctl.confā€™,
                                   changes => ā€œset net.ipv4.forward 1ā€,
                          }




                            Environments - Modules - Templates - Augeas - Master - Masterless
                                                          Ā© Martin Alfke - 2012

Freitag, 2. November 12
Augeas
                     ā€¢    Attention!

                     ā€¢    Not all conļ¬guration ļ¬les are supported !

                     ā€¢    Augeas needs key-value pairs

                     ā€¢    Within puppet ruby-augeas extension is required




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Multi Master


                           ā€œno one can serve two masters!ā€




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Multi Master
                     ā€¢    Load-Balancing with SSL separation

                     ā€¢    several Data Center

                     ā€¢    do you really have more than 1000
                          nodes?




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
Multi Master
                 ā€¢        separate puppet ca and puppet master
                          puppet.conf on puppet ca (single instance)
                          [master]
                              ca = true
                          puppet.conf on puppet master
                          [master]
                              ca = false
                          puppet.conf on agent
                          [agent]
                              ca_server = <puppet ca>
                              server = <puppet master>


                            Environments - Modules - Templates - Augeas - Master - Masterless
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
Multi Master
                 ā€¢        use multiple master (without ca)

                          ā€¢    apache/nginx and loadbalancing

                          ā€¢    ipvsadm




                              Environments - Modules - Templates - Augeas - Master - Masterless
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
Multi Master
                 ā€¢        use multiple master (without ca)

                          ā€¢    pros:

                               ā€¢   ļ¬le serving handled better

                               ā€¢   more masters compile catalogs

                          ā€¢    cons:

                               ā€¢   single ca only


                              Environments - Modules - Templates - Augeas - Master - Masterless
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
Multi Master
                 ā€¢        avoid multiple masters

                          ā€¢    use templates !

                               ā€¢   templates are generated on the master during
                                   catalog compilation

                               ā€¢   ļ¬les needs to get fetched by the nodes

                          ā€¢    use mod_passenger


                              Environments - Modules - Templates - Augeas - Master - Masterless
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
without Master


                                 ā€œyou shall have no masterā€




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
without Master
                     ā€¢    Pre-compile catalogs

                     ā€¢    Run puppet apply locally




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
without Master
                     ā€¢    Very large environment (>15.000 nodes)

                     ā€¢    Multiple locations world wide




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
without Master
                     ā€¢    Compile catalogs for all nodes on master

                          ā€¢   puppet master compile <fqdn>

                     ā€¢    Copy catalogs to nodes to execute them

                          ā€¢   puppet apply --catalog <catalog ļ¬le name>




                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
without Master
                          ā€¢   Pros:

                              ā€¢   no dedicated master, catalog compilation may
                                  take place everywhere

                          ā€¢   Cons:

                              ā€¢   no modules !!

                              ā€¢   ļ¬leserving has to be done locally (e.g. NFS
                                  mount)

                          Environments - Modules - Templates - Augeas - Master - Masterless
                                                    Ā© Martin Alfke - 2012

Freitag, 2. November 12
developing sysadmin -
                          sysadmining developers

                              Wait ! There is more !



                                      Martin Alfke
                              <martin.alfke@buero20.org>

                                       Ā© Martin Alfke - 2012

Freitag, 2. November 12
ENC and Hiera


                              ā€œdata, data, dataā€




                          ENC and Hiera - Puppet DB - Dashboard
                                       Ā© Martin Alfke - 2012

Freitag, 2. November 12
ENC and Hiera
                     ā€¢    External Nodes Classiļ¬er

                          ā€¢   executable with one parameter (fqdn)

                          ā€¢   can be anything

                              ā€¢   get info from ļ¬lesystem: cat $1.yaml

                              ā€¢   get info from inventory database




                                     ENC and Hiera - Puppet DB - Dashboard
                                                  Ā© Martin Alfke - 2012

Freitag, 2. November 12
ENC and Hiera
                     ā€¢      ENC in puppet
                          /etc/puppet/puppet.conf
                          [master]
                                  node_terminus = exec
                                  external_nodes = /etc/puppet/bin/my_great_enc.exe




                                       ENC and Hiera - Puppet DB - Dashboard
                                                      Ā© Martin Alfke - 2012

Freitag, 2. November 12
ENC and Hiera
                 ā€¢        /etc/puppet/bin/my_great_enc.exe www1.domain.tld
                           ---
                           parameters:
                               location: de-ber2
                           classes:
                               ntp:
                                  ntpserver: 10.2.2.2
                               apache:
                               mysql:
                           environment: production



                                       ENC and Hiera - Puppet DB - Dashboard
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
ENC and Hiera
                     ā€¢    Hiera - hierarchial data structure

                          ā€¢   built in into Puppet 3.x

                          ā€¢   add-on in Puppet 2.7.x




                                    ENC and Hiera - Puppet DB - Dashboard
                                                 Ā© Martin Alfke - 2012

Freitag, 2. November 12
ENC and Hiera
                     ā€¢      Hiera conļ¬guration
                          /etc/puppet/hiera.yaml
                          :hierarchy:
                                   - %{operatingsystem}
                                   - common
                                   - %{datacenter}
                                   - %{serverfunction}
                          :backends:
                                   - yaml
                          :yaml:
                                   :datadir: ā€˜/etc/puppet/hieradataā€™


                                          ENC and Hiera - Puppet DB - Dashboard
                                                           Ā© Martin Alfke - 2012

Freitag, 2. November 12
ENC and Hiera
                     ā€¢      Hiera data
                          /etc/puppet/hieradata/debian.yaml
                          ---
                          ssh_packages: 	

 - ā€˜openssh-serverā€™
                                            - ā€˜openssh-clientā€™
                                            - ā€˜openssh-blacklistā€™

                          /etc/puppet/hieradata/centos.yaml
                          ---
                          ssh_packages: - ā€˜opensshā€™
                                           - ā€˜openssh-clientsā€™
                                           - ā€˜openssh-serverā€™

                                          ENC and Hiera - Puppet DB - Dashboard
                                                           Ā© Martin Alfke - 2012

Freitag, 2. November 12
ENC and Hiera
                     ā€¢      Hiera usage
                          /etc/puppet/modules/ssh/manifests/init.pp
                          class ssh {
                                   $ssh_packages = hiera(ā€˜ssh_packagesā€™)
                                   package { ā€œ${ssh_packages}ā€: ensure => present }
                          }




                                        ENC and Hiera - Puppet DB - Dashboard
                                                        Ā© Martin Alfke - 2012

Freitag, 2. November 12
PuppetDB


                                ā€œgetting it allā€




                          ENC and Hiera - Puppet DB - Dashboard
                                       Ā© Martin Alfke - 2012

Freitag, 2. November 12
PuppetDB
                     ā€¢    Used for storeconļ¬gs and exported resources

                     ā€¢    Schema for PostgreSQL

                     ā€¢    Will get more features soon




                                  ENC and Hiera - Puppet DB - Dashboard
                                               Ā© Martin Alfke - 2012

Freitag, 2. November 12
Dashboard


                          ā€œmanagement needs graphsā€




                            ENC and Hiera - Puppet DB - Dashboard
                                         Ā© Martin Alfke - 2012

Freitag, 2. November 12
Dashboard
                     ā€¢    Open Source Dashboard is dead end

                     ā€¢    PuppetLabs is working on two other tools




                                  ENC and Hiera - Puppet DB - Dashboard
                                               Ā© Martin Alfke - 2012

Freitag, 2. November 12
developing sysadmin -
                          sysadmining developers

                                    Questions?



                                      Martin Alfke
                              <martin.alfke@buero20.org>

                                       Ā© Martin Alfke - 2012

Freitag, 2. November 12

More Related Content

What's hot

Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
Alessandro Franceschi
Ā 
2007 Fsoss Drupal Under The Hood
2007 Fsoss Drupal Under The Hood2007 Fsoss Drupal Under The Hood
2007 Fsoss Drupal Under The Hood
James Walker
Ā 
Puppet Enterprise for the Network
Puppet Enterprise for the NetworkPuppet Enterprise for the Network
Puppet Enterprise for the Network
Puppet
Ā 
Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?
Martin Alfke
Ā 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
Alessandro Franceschi
Ā 
Decoupled Libraries for PHP
Decoupled Libraries for PHPDecoupled Libraries for PHP
Decoupled Libraries for PHP
Paul Jones
Ā 
Webinar: Zend framework Getting to grips (ZF1)
Webinar: Zend framework Getting to grips (ZF1)Webinar: Zend framework Getting to grips (ZF1)
Webinar: Zend framework Getting to grips (ZF1)
Ryan Mauger
Ā 
Zend framework: Getting to grips (ZF1)
Zend framework: Getting to grips (ZF1)Zend framework: Getting to grips (ZF1)
Zend framework: Getting to grips (ZF1)
Ryan Mauger
Ā 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny Puppet
Alessandro Franceschi
Ā 
Asset management with Zend Framework 2
Asset management with Zend Framework 2Asset management with Zend Framework 2
Asset management with Zend Framework 2
Stefano Valle
Ā 
Download It
Download ItDownload It
Download It
webhostingguy
Ā 
JavaScript Coding with Class
JavaScript Coding with ClassJavaScript Coding with Class
JavaScript Coding with Class
davidwalsh83
Ā 
CapitalCamp Features
CapitalCamp FeaturesCapitalCamp Features
CapitalCamp Features
Phase2
Ā 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
Arun Gupta
Ā 
Portland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modulesPortland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modules
Puppet
Ā 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS
DrupalMumbai
Ā 
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...
Java EE 6 = Less Code + More Power (Tutorial)  [5th IndicThreads Conference O...Java EE 6 = Less Code + More Power (Tutorial)  [5th IndicThreads Conference O...
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...
IndicThreads
Ā 

What's hot (17)

Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
Ā 
2007 Fsoss Drupal Under The Hood
2007 Fsoss Drupal Under The Hood2007 Fsoss Drupal Under The Hood
2007 Fsoss Drupal Under The Hood
Ā 
Puppet Enterprise for the Network
Puppet Enterprise for the NetworkPuppet Enterprise for the Network
Puppet Enterprise for the Network
Ā 
Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?Can you upgrade to Puppet 4.x?
Can you upgrade to Puppet 4.x?
Ā 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
Ā 
Decoupled Libraries for PHP
Decoupled Libraries for PHPDecoupled Libraries for PHP
Decoupled Libraries for PHP
Ā 
Webinar: Zend framework Getting to grips (ZF1)
Webinar: Zend framework Getting to grips (ZF1)Webinar: Zend framework Getting to grips (ZF1)
Webinar: Zend framework Getting to grips (ZF1)
Ā 
Zend framework: Getting to grips (ZF1)
Zend framework: Getting to grips (ZF1)Zend framework: Getting to grips (ZF1)
Zend framework: Getting to grips (ZF1)
Ā 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny Puppet
Ā 
Asset management with Zend Framework 2
Asset management with Zend Framework 2Asset management with Zend Framework 2
Asset management with Zend Framework 2
Ā 
Download It
Download ItDownload It
Download It
Ā 
JavaScript Coding with Class
JavaScript Coding with ClassJavaScript Coding with Class
JavaScript Coding with Class
Ā 
CapitalCamp Features
CapitalCamp FeaturesCapitalCamp Features
CapitalCamp Features
Ā 
5050 dev nation
5050 dev nation5050 dev nation
5050 dev nation
Ā 
Portland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modulesPortland Puppet User Group June 2014: Writing and publishing puppet modules
Portland Puppet User Group June 2014: Writing and publishing puppet modules
Ā 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS
Ā 
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...
Java EE 6 = Less Code + More Power (Tutorial)  [5th IndicThreads Conference O...Java EE 6 = Less Code + More Power (Tutorial)  [5th IndicThreads Conference O...
Java EE 6 = Less Code + More Power (Tutorial) [5th IndicThreads Conference O...
Ā 

Similar to developing sysadmin, sysadmining developersGuug devops puppet

Puppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaPuppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - Geneva
Alessandro Franceschi
Ā 
Oracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise ApplicationsOracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise Applications
glynnfoster
Ā 
Puppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the ForgePuppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the Forge
Aaron Bernstein
Ā 
Creating Better Builds with Gradle
Creating Better Builds with GradleCreating Better Builds with Gradle
Creating Better Builds with Gradle
Andres Almiray
Ā 
Drupal module development training delhi
Drupal module development training delhiDrupal module development training delhi
Drupal module development training delhi
unitedwebsoft
Ā 
The Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result CacheThe Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result Cache
Steven Feuerstein
Ā 
Webinar - Managing Files with Puppet
Webinar - Managing Files with PuppetWebinar - Managing Files with Puppet
Webinar - Managing Files with Puppet
OlinData
Ā 
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Phase2
Ā 
Extending ansible
Extending ansibleExtending ansible
Extending ansible
Yan Kurniawan
Ā 
AnsibleFest 2014 - Role Tips and Tricks
AnsibleFest 2014 - Role Tips and TricksAnsibleFest 2014 - Role Tips and Tricks
AnsibleFest 2014 - Role Tips and Tricks
jimi-c
Ā 
Leaner microservices with Java 10
Leaner microservices with Java 10Leaner microservices with Java 10
Leaner microservices with Java 10
Arto Santala
Ā 
Terraform training - Modules šŸŽ’
Terraform training - Modules šŸŽ’Terraform training - Modules šŸŽ’
Terraform training - Modules šŸŽ’
StephaneBoghossian1
Ā 
Apache Maven basics
Apache Maven basicsApache Maven basics
Apache Maven basics
Volodymyr Ostapiv
Ā 
Scaling Puppet Usage to a Global Organization
Scaling Puppet Usage to a Global OrganizationScaling Puppet Usage to a Global Organization
Scaling Puppet Usage to a Global Organization
Puppet
Ā 
PuppetCamp SEA 1 - Puppet Deployment at OnApp
PuppetCamp SEA 1 - Puppet Deployment  at OnAppPuppetCamp SEA 1 - Puppet Deployment  at OnApp
PuppetCamp SEA 1 - Puppet Deployment at OnApp
OlinData
Ā 
Puppet Deployment at OnApp
Puppet Deployment at OnApp Puppet Deployment at OnApp
Puppet Deployment at OnApp
Puppet
Ā 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
Ryan Cuprak
Ā 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
Drupalcon Paris
Ā 
Drupal development
Drupal development Drupal development
Drupal development
Dennis Povshedny
Ā 
Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7 Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7
Dhinakaran Mani
Ā 

Similar to developing sysadmin, sysadmining developersGuug devops puppet (20)

Puppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaPuppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - Geneva
Ā 
Oracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise ApplicationsOracle Solaris 11 - Best for Enterprise Applications
Oracle Solaris 11 - Best for Enterprise Applications
Ā 
Puppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the ForgePuppet | Custom Modules & Using the Forge
Puppet | Custom Modules & Using the Forge
Ā 
Creating Better Builds with Gradle
Creating Better Builds with GradleCreating Better Builds with Gradle
Creating Better Builds with Gradle
Ā 
Drupal module development training delhi
Drupal module development training delhiDrupal module development training delhi
Drupal module development training delhi
Ā 
The Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result CacheThe Amazing and Elegant PL/SQL Function Result Cache
The Amazing and Elegant PL/SQL Function Result Cache
Ā 
Webinar - Managing Files with Puppet
Webinar - Managing Files with PuppetWebinar - Managing Files with Puppet
Webinar - Managing Files with Puppet
Ā 
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Best Practices for Development Deployment & Distributions: Capital Camp + Gov...
Ā 
Extending ansible
Extending ansibleExtending ansible
Extending ansible
Ā 
AnsibleFest 2014 - Role Tips and Tricks
AnsibleFest 2014 - Role Tips and TricksAnsibleFest 2014 - Role Tips and Tricks
AnsibleFest 2014 - Role Tips and Tricks
Ā 
Leaner microservices with Java 10
Leaner microservices with Java 10Leaner microservices with Java 10
Leaner microservices with Java 10
Ā 
Terraform training - Modules šŸŽ’
Terraform training - Modules šŸŽ’Terraform training - Modules šŸŽ’
Terraform training - Modules šŸŽ’
Ā 
Apache Maven basics
Apache Maven basicsApache Maven basics
Apache Maven basics
Ā 
Scaling Puppet Usage to a Global Organization
Scaling Puppet Usage to a Global OrganizationScaling Puppet Usage to a Global Organization
Scaling Puppet Usage to a Global Organization
Ā 
PuppetCamp SEA 1 - Puppet Deployment at OnApp
PuppetCamp SEA 1 - Puppet Deployment  at OnAppPuppetCamp SEA 1 - Puppet Deployment  at OnApp
PuppetCamp SEA 1 - Puppet Deployment at OnApp
Ā 
Puppet Deployment at OnApp
Puppet Deployment at OnApp Puppet Deployment at OnApp
Puppet Deployment at OnApp
Ā 
Preparing for java 9 modules upload
Preparing for java 9 modules uploadPreparing for java 9 modules upload
Preparing for java 9 modules upload
Ā 
Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3Staging Drupal 8 31 09 1 3
Staging Drupal 8 31 09 1 3
Ā 
Drupal development
Drupal development Drupal development
Drupal development
Ā 
Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7 Introduction And Basics of Modules in Drupal 7
Introduction And Basics of Modules in Drupal 7
Ā 

More from Martin Alfke

CfgMgmtCamp 2023 - Puppet is YAML.pdf
CfgMgmtCamp 2023 - Puppet is YAML.pdfCfgMgmtCamp 2023 - Puppet is YAML.pdf
CfgMgmtCamp 2023 - Puppet is YAML.pdf
Martin Alfke
Ā 
HashiTalksDACH-Terraform-Managing training instances in the Cloud
HashiTalksDACH-Terraform-Managing training instances in the CloudHashiTalksDACH-Terraform-Managing training instances in the Cloud
HashiTalksDACH-Terraform-Managing training instances in the Cloud
Martin Alfke
Ā 
PuppetCamp2021-Testing Modules and ControlRepo.pdf
PuppetCamp2021-Testing Modules and ControlRepo.pdfPuppetCamp2021-Testing Modules and ControlRepo.pdf
PuppetCamp2021-Testing Modules and ControlRepo.pdf
Martin Alfke
Ā 
Puppet Camp Germany 2020 - Puppet Control Repo and GIT
Puppet Camp Germany 2020 - Puppet Control Repo and GITPuppet Camp Germany 2020 - Puppet Control Repo and GIT
Puppet Camp Germany 2020 - Puppet Control Repo and GIT
Martin Alfke
Ā 
DevOps - How to get technical buy in
DevOps - How to get technical buy inDevOps - How to get technical buy in
DevOps - How to get technical buy in
Martin Alfke
Ā 
ADDO 2019 DevOps in a containerized world
ADDO 2019 DevOps in a containerized worldADDO 2019 DevOps in a containerized world
ADDO 2019 DevOps in a containerized world
Martin Alfke
Ā 
OpenRheinRuhr 2018 - Ops hates containers! Why?
OpenRheinRuhr 2018 - Ops hates containers! Why?OpenRheinRuhr 2018 - Ops hates containers! Why?
OpenRheinRuhr 2018 - Ops hates containers! Why?
Martin Alfke
Ā 
PuppetConf 2016 Moving from Exec to Types and Provides
PuppetConf 2016 Moving from Exec to Types and ProvidesPuppetConf 2016 Moving from Exec to Types and Provides
PuppetConf 2016 Moving from Exec to Types and Provides
Martin Alfke
Ā 
Puppet Camp Paris 2016 Data in Modules
Puppet Camp Paris 2016 Data in ModulesPuppet Camp Paris 2016 Data in Modules
Puppet Camp Paris 2016 Data in Modules
Martin Alfke
Ā 
Power of Puppet 4
Power of Puppet 4Power of Puppet 4
Power of Puppet 4
Martin Alfke
Ā 
Upgrading Puppet CommitterConf Essen 2014
Upgrading Puppet CommitterConf Essen 2014Upgrading Puppet CommitterConf Essen 2014
Upgrading Puppet CommitterConf Essen 2014
Martin Alfke
Ā 
GUUG Hamburg OpenNebula
GUUG Hamburg OpenNebulaGUUG Hamburg OpenNebula
GUUG Hamburg OpenNebula
Martin Alfke
Ā 
Puppet camp london-modulerewritingsmartway
Puppet camp london-modulerewritingsmartwayPuppet camp london-modulerewritingsmartway
Puppet camp london-modulerewritingsmartway
Martin Alfke
Ā 
One
OneOne
Puppet future parser
Puppet future parserPuppet future parser
Puppet future parser
Martin Alfke
Ā 
Gluster fs buero20_presentation
Gluster fs buero20_presentationGluster fs buero20_presentation
Gluster fs buero20_presentation
Martin Alfke
Ā 
Puppet buero20 presentation
Puppet buero20 presentationPuppet buero20 presentation
Puppet buero20 presentation
Martin Alfke
Ā 

More from Martin Alfke (17)

CfgMgmtCamp 2023 - Puppet is YAML.pdf
CfgMgmtCamp 2023 - Puppet is YAML.pdfCfgMgmtCamp 2023 - Puppet is YAML.pdf
CfgMgmtCamp 2023 - Puppet is YAML.pdf
Ā 
HashiTalksDACH-Terraform-Managing training instances in the Cloud
HashiTalksDACH-Terraform-Managing training instances in the CloudHashiTalksDACH-Terraform-Managing training instances in the Cloud
HashiTalksDACH-Terraform-Managing training instances in the Cloud
Ā 
PuppetCamp2021-Testing Modules and ControlRepo.pdf
PuppetCamp2021-Testing Modules and ControlRepo.pdfPuppetCamp2021-Testing Modules and ControlRepo.pdf
PuppetCamp2021-Testing Modules and ControlRepo.pdf
Ā 
Puppet Camp Germany 2020 - Puppet Control Repo and GIT
Puppet Camp Germany 2020 - Puppet Control Repo and GITPuppet Camp Germany 2020 - Puppet Control Repo and GIT
Puppet Camp Germany 2020 - Puppet Control Repo and GIT
Ā 
DevOps - How to get technical buy in
DevOps - How to get technical buy inDevOps - How to get technical buy in
DevOps - How to get technical buy in
Ā 
ADDO 2019 DevOps in a containerized world
ADDO 2019 DevOps in a containerized worldADDO 2019 DevOps in a containerized world
ADDO 2019 DevOps in a containerized world
Ā 
OpenRheinRuhr 2018 - Ops hates containers! Why?
OpenRheinRuhr 2018 - Ops hates containers! Why?OpenRheinRuhr 2018 - Ops hates containers! Why?
OpenRheinRuhr 2018 - Ops hates containers! Why?
Ā 
PuppetConf 2016 Moving from Exec to Types and Provides
PuppetConf 2016 Moving from Exec to Types and ProvidesPuppetConf 2016 Moving from Exec to Types and Provides
PuppetConf 2016 Moving from Exec to Types and Provides
Ā 
Puppet Camp Paris 2016 Data in Modules
Puppet Camp Paris 2016 Data in ModulesPuppet Camp Paris 2016 Data in Modules
Puppet Camp Paris 2016 Data in Modules
Ā 
Power of Puppet 4
Power of Puppet 4Power of Puppet 4
Power of Puppet 4
Ā 
Upgrading Puppet CommitterConf Essen 2014
Upgrading Puppet CommitterConf Essen 2014Upgrading Puppet CommitterConf Essen 2014
Upgrading Puppet CommitterConf Essen 2014
Ā 
GUUG Hamburg OpenNebula
GUUG Hamburg OpenNebulaGUUG Hamburg OpenNebula
GUUG Hamburg OpenNebula
Ā 
Puppet camp london-modulerewritingsmartway
Puppet camp london-modulerewritingsmartwayPuppet camp london-modulerewritingsmartway
Puppet camp london-modulerewritingsmartway
Ā 
One
OneOne
One
Ā 
Puppet future parser
Puppet future parserPuppet future parser
Puppet future parser
Ā 
Gluster fs buero20_presentation
Gluster fs buero20_presentationGluster fs buero20_presentation
Gluster fs buero20_presentation
Ā 
Puppet buero20 presentation
Puppet buero20 presentationPuppet buero20 presentation
Puppet buero20 presentation
Ā 

developing sysadmin, sysadmining developersGuug devops puppet

  • 1. developing sysadmin - sysadmining developers develop your platform and your application management GUUG Berlin 01.11.2012 Martin Alfke <martin.alfke@buero20.org> Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 2. Agenda puppet environments puppet modules puppet templates puppet and augeas puppet multi master puppet without master Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 3. Environments ā€œadminā€™s and devā€™s cooperate!ā€ Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 4. Environments ā€¢ Split up modules into several repositories ā€¢ ā€œproductionā€ is default and always there ā€¢ Naming is abritrary ā€¢ Master needs to know about environments ā€¢ Client needs to send environment information Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 5. Environments ā€¢ puppet.conf [master] [test] manifest = /etc/puppet/test/manifests/site.pp modulepath = /etc/puppet/test/modules [mailteam] manifest = /etc/puppet/mail/manifests/site.pp modulepath = /etc/puppet/mail/modules [agent] environment = test Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 6. Environments ā€¢ Each environment may have multiple modulepaths [master] [test] manifest = /etc/puppet/test/manifests/site.pp modulepath = /etc/puppet/test/modules:/data/puppet/team/test/modules [mailteam] manifest = /etc/puppet/mail/manifests/site.pp modulepath = /etc/puppet/mail/modules:/data/puppet/team/core/modules Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 7. Modules ā€œplug things together simpleā€ Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 8. Modules ā€¢ Difference between modules and classes ā€¢ Module: ā€¢ strict directory naming for autoloading ā€¢ each module has at least one class ā€¢ Class: ā€¢ available but not applied automatically Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 9. Modules ā€¢ directory structure /etc/puppet/test/modules/ <-- modulepath apache/ <-- modulename manifests/ <-- manifests path within module init.pp <-- initial class fetched from autoloader server.pp <-- additional class(es) ļ¬les/ <-- directory for module ļ¬le serving templates/ <-- directory for module templates lib/ <-- directory for facts or functions tests/ <-- directory for tests during develop Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 10. Modules ā€¢ class, ļ¬le and template naming structure /etc/puppet/test/modules/ apache/ manifests/ init.pp <-- class apache { ... } server.pp <-- class apache::server {Ā ... } ļ¬les/ <-- ā€œpuppet:///modules/apache/<ļ¬lename>ā€ templates/ <-- template(ā€˜apache/<ļ¬lename>ā€™) lib/ tests/ Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 11. Modules ā€¢ class structure class apache { package { ā€˜apache2ā€™: ensure => present, } ļ¬le { ā€˜/etc/apache2/apache2.confā€™: content => template(ā€˜apache/apache2.conf.erbā€™), } ļ¬le { ā€˜/etc/apache2/conf.d/charsetā€™: source => ā€˜puppet:///modules/apache/charsetā€™, } service { ā€˜apache2ā€™: ensure => running, } } Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 12. Modules ā€¢ use classes node ā€˜www01.domain.tldā€™ { class {Ā ā€˜apacheā€™: } <-- old: include apache } Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 13. Modules ā€¢ resources, classes, parameterized classes resource_type { ā€˜titleā€™: attribute => value, } class <title> { ... } class <title> ( $variable = value) { ... } class { ā€˜<title>ā€™: } class { ā€˜<title>ā€™: variable => value, } Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 14. Modules ā€¢ using ruby in classes /etc/puppet/test/modules/apache/manifests/init.rb hostclass :apache do package :apache2, :ensure => present package :libapache2-php, :ensure => present service :apache2, :ensure => running end Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 15. Templates ā€œcode your conļ¬gā€ Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 16. Templates ā€¢ Ruby ERB template engine ā€¢ Normally requires in-depth conļ¬guration review ā€¢ Be aware of variable scoping ! Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 17. Templates ā€¢ use variables from puppet in templates $ntpserver = ā€˜10.2.3.4ā€™ ļ¬le { ā€˜/etc/ntp.confā€™: content => template(ā€˜ntp/ntp.conf.erbā€™), } # ntp.conf.erb <% if @ntpserver %> <-- old: if has_variable(ā€˜ntpserverā€™) server <%= @ntpserver %> <-- @ syntax is new. uses current scope <% else %> server pool.ntp.org <% end %> Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 18. Augeas ā€œclean your lensesā€ Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 19. Augeas ā€¢ Make changes to single lines ā€¢ Do not manage the complete conļ¬guration ļ¬le in puppet Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 20. Augeas ā€¢ augeas uses lenses to split up conļ¬g ļ¬les augtool print /ļ¬les/etc/sysctl.conf augtool set net.ipv4.forward 1 augeas { ā€˜set_ipv4_forwardā€™: context => ā€˜/ļ¬les/etc/sysctl.confā€™, changes => ā€œset net.ipv4.forward 1ā€, } Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 21. Augeas ā€¢ Attention! ā€¢ Not all conļ¬guration ļ¬les are supported ! ā€¢ Augeas needs key-value pairs ā€¢ Within puppet ruby-augeas extension is required Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 22. Multi Master ā€œno one can serve two masters!ā€ Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 23. Multi Master ā€¢ Load-Balancing with SSL separation ā€¢ several Data Center ā€¢ do you really have more than 1000 nodes? Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 24. Multi Master ā€¢ separate puppet ca and puppet master puppet.conf on puppet ca (single instance) [master] ca = true puppet.conf on puppet master [master] ca = false puppet.conf on agent [agent] ca_server = <puppet ca> server = <puppet master> Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 25. Multi Master ā€¢ use multiple master (without ca) ā€¢ apache/nginx and loadbalancing ā€¢ ipvsadm Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 26. Multi Master ā€¢ use multiple master (without ca) ā€¢ pros: ā€¢ ļ¬le serving handled better ā€¢ more masters compile catalogs ā€¢ cons: ā€¢ single ca only Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 27. Multi Master ā€¢ avoid multiple masters ā€¢ use templates ! ā€¢ templates are generated on the master during catalog compilation ā€¢ ļ¬les needs to get fetched by the nodes ā€¢ use mod_passenger Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 28. without Master ā€œyou shall have no masterā€ Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 29. without Master ā€¢ Pre-compile catalogs ā€¢ Run puppet apply locally Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 30. without Master ā€¢ Very large environment (>15.000 nodes) ā€¢ Multiple locations world wide Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 31. without Master ā€¢ Compile catalogs for all nodes on master ā€¢ puppet master compile <fqdn> ā€¢ Copy catalogs to nodes to execute them ā€¢ puppet apply --catalog <catalog ļ¬le name> Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 32. without Master ā€¢ Pros: ā€¢ no dedicated master, catalog compilation may take place everywhere ā€¢ Cons: ā€¢ no modules !! ā€¢ ļ¬leserving has to be done locally (e.g. NFS mount) Environments - Modules - Templates - Augeas - Master - Masterless Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 33. developing sysadmin - sysadmining developers Wait ! There is more ! Martin Alfke <martin.alfke@buero20.org> Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 34. ENC and Hiera ā€œdata, data, dataā€ ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 35. ENC and Hiera ā€¢ External Nodes Classiļ¬er ā€¢ executable with one parameter (fqdn) ā€¢ can be anything ā€¢ get info from ļ¬lesystem: cat $1.yaml ā€¢ get info from inventory database ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 36. ENC and Hiera ā€¢ ENC in puppet /etc/puppet/puppet.conf [master] node_terminus = exec external_nodes = /etc/puppet/bin/my_great_enc.exe ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 37. ENC and Hiera ā€¢ /etc/puppet/bin/my_great_enc.exe www1.domain.tld --- parameters: location: de-ber2 classes: ntp: ntpserver: 10.2.2.2 apache: mysql: environment: production ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 38. ENC and Hiera ā€¢ Hiera - hierarchial data structure ā€¢ built in into Puppet 3.x ā€¢ add-on in Puppet 2.7.x ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 39. ENC and Hiera ā€¢ Hiera conļ¬guration /etc/puppet/hiera.yaml :hierarchy: - %{operatingsystem} - common - %{datacenter} - %{serverfunction} :backends: - yaml :yaml: :datadir: ā€˜/etc/puppet/hieradataā€™ ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 40. ENC and Hiera ā€¢ Hiera data /etc/puppet/hieradata/debian.yaml --- ssh_packages: - ā€˜openssh-serverā€™ - ā€˜openssh-clientā€™ - ā€˜openssh-blacklistā€™ /etc/puppet/hieradata/centos.yaml --- ssh_packages: - ā€˜opensshā€™ - ā€˜openssh-clientsā€™ - ā€˜openssh-serverā€™ ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 41. ENC and Hiera ā€¢ Hiera usage /etc/puppet/modules/ssh/manifests/init.pp class ssh { $ssh_packages = hiera(ā€˜ssh_packagesā€™) package { ā€œ${ssh_packages}ā€: ensure => present } } ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 42. PuppetDB ā€œgetting it allā€ ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 43. PuppetDB ā€¢ Used for storeconļ¬gs and exported resources ā€¢ Schema for PostgreSQL ā€¢ Will get more features soon ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 44. Dashboard ā€œmanagement needs graphsā€ ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 45. Dashboard ā€¢ Open Source Dashboard is dead end ā€¢ PuppetLabs is working on two other tools ENC and Hiera - Puppet DB - Dashboard Ā© Martin Alfke - 2012 Freitag, 2. November 12
  • 46. developing sysadmin - sysadmining developers Questions? Martin Alfke <martin.alfke@buero20.org> Ā© Martin Alfke - 2012 Freitag, 2. November 12