SlideShare una empresa de Scribd logo
1 de 30
Descargar para leer sin conexión
Programmare Infrastrutture IT con Puppet
                                           Alessandro Franceschi / Lab42
Infrastructure progressio
cum Puppet
IT Infrastructures development with Puppet
                                  Alessandro Franceschi / Lab42
                                        CodeMotion 2012 Roma


                  Creative Commons BY-NC-SA 3.0
From Ops
to DevOps
Tempus fugit
Flexible... elastic... scalable
What’s behind these cloudy words?
Panta rei
Automation is a matter of survival
Alea iacta est
Ops like automation!
                  ( since Bourne shell ... )
Errare
humanum est
From a bunch of custom scripts
             to Standard Integrated Tools
Factotum




Have you heard about this Puppet|Chef | CfEngine stuff?
Doctum doces
Infrastructure as code
Scripta manent,
verba volant
Servers Infrastructure Change under...
                          version control!
Repetitia iuvant
Code behaves always in the same way:
                      Consistent setups
Ignorantia legis
non excusat
Code can be tested.
                  Infrastructure Code too.
Masters
of Puppet
Gratis
OpenSource from www.puppetlabs.com
Cui prodest?




   Source: www.puppetlabs.com
Divide et Impera
Many Puppet nodes                                            One Puppet Master




Clients
User: root
Process: /usr/bin/ruby /usr/sbin/puppetd -t


                                                                         Server
                                                                   User: puppet
                                 Process: /usr/bin/ruby /usr/sbin/puppetmasterd
                                                       Listen: TCP 0.0.0.0:8140
package { 'openssh-server':

Status Quo               }
                             ensure => present,
                             before => File['/etc/ssh/sshd_config'],


A declarative language   file { '/etc/ssh/sshd_config':
                             ensure => file,
                             mode   => 600,
                             source => '/root/learning-manifests/sshd_config',
                         }

                         service { 'sshd':
                             ensure     => running,
                             enable     => true,
                             subscribe => File['/etc/ssh/sshd_config'],
                         }
Veni vidi vici
Ex Aequo
Operating System Abstraction
Deus
Ex
Machina

# This File is Managed by Puppet
Mater semper
 certa est,
 pater nunquam
 O: Who changed that file?!




info: Filebucket[/var/lib/puppet/clientbucket]: Adding /etc/
resolv.conf(d7fbc1695489ce896d30b7b04d72887c)
info: //test/File[/etc/resolv.conf]: Filebucketed /etc/resolv.conf to main with sum
d7fbc1695489ce896d30b7b04d72887c

Old file is copied in:
/var/lib/puppet/clientbucket/d/7/f/b/c/1/6/9/d7fbc1695489ce896d30b7b04d72887c/content
Enough graphics, show me some


  Puppet code!
Nodes definitions
 In Puppet code:                 On an External Node Classifier (ENC)
 /etc/puppet/manifests/site.pp

 node 'prod-fep-1' {
     $status = "prod"
     include role_fep
 }

 node 'prod-fep-2' {                              The Foreman
     $status = "prod"
     include role_fep
 }

 node 'test-fep-1' {
     $status = "test"
     include role_fep
 }
                                            Puppet Dashboard
 node 'dev-fep-1' {
     $status = "dev"
     include role_fep
 }

 [...]

                                 Puppet Enterprise Console
Classes (collections of resources)
 class role_fep {
     $role="fep"

     include general # We see it in the next slide

     include apache
     include php::pear
     include php::dev
     include php::oci8
     apache::module { "rewrite": }
     apache::module { "proxy": templatefile => "proxy.conf.erb" }
     php::module { "gd": }
     php::pear::module { "apc": }
     php::pear::module { "XML_Serializer": use_package => "no" }
     php::pecl::config { "http_proxy": value => "$proxy_server" }
     [...]

     # Sample custom files
     file { ‘/data’:
         ensure => directory,
     }
     file { ‘/data/www’:
         ensure => $::operatingsystem ? {
            /(?i:Centos|RedHat|Scientific|Fedora)/ => ‘/var/www/html’,
            /(?i:Debian|Ubuntu|Mint)/              => ‘/var/www’,
         },
         require => File[‘/data’]:
     }
 }
Classes ( a baseline common to all nodes )
 class general {

     include   puppet
     include   users
     include   openssh
     include   hosts
     include   resolver
     include   sudo
     include   snmpd
     include   nrpe
     include   munin

     case $::operatingsystem {
         ubuntu,debian: {
             include apt
             include exim
         }
         centos,redhat: {
             include yum
         }
         default: { }
     }

 }
Modules - Directory layout
  /etc/puppet/modules/ ($modulepath)

 apache/                      One Application, One Module, One class
 apache/manifests/
 apache/manifests/init.pp     Puppet Manifests ( code in the Puppet DSL )
 apache/manifests/module.pp

 apache/lib/
 apache/lib/puppet/
                             Puppet    extensions ( code in Ruby )
 apache/lib/puppet/parser/
 apache/lib/puppet/parser/functions
 apache/lib/puppet/provider/
 apache/lib/puppet/type/
 apache/lib/facter/

 apache/templates/            Erb Templates (files with dynamic content)
 apache/files/                Static files
 apache/spec/
 apache/spec/classes/         Rspec tests
 apache/spec/defines/

 apache/Modulefile            Module’s metadata for the Puppet Forge
 apache/README.md
Modules - Files autoloading

class autofs {

    package { autofs:
      ensure => present,
    }

    service { autofs:
      ensure => running,             Sourced (static) files are searched in:
      enable => true,                $modulepath/autofs/files/auto.homes
    }

    file { "auto.homes":
      path   => “/etc/auto.homes”,
      source => "puppet://$servername/modules/autofs/auto.homes"
    }

}

                             Templates (Ruby ERB) are searched in:
class autofs {               $modulepath/autofs/templates/auto.master.erb
    [...]

    file { "/etc/auto.master":
      content => template("autofs/auto.master.erb")
    }

}
LINKS
             for a better living



http://docs.puppetlabs.com/ - PuppetLabs documentation

http://planetpuppet.org/ - Planet Puppet - Feeds aggregator

http://puppetlabs.com/community/puppet-camp/ - PuppetCamps

https://bitly.com/wnvqaN - How to start with Puppet - Useful links

http://www.example42.com/ - Example42 Puppet modules ( disclaimer ;-)
DO UT DES



Automated Systems Setups
Coherent Infrastructure
Track and History of Change
Installations Replicability
                                                         A new language to learn
Quick propagation of changes
                                                      Effectiveness needs practice
Aligned Environments for Test/[...]/Prod
                                                   If there’s code , there are bugs
Automated monitoring
                                       Make Puppet the Enforcer not the Violator
                                             Discipline in Systems management
                                   More time to make things done (the first time)
                                        Great Power gives Great Responsibilities
ad maiora
               Questions?
                              Graphics:
@alvagante                  www.tatlin.net

Más contenido relacionado

La actualidad más candente

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
 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny PuppetAlessandro Franceschi
 
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Robert Nelson
 
Auto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag StyleAuto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag StyleRobert Nelson
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next levelAlessandro Franceschi
 
Puppet camp london-modulerewritingsmartway
Puppet camp london-modulerewritingsmartwayPuppet camp london-modulerewritingsmartway
Puppet camp london-modulerewritingsmartwayMartin Alfke
 
Puppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaPuppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaAlessandro Franceschi
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1Vishal Biyani
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)DECK36
 
Puppet for Sys Admins
Puppet for Sys AdminsPuppet for Sys Admins
Puppet for Sys AdminsPuppet
 
Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Puppet
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdminsPuppet
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayPuppet
 
Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Puppet
 

La actualidad más candente (20)

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?
 
Puppet evolutions
Puppet evolutionsPuppet evolutions
Puppet evolutions
 
Essential applications management with Tiny Puppet
Essential applications management with Tiny PuppetEssential applications management with Tiny Puppet
Essential applications management with Tiny Puppet
 
Puppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutesPuppet: From 0 to 100 in 30 minutes
Puppet: From 0 to 100 in 30 minutes
 
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
Enjoying the Journey from Puppet 3.x to Puppet 4.x (PuppetConf 2016)
 
Auto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag StyleAuto Deploy Deep Dive – vBrownBag Style
Auto Deploy Deep Dive – vBrownBag Style
 
Puppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops RollsPuppet Camp Dallas 2014: How Puppet Ops Rolls
Puppet Camp Dallas 2014: How Puppet Ops Rolls
 
Puppet control-repo 
to the next level
Puppet control-repo 
to the next levelPuppet control-repo 
to the next level
Puppet control-repo 
to the next level
 
Puppet camp london-modulerewritingsmartway
Puppet camp london-modulerewritingsmartwayPuppet camp london-modulerewritingsmartway
Puppet camp london-modulerewritingsmartway
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
Tp install anything
Tp install anythingTp install anything
Tp install anything
 
Python at Facebook
Python at FacebookPython at Facebook
Python at Facebook
 
Puppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - GenevaPuppet modules: A Holistic Approach - Geneva
Puppet modules: A Holistic Approach - Geneva
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1
 
Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)Our Puppet Story (Linuxtag 2014)
Our Puppet Story (Linuxtag 2014)
 
Puppet for Sys Admins
Puppet for Sys AdminsPuppet for Sys Admins
Puppet for Sys Admins
 
Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020Virtual Bolt Workshop - March 16, 2020
Virtual Bolt Workshop - March 16, 2020
 
Puppet for SysAdmins
Puppet for SysAdminsPuppet for SysAdmins
Puppet for SysAdmins
 
Virtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 MayVirtual Bolt Workshop - 6 May
Virtual Bolt Workshop - 6 May
 
Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020Virtual Bolt Workshop, 5 May 2020
Virtual Bolt Workshop, 5 May 2020
 

Similar a Developing IT infrastructures with Puppet

Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013grim_radical
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012Carlos Sanchez
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operationsgrim_radical
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasaggarrett honeycutt
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShellBoulos Dib
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceohadlevy
 
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesWorkflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesPuppet
 
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakWorkflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakNETWAYS
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011Carlos Sanchez
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOpsAgile Spain
 
Writing & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp BostonWriting & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp BostonPuppet
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestrationPaolo Tonin
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy Systemadrian_nye
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppetdelimiter
 
Introduction to puppet - Hands on Session at HPI Potsdam
Introduction to puppet - Hands on Session at HPI PotsdamIntroduction to puppet - Hands on Session at HPI Potsdam
Introduction to puppet - Hands on Session at HPI PotsdamChristoph Oelmüller
 

Similar a Developing IT infrastructures with Puppet (20)

Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012From Dev to DevOps - Codemotion ES 2012
From Dev to DevOps - Codemotion ES 2012
 
Puppet quick start guide
Puppet quick start guidePuppet quick start guide
Puppet quick start guide
 
PuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into OperationsPuppetDB: Sneaking Clojure into Operations
PuppetDB: Sneaking Clojure into Operations
 
20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag20090514 Introducing Puppet To Sasag
20090514 Introducing Puppet To Sasag
 
Puppet
PuppetPuppet
Puppet
 
Introduction to PowerShell
Introduction to PowerShellIntroduction to PowerShell
Introduction to PowerShell
 
A Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conferenceA Presentation about Puppet that I've made at the OSSPAC conference
A Presentation about Puppet that I've made at the OSSPAC conference
 
Workflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large EnterprisesWorkflow story: Theory versus practice in Large Enterprises
Workflow story: Theory versus practice in Large Enterprises
 
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin PiebiakWorkflow story: Theory versus Practice in large enterprises by Marcin Piebiak
Workflow story: Theory versus Practice in large enterprises by Marcin Piebiak
 
From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011From Dev to DevOps - ApacheCON NA 2011
From Dev to DevOps - ApacheCON NA 2011
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
 
Puppet_training
Puppet_trainingPuppet_training
Puppet_training
 
Writing & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp BostonWriting & Sharing Great Modules - Puppet Camp Boston
Writing & Sharing Great Modules - Puppet Camp Boston
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
 
A Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy SystemA Fabric/Puppet Build/Deploy System
A Fabric/Puppet Build/Deploy System
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppet
 
Introduction to puppet - Hands on Session at HPI Potsdam
Introduction to puppet - Hands on Session at HPI PotsdamIntroduction to puppet - Hands on Session at HPI Potsdam
Introduction to puppet - Hands on Session at HPI Potsdam
 

Más de Alessandro Franceschi

Más de Alessandro Franceschi (11)

Strategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoringStrategies for Puppet code upgrade and refactoring
Strategies for Puppet code upgrade and refactoring
 
DevOps - Evoluzione della specie - DevOps Heroes.pdf
DevOps - Evoluzione della specie - DevOps Heroes.pdfDevOps - Evoluzione della specie - DevOps Heroes.pdf
DevOps - Evoluzione della specie - DevOps Heroes.pdf
 
Tiny Puppet Can Install Everything. Prove me wrong!
Tiny Puppet Can Install Everything. Prove me wrong!Tiny Puppet Can Install Everything. Prove me wrong!
Tiny Puppet Can Install Everything. Prove me wrong!
 
ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!ReUse Your (Puppet) Modules!
ReUse Your (Puppet) Modules!
 
Ten years of [Puppet] installations. What now?
Ten years of [Puppet] installations. What now?Ten years of [Puppet] installations. What now?
Ten years of [Puppet] installations. What now?
 
Raise the bar! Reloaded
Raise the bar! ReloadedRaise the bar! Reloaded
Raise the bar! Reloaded
 
Raise the bar!
Raise the bar!Raise the bar!
Raise the bar!
 
Anatomy of a reusable module
Anatomy of a reusable moduleAnatomy of a reusable module
Anatomy of a reusable module
 
Puppet modules for Fun and Profit
Puppet modules for Fun and ProfitPuppet modules for Fun and Profit
Puppet modules for Fun and Profit
 
Spaghetti devops
Spaghetti devopsSpaghetti devops
Spaghetti devops
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
 

Último

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 

Último (20)

08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Developing IT infrastructures with Puppet

  • 1. Programmare Infrastrutture IT con Puppet Alessandro Franceschi / Lab42
  • 2. Infrastructure progressio cum Puppet IT Infrastructures development with Puppet Alessandro Franceschi / Lab42 CodeMotion 2012 Roma Creative Commons BY-NC-SA 3.0
  • 4. Tempus fugit Flexible... elastic... scalable What’s behind these cloudy words?
  • 5. Panta rei Automation is a matter of survival
  • 6. Alea iacta est Ops like automation! ( since Bourne shell ... )
  • 7. Errare humanum est From a bunch of custom scripts to Standard Integrated Tools
  • 8. Factotum Have you heard about this Puppet|Chef | CfEngine stuff?
  • 10. Scripta manent, verba volant Servers Infrastructure Change under... version control!
  • 11. Repetitia iuvant Code behaves always in the same way: Consistent setups
  • 12. Ignorantia legis non excusat Code can be tested. Infrastructure Code too.
  • 15. Cui prodest? Source: www.puppetlabs.com
  • 16. Divide et Impera Many Puppet nodes One Puppet Master Clients User: root Process: /usr/bin/ruby /usr/sbin/puppetd -t Server User: puppet Process: /usr/bin/ruby /usr/sbin/puppetmasterd Listen: TCP 0.0.0.0:8140
  • 17. package { 'openssh-server': Status Quo } ensure => present, before => File['/etc/ssh/sshd_config'], A declarative language file { '/etc/ssh/sshd_config': ensure => file, mode => 600, source => '/root/learning-manifests/sshd_config', } service { 'sshd': ensure => running, enable => true, subscribe => File['/etc/ssh/sshd_config'], }
  • 20. Deus Ex Machina # This File is Managed by Puppet
  • 21. Mater semper certa est, pater nunquam O: Who changed that file?! info: Filebucket[/var/lib/puppet/clientbucket]: Adding /etc/ resolv.conf(d7fbc1695489ce896d30b7b04d72887c) info: //test/File[/etc/resolv.conf]: Filebucketed /etc/resolv.conf to main with sum d7fbc1695489ce896d30b7b04d72887c Old file is copied in: /var/lib/puppet/clientbucket/d/7/f/b/c/1/6/9/d7fbc1695489ce896d30b7b04d72887c/content
  • 22. Enough graphics, show me some Puppet code!
  • 23. Nodes definitions In Puppet code: On an External Node Classifier (ENC) /etc/puppet/manifests/site.pp node 'prod-fep-1' { $status = "prod" include role_fep } node 'prod-fep-2' { The Foreman $status = "prod" include role_fep } node 'test-fep-1' { $status = "test" include role_fep } Puppet Dashboard node 'dev-fep-1' { $status = "dev" include role_fep } [...] Puppet Enterprise Console
  • 24. Classes (collections of resources) class role_fep { $role="fep" include general # We see it in the next slide include apache include php::pear include php::dev include php::oci8 apache::module { "rewrite": } apache::module { "proxy": templatefile => "proxy.conf.erb" } php::module { "gd": } php::pear::module { "apc": } php::pear::module { "XML_Serializer": use_package => "no" } php::pecl::config { "http_proxy": value => "$proxy_server" } [...] # Sample custom files file { ‘/data’: ensure => directory, } file { ‘/data/www’: ensure => $::operatingsystem ? { /(?i:Centos|RedHat|Scientific|Fedora)/ => ‘/var/www/html’, /(?i:Debian|Ubuntu|Mint)/ => ‘/var/www’, }, require => File[‘/data’]: } }
  • 25. Classes ( a baseline common to all nodes ) class general { include puppet include users include openssh include hosts include resolver include sudo include snmpd include nrpe include munin case $::operatingsystem { ubuntu,debian: { include apt include exim } centos,redhat: { include yum } default: { } } }
  • 26. Modules - Directory layout /etc/puppet/modules/ ($modulepath) apache/ One Application, One Module, One class apache/manifests/ apache/manifests/init.pp Puppet Manifests ( code in the Puppet DSL ) apache/manifests/module.pp apache/lib/ apache/lib/puppet/ Puppet extensions ( code in Ruby ) apache/lib/puppet/parser/ apache/lib/puppet/parser/functions apache/lib/puppet/provider/ apache/lib/puppet/type/ apache/lib/facter/ apache/templates/ Erb Templates (files with dynamic content) apache/files/ Static files apache/spec/ apache/spec/classes/ Rspec tests apache/spec/defines/ apache/Modulefile Module’s metadata for the Puppet Forge apache/README.md
  • 27. Modules - Files autoloading class autofs { package { autofs: ensure => present, } service { autofs: ensure => running, Sourced (static) files are searched in: enable => true, $modulepath/autofs/files/auto.homes } file { "auto.homes": path => “/etc/auto.homes”, source => "puppet://$servername/modules/autofs/auto.homes" } } Templates (Ruby ERB) are searched in: class autofs { $modulepath/autofs/templates/auto.master.erb [...] file { "/etc/auto.master": content => template("autofs/auto.master.erb") } }
  • 28. LINKS for a better living http://docs.puppetlabs.com/ - PuppetLabs documentation http://planetpuppet.org/ - Planet Puppet - Feeds aggregator http://puppetlabs.com/community/puppet-camp/ - PuppetCamps https://bitly.com/wnvqaN - How to start with Puppet - Useful links http://www.example42.com/ - Example42 Puppet modules ( disclaimer ;-)
  • 29. DO UT DES Automated Systems Setups Coherent Infrastructure Track and History of Change Installations Replicability A new language to learn Quick propagation of changes Effectiveness needs practice Aligned Environments for Test/[...]/Prod If there’s code , there are bugs Automated monitoring Make Puppet the Enforcer not the Violator Discipline in Systems management More time to make things done (the first time) Great Power gives Great Responsibilities
  • 30. ad maiora Questions? Graphics: @alvagante www.tatlin.net