SlideShare una empresa de Scribd logo
1 de 43
Descargar para leer sin conexión
Introduction to Puppet
The IT automation software
Ahmed Elgenedy
Cairo, January 2013
• Introduction
– What is Puppet?
– How Puppet Works?
• RAL - Resource Abstraction Layer
– Manifests, Resource Ordering
– Variables, Facts, Classes, and Modules
– More
• Templates
• Parameterized Classes
• Defined Types
• Master/Agent Puppet
– Serving a Real Configuration
• Introduction
– What is Puppet?
– How Puppet Works?
• RAL - Resource Abstraction Layer
– Manifests, Resource Ordering
– Variables, Facts, Classes, and Modules
– More
• Templates
• Parameterized Classes
• Defined Types
• Master/Agent Puppet
– Serving a Real Configuration
• IT automation software
• Helps system administrators manage infrastructure throughout its
lifecycle, from provisioning and configuration to patch
management and compliance
• Automate repetitive tasks, quickly deploy critical applications, and
proactively manage change, scaling from 10s of servers to 1000s,
• Available as both open source and commercial software
• Declarative, model-based approach to IT automation
1. Define the desired state of the infrastructure’s configuration
using Puppet’s declarative configuration language
2. Simulate configuration changes before applying
3. Enforce the deployed desired state automatically, correcting
any configuration drift
4. Report on the differences between actual and desired states
and any changes made enforcing the desired state
• Introduction
– What is Puppet?
– How Puppet Works?
• RAL - Resource Abstraction Layer
– Manifests, Resource Ordering
– Variables, Facts, Classes, and Modules
– More
• Templates
• Parameterized Classes
• Defined Types
• Master/Agent Puppet
– Serving a Real Configuration
• System’s configuration is a collection of resources
• Resources vary in size, complexity, and lifespan:
• For example:
– File
– User account
– Software package
– Running service
– Scheduled cron job
• Similar resources can be grouped into types
• RAL splits resources into:
– Types: high-level models
– Providers: platform-specificimplementations
• RAL lets you describe resources in a way that can apply to any
system
• Puppet starts with an understanding of what state a
resource should have
• To sync the resource, it uses the RAL to query the current state,
compares that against the desired state, to make any necessary
changes
•
• Every resource is an instance of a resource type:
– Identified by a title
– Has a number of attributes
– Each attribute has a value.
• Puppet ships with a tool called puppet resource
• Use the shell to query and modify your system
• Provide attribute=value pairs to modify the resource
• This includes creating it or destroying it
* Note that this command line assignment syntax differs from the Puppet
language’s normal attribute => value syntax
• Core types:
– notify, file, package
– service, exec, cron
– user, goup
• Core types cheat sheet
• Use “puppet describe –s”
• Puppet programs are called manifests
• Manifests use the .pp file extension
• The core of the Puppet language is the resource declaration
• Manifests can also use:
– Conditional statements
– Group resourcesinto collections
– Generate text with functions
– Reference code in other manifests
– … and do many other things
• Use puppet apply to apply a manifest on local system
• Before being applied, manifests get compiled into a catalog that
only represents resources and the order in which they need to be
synced
• Puppet might sync resources in any order
• The physical order of resources in a manifest doesn’t imply a
logical order
• When some resources depend on other resources, how do we tell
Puppet which ones go first?
• before and require make simple dependency relationships
• before is used in the earlier resource, and lists resources that
depend on it
• require is used in the later resource and lists the resources that it
depends on
• The arrows can point in either direction <- or ->
• Think of them as representing the flow of time
• $variables always start with a dollar sign
• Can be assigned with the = operator
• Can hold strings, numbers, special values (false, undef…), etc
• Unassigned variable value will be undef
• Inside strings, use ${variable}
• Variable can be assigned once in a given scope
• You can use variables as the value for any resource attribute, or as
the title of a resource
• Puppet builds pre-assigned variables
• Puppet ships with a tool called Facter, which formulates system
information into a set of variables
• Classes are singleton collections of resources that Puppet can
apply as a unit
• Classes are blocks of code that can be turned on or off
• Before you can use a class, you have to define it
• To build a class into the catalog, the class has to be declared
• Re-usable bundles of code and data
• Puppet autoloads manifests from the modules in its modulepath
• The modulepath is a colon-separated list of directories
• Let’s just convert that last class to a module…
• You can now include the class from any manifest, without having to
cut and paste anything
• my_module — This outermost directory’s name matches the name
of the module
– manifests/ — Contains all of the manifests in the module.
• init.pp — Contains a class definition. This class’s name must match the
module’s name
• other_class.pp — Contains other classes
• my_defined_type.pp — Contains defined types
– files/ — Contains files, managed nodes can download
– lib/ — Contains plugins, custom facts and custom types
– templates/ — Contains templates
• The Puppet Forge is a great place to start looking for modules
• Modules written by other users, Puppet employees and community
members
• Freely downloaded, modified, and reused
• Most of these modules are open source
• You can also contribute your own modules
• Install and manage modules from the Puppet Forge
• Templates
– ERB templates
– Ruby code can be added to plain text document
– Make your config files as flexible as your Puppet manifests
• Parameterized Classes
– Give a list of parameters when defining a class
• Defined Types
– Model repeatable chunksof configuration
• Introduction
– What is Puppet?
– How Puppet Works?
• RAL - Resource Abstraction Layer
– Manifests, Resource Ordering
– Variables, Facts, Classes, and Modules
– More
• Templates
• Parameterized Classes
• Defined Types
• Master/Agent Puppet
– Serving a Real Configuration
• Pull-based
• Agents are configured to periodically fetch a catalog and apply it
• Also, you can trigger it to run manually
• Puppet master server
– Owns the manifests
– Responsiblefor compilation
• Puppet agents:
– Don’t have to see any manifest files
at all
– Have no access to configuration
information
• We already built some useful classes
• All classes are available on the puppet master into
/etc/puppetlabs/puppet/modules
• But how do we choose which classes go into an agent’s catalog?
• Puppet master always loads the manifest file site.pp
• With Puppet Enterprise, it’s located by default at
/etc/puppetlabs/puppet/manifests/site.pp
• You can declare classes and resources in a node definition
• Fetches configurations from a master server
• Has two main modes:
– Daemon: fetch configurations every half-hour (default)
– Run once and quit (use the --test option)
• On Puppet master server
• Run Puppet agent again
• Learning Puppet
– http://docs.puppetlabs.com/learning/
Puppet - The IT automation software

Más contenido relacionado

La actualidad más candente

Object Oriented PHP Overview
Object Oriented PHP OverviewObject Oriented PHP Overview
Object Oriented PHP OverviewLarry Ball
 
Scala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud FoundryScala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud FoundryPray Desai
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java introkabirmahlotra
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to ScalaRahul Jain
 
Integrating Doctrine with Laravel
Integrating Doctrine with LaravelIntegrating Doctrine with Laravel
Integrating Doctrine with LaravelMark Garratt
 
Introduction to Python and Django
Introduction to Python and DjangoIntroduction to Python and Django
Introduction to Python and Djangosolutionstreet
 
Java annotations
Java annotationsJava annotations
Java annotationsSujit Kumar
 
GETTING STARTED WITH JAVA(beginner)
GETTING STARTED WITH JAVA(beginner)GETTING STARTED WITH JAVA(beginner)
GETTING STARTED WITH JAVA(beginner)HarshithaAllu
 
04 darwino concepts and utility classes
04   darwino concepts and utility classes04   darwino concepts and utility classes
04 darwino concepts and utility classesdarwinodb
 
GeekAustin PHP Class - Session 6
GeekAustin PHP Class - Session 6GeekAustin PHP Class - Session 6
GeekAustin PHP Class - Session 6jimbojsb
 
Asset Pipeline
Asset PipelineAsset Pipeline
Asset PipelineEric Berry
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmerselliando dias
 
An Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional ParadigmsAn Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional ParadigmsMiles Sabin
 

La actualidad más candente (20)

Automation using Puppet 3
Automation using Puppet 3 Automation using Puppet 3
Automation using Puppet 3
 
Object Oriented PHP Overview
Object Oriented PHP OverviewObject Oriented PHP Overview
Object Oriented PHP Overview
 
Presentation on java
Presentation  on  javaPresentation  on  java
Presentation on java
 
Lambdas in Java 8
Lambdas in Java 8Lambdas in Java 8
Lambdas in Java 8
 
Scala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud FoundryScala, Play 2.0 & Cloud Foundry
Scala, Play 2.0 & Cloud Foundry
 
Basic info on java intro
Basic info on java introBasic info on java intro
Basic info on java intro
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Comp102 lec 3
Comp102   lec 3Comp102   lec 3
Comp102 lec 3
 
Java 8 features
Java 8 featuresJava 8 features
Java 8 features
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 
Integrating Doctrine with Laravel
Integrating Doctrine with LaravelIntegrating Doctrine with Laravel
Integrating Doctrine with Laravel
 
Introduction to Python and Django
Introduction to Python and DjangoIntroduction to Python and Django
Introduction to Python and Django
 
Java annotations
Java annotationsJava annotations
Java annotations
 
GETTING STARTED WITH JAVA(beginner)
GETTING STARTED WITH JAVA(beginner)GETTING STARTED WITH JAVA(beginner)
GETTING STARTED WITH JAVA(beginner)
 
04 darwino concepts and utility classes
04   darwino concepts and utility classes04   darwino concepts and utility classes
04 darwino concepts and utility classes
 
GeekAustin PHP Class - Session 6
GeekAustin PHP Class - Session 6GeekAustin PHP Class - Session 6
GeekAustin PHP Class - Session 6
 
Asset Pipeline
Asset PipelineAsset Pipeline
Asset Pipeline
 
Clojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp ProgrammersClojure - An Introduction for Lisp Programmers
Clojure - An Introduction for Lisp Programmers
 
Helberg acl-final
Helberg acl-finalHelberg acl-final
Helberg acl-final
 
An Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional ParadigmsAn Introduction to Scala - Blending OO and Functional Paradigms
An Introduction to Scala - Blending OO and Functional Paradigms
 

Destacado

Building self-service on demand infrastructure with Puppet and VMware
Building self-service on demand infrastructure with Puppet and VMwareBuilding self-service on demand infrastructure with Puppet and VMware
Building self-service on demand infrastructure with Puppet and VMwarePuppet
 
UK Spectrum Policy Forum - Tony Lavender, Plum Consulting - Update from Clust...
UK Spectrum Policy Forum - Tony Lavender, Plum Consulting - Update from Clust...UK Spectrum Policy Forum - Tony Lavender, Plum Consulting - Update from Clust...
UK Spectrum Policy Forum - Tony Lavender, Plum Consulting - Update from Clust...techUK
 
Penilaian hasil belajar
Penilaian hasil belajarPenilaian hasil belajar
Penilaian hasil belajarBambang Bee
 
Mejorar la calidad del profesorado
Mejorar la calidad del profesoradoMejorar la calidad del profesorado
Mejorar la calidad del profesoradoCecibelGuzman
 
Burning bright without burning out
Burning bright without burning outBurning bright without burning out
Burning bright without burning outPaul D. Casey
 
How to do primordial sound meditation
How to do primordial sound meditationHow to do primordial sound meditation
How to do primordial sound meditationJitender K Sahdev
 
Evidens pbs-matematik-tahun-2-b2 d2e1-nombor-bulat
Evidens pbs-matematik-tahun-2-b2 d2e1-nombor-bulatEvidens pbs-matematik-tahun-2-b2 d2e1-nombor-bulat
Evidens pbs-matematik-tahun-2-b2 d2e1-nombor-bulatChe Wan
 
Questions to Pack in Your Self-Leadership Backpack Before Heading to Work
Questions to Pack in Your Self-Leadership Backpack Before Heading to WorkQuestions to Pack in Your Self-Leadership Backpack Before Heading to Work
Questions to Pack in Your Self-Leadership Backpack Before Heading to WorkPaul D. Casey
 
Vision is C'ing Future Success
Vision is C'ing Future SuccessVision is C'ing Future Success
Vision is C'ing Future SuccessPaul D. Casey
 
Concepts of inno-techno-science
Concepts of inno-techno-scienceConcepts of inno-techno-science
Concepts of inno-techno-scienceVladimir Fedorov
 
You Can Be a Change-Agent
You Can Be a Change-AgentYou Can Be a Change-Agent
You Can Be a Change-AgentPaul D. Casey
 
Civilizaciones antiguas
Civilizaciones antiguas Civilizaciones antiguas
Civilizaciones antiguas Omar Mug
 
Cach phan biet giay huong dan mua hang-bao quan giay
Cach phan biet giay huong dan mua hang-bao quan giayCach phan biet giay huong dan mua hang-bao quan giay
Cach phan biet giay huong dan mua hang-bao quan giayGiày Chính Hãng
 

Destacado (20)

Infrastructure as Code with Chef / Puppet
Infrastructure as Code with Chef / PuppetInfrastructure as Code with Chef / Puppet
Infrastructure as Code with Chef / Puppet
 
SCM PPT
SCM PPTSCM PPT
SCM PPT
 
Building self-service on demand infrastructure with Puppet and VMware
Building self-service on demand infrastructure with Puppet and VMwareBuilding self-service on demand infrastructure with Puppet and VMware
Building self-service on demand infrastructure with Puppet and VMware
 
Intro to-puppet
Intro to-puppetIntro to-puppet
Intro to-puppet
 
UK Spectrum Policy Forum - Tony Lavender, Plum Consulting - Update from Clust...
UK Spectrum Policy Forum - Tony Lavender, Plum Consulting - Update from Clust...UK Spectrum Policy Forum - Tony Lavender, Plum Consulting - Update from Clust...
UK Spectrum Policy Forum - Tony Lavender, Plum Consulting - Update from Clust...
 
Penilaian hasil belajar
Penilaian hasil belajarPenilaian hasil belajar
Penilaian hasil belajar
 
Primordial sound meditation
Primordial sound meditationPrimordial sound meditation
Primordial sound meditation
 
Mejorar la calidad del profesorado
Mejorar la calidad del profesoradoMejorar la calidad del profesorado
Mejorar la calidad del profesorado
 
Burning bright without burning out
Burning bright without burning outBurning bright without burning out
Burning bright without burning out
 
Agile PMO - Portfolio Agile and Lean - Michael Nir
Agile PMO - Portfolio Agile and Lean - Michael NirAgile PMO - Portfolio Agile and Lean - Michael Nir
Agile PMO - Portfolio Agile and Lean - Michael Nir
 
How to do primordial sound meditation
How to do primordial sound meditationHow to do primordial sound meditation
How to do primordial sound meditation
 
Evidens pbs-matematik-tahun-2-b2 d2e1-nombor-bulat
Evidens pbs-matematik-tahun-2-b2 d2e1-nombor-bulatEvidens pbs-matematik-tahun-2-b2 d2e1-nombor-bulat
Evidens pbs-matematik-tahun-2-b2 d2e1-nombor-bulat
 
Questions to Pack in Your Self-Leadership Backpack Before Heading to Work
Questions to Pack in Your Self-Leadership Backpack Before Heading to WorkQuestions to Pack in Your Self-Leadership Backpack Before Heading to Work
Questions to Pack in Your Self-Leadership Backpack Before Heading to Work
 
Php3city - ownClod
Php3city - ownClodPhp3city - ownClod
Php3city - ownClod
 
Vision is C'ing Future Success
Vision is C'ing Future SuccessVision is C'ing Future Success
Vision is C'ing Future Success
 
Concepts of inno-techno-science
Concepts of inno-techno-scienceConcepts of inno-techno-science
Concepts of inno-techno-science
 
You Can Be a Change-Agent
You Can Be a Change-AgentYou Can Be a Change-Agent
You Can Be a Change-Agent
 
Mode2 251013
Mode2 251013Mode2 251013
Mode2 251013
 
Civilizaciones antiguas
Civilizaciones antiguas Civilizaciones antiguas
Civilizaciones antiguas
 
Cach phan biet giay huong dan mua hang-bao quan giay
Cach phan biet giay huong dan mua hang-bao quan giayCach phan biet giay huong dan mua hang-bao quan giay
Cach phan biet giay huong dan mua hang-bao quan giay
 

Similar a Puppet - The IT automation software

Puppet Fundamentals Talk at DevOps Dubai by Hameedullah Khan
Puppet Fundamentals Talk at DevOps Dubai by Hameedullah KhanPuppet Fundamentals Talk at DevOps Dubai by Hameedullah Khan
Puppet Fundamentals Talk at DevOps Dubai by Hameedullah KhanHameedullah Khan
 
Integrating the Solr search engine
Integrating the Solr search engineIntegrating the Solr search engine
Integrating the Solr search engineth0masr
 
Introduction to Design Patterns in Javascript
Introduction to Design Patterns in JavascriptIntroduction to Design Patterns in Javascript
Introduction to Design Patterns in JavascriptSanthosh Kumar Srinivasan
 
Lucene for Solr Developers
Lucene for Solr DevelopersLucene for Solr Developers
Lucene for Solr DevelopersErik Hatcher
 
web programming Unit VI PPT by Bhavsingh Maloth
web programming Unit VI PPT  by Bhavsingh Malothweb programming Unit VI PPT  by Bhavsingh Maloth
web programming Unit VI PPT by Bhavsingh MalothBhavsingh Maloth
 
PuppetConf 2017: Custom Types & Providers: Modeling Modern REST Interfaces an...
PuppetConf 2017: Custom Types & Providers: Modeling Modern REST Interfaces an...PuppetConf 2017: Custom Types & Providers: Modeling Modern REST Interfaces an...
PuppetConf 2017: Custom Types & Providers: Modeling Modern REST Interfaces an...Puppet
 
Lucene for Solr Developers
Lucene for Solr DevelopersLucene for Solr Developers
Lucene for Solr DevelopersErik Hatcher
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...garrett honeycutt
 
Iterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design patternIterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design patternNitin Bhide
 
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Bootstrapping Puppet and Application Deployment - PuppetConf 2013Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Bootstrapping Puppet and Application Deployment - PuppetConf 2013Puppet
 
Puppet & Perforce: Versioning Everything for Deployments
Puppet & Perforce: Versioning Everything for DeploymentsPuppet & Perforce: Versioning Everything for Deployments
Puppet & Perforce: Versioning Everything for DeploymentsPerforce
 
Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Tjarda Peelen
 
Ei cakephp
Ei cakephpEi cakephp
Ei cakephpeiei lay
 
Puppet camp london nov 2014 slides (1)
Puppet camp london nov 2014   slides (1)Puppet camp london nov 2014   slides (1)
Puppet camp london nov 2014 slides (1)Puppet
 
Lucene Bootcamp - 2
Lucene Bootcamp - 2Lucene Bootcamp - 2
Lucene Bootcamp - 2GokulD
 
Mule concepts transformers
Mule concepts transformersMule concepts transformers
Mule concepts transformerskunal vishe
 

Similar a Puppet - The IT automation software (20)

Puppet Fundamentals Talk at DevOps Dubai by Hameedullah Khan
Puppet Fundamentals Talk at DevOps Dubai by Hameedullah KhanPuppet Fundamentals Talk at DevOps Dubai by Hameedullah Khan
Puppet Fundamentals Talk at DevOps Dubai by Hameedullah Khan
 
Integrating the Solr search engine
Integrating the Solr search engineIntegrating the Solr search engine
Integrating the Solr search engine
 
Introduction to Design Patterns in Javascript
Introduction to Design Patterns in JavascriptIntroduction to Design Patterns in Javascript
Introduction to Design Patterns in Javascript
 
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
 
Lucene for Solr Developers
Lucene for Solr DevelopersLucene for Solr Developers
Lucene for Solr Developers
 
web programming Unit VI PPT by Bhavsingh Maloth
web programming Unit VI PPT  by Bhavsingh Malothweb programming Unit VI PPT  by Bhavsingh Maloth
web programming Unit VI PPT by Bhavsingh Maloth
 
PuppetConf 2017: Custom Types & Providers: Modeling Modern REST Interfaces an...
PuppetConf 2017: Custom Types & Providers: Modeling Modern REST Interfaces an...PuppetConf 2017: Custom Types & Providers: Modeling Modern REST Interfaces an...
PuppetConf 2017: Custom Types & Providers: Modeling Modern REST Interfaces an...
 
Lucene for Solr Developers
Lucene for Solr DevelopersLucene for Solr Developers
Lucene for Solr Developers
 
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
20111110 how puppet-fits_into_your_existing_infrastructure_and_change_managem...
 
Iterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design patternIterator - a powerful but underappreciated design pattern
Iterator - a powerful but underappreciated design pattern
 
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Bootstrapping Puppet and Application Deployment - PuppetConf 2013Bootstrapping Puppet and Application Deployment - PuppetConf 2013
Bootstrapping Puppet and Application Deployment - PuppetConf 2013
 
Puppet & Perforce: Versioning Everything for Deployments
Puppet & Perforce: Versioning Everything for DeploymentsPuppet & Perforce: Versioning Everything for Deployments
Puppet & Perforce: Versioning Everything for Deployments
 
Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501Alfresco Business Reporting - Tech Talk Live 20130501
Alfresco Business Reporting - Tech Talk Live 20130501
 
Ei cakephp
Ei cakephpEi cakephp
Ei cakephp
 
Cakeph pppt
Cakeph ppptCakeph pppt
Cakeph pppt
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
Puppet camp london nov 2014 slides (1)
Puppet camp london nov 2014   slides (1)Puppet camp london nov 2014   slides (1)
Puppet camp london nov 2014 slides (1)
 
coLearning PHP
coLearning PHPcoLearning PHP
coLearning PHP
 
Lucene Bootcamp - 2
Lucene Bootcamp - 2Lucene Bootcamp - 2
Lucene Bootcamp - 2
 
Mule concepts transformers
Mule concepts transformersMule concepts transformers
Mule concepts transformers
 

Último

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfOverkill Security
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 

Puppet - The IT automation software

  • 1. Introduction to Puppet The IT automation software Ahmed Elgenedy Cairo, January 2013
  • 2. • Introduction – What is Puppet? – How Puppet Works? • RAL - Resource Abstraction Layer – Manifests, Resource Ordering – Variables, Facts, Classes, and Modules – More • Templates • Parameterized Classes • Defined Types • Master/Agent Puppet – Serving a Real Configuration
  • 3. • Introduction – What is Puppet? – How Puppet Works? • RAL - Resource Abstraction Layer – Manifests, Resource Ordering – Variables, Facts, Classes, and Modules – More • Templates • Parameterized Classes • Defined Types • Master/Agent Puppet – Serving a Real Configuration
  • 4. • IT automation software • Helps system administrators manage infrastructure throughout its lifecycle, from provisioning and configuration to patch management and compliance • Automate repetitive tasks, quickly deploy critical applications, and proactively manage change, scaling from 10s of servers to 1000s, • Available as both open source and commercial software
  • 5. • Declarative, model-based approach to IT automation 1. Define the desired state of the infrastructure’s configuration using Puppet’s declarative configuration language 2. Simulate configuration changes before applying 3. Enforce the deployed desired state automatically, correcting any configuration drift 4. Report on the differences between actual and desired states and any changes made enforcing the desired state
  • 6.
  • 7. • Introduction – What is Puppet? – How Puppet Works? • RAL - Resource Abstraction Layer – Manifests, Resource Ordering – Variables, Facts, Classes, and Modules – More • Templates • Parameterized Classes • Defined Types • Master/Agent Puppet – Serving a Real Configuration
  • 8. • System’s configuration is a collection of resources • Resources vary in size, complexity, and lifespan: • For example: – File – User account – Software package – Running service – Scheduled cron job • Similar resources can be grouped into types
  • 9. • RAL splits resources into: – Types: high-level models – Providers: platform-specificimplementations • RAL lets you describe resources in a way that can apply to any system • Puppet starts with an understanding of what state a resource should have • To sync the resource, it uses the RAL to query the current state, compares that against the desired state, to make any necessary changes •
  • 10. • Every resource is an instance of a resource type: – Identified by a title – Has a number of attributes – Each attribute has a value.
  • 11. • Puppet ships with a tool called puppet resource • Use the shell to query and modify your system
  • 12. • Provide attribute=value pairs to modify the resource • This includes creating it or destroying it * Note that this command line assignment syntax differs from the Puppet language’s normal attribute => value syntax
  • 13. • Core types: – notify, file, package – service, exec, cron – user, goup • Core types cheat sheet • Use “puppet describe –s”
  • 14. • Puppet programs are called manifests • Manifests use the .pp file extension • The core of the Puppet language is the resource declaration • Manifests can also use: – Conditional statements – Group resourcesinto collections – Generate text with functions – Reference code in other manifests – … and do many other things
  • 15. • Use puppet apply to apply a manifest on local system • Before being applied, manifests get compiled into a catalog that only represents resources and the order in which they need to be synced
  • 16.
  • 17. • Puppet might sync resources in any order • The physical order of resources in a manifest doesn’t imply a logical order • When some resources depend on other resources, how do we tell Puppet which ones go first?
  • 18. • before and require make simple dependency relationships • before is used in the earlier resource, and lists resources that depend on it • require is used in the later resource and lists the resources that it depends on
  • 19. • The arrows can point in either direction <- or -> • Think of them as representing the flow of time
  • 20.
  • 21. • $variables always start with a dollar sign • Can be assigned with the = operator • Can hold strings, numbers, special values (false, undef…), etc
  • 22. • Unassigned variable value will be undef • Inside strings, use ${variable} • Variable can be assigned once in a given scope • You can use variables as the value for any resource attribute, or as the title of a resource
  • 23. • Puppet builds pre-assigned variables • Puppet ships with a tool called Facter, which formulates system information into a set of variables
  • 24. • Classes are singleton collections of resources that Puppet can apply as a unit • Classes are blocks of code that can be turned on or off • Before you can use a class, you have to define it • To build a class into the catalog, the class has to be declared
  • 25.
  • 26. • Re-usable bundles of code and data • Puppet autoloads manifests from the modules in its modulepath • The modulepath is a colon-separated list of directories • Let’s just convert that last class to a module…
  • 27.
  • 28. • You can now include the class from any manifest, without having to cut and paste anything
  • 29. • my_module — This outermost directory’s name matches the name of the module – manifests/ — Contains all of the manifests in the module. • init.pp — Contains a class definition. This class’s name must match the module’s name • other_class.pp — Contains other classes • my_defined_type.pp — Contains defined types – files/ — Contains files, managed nodes can download – lib/ — Contains plugins, custom facts and custom types – templates/ — Contains templates
  • 30. • The Puppet Forge is a great place to start looking for modules • Modules written by other users, Puppet employees and community members • Freely downloaded, modified, and reused • Most of these modules are open source • You can also contribute your own modules
  • 31. • Install and manage modules from the Puppet Forge
  • 32. • Templates – ERB templates – Ruby code can be added to plain text document – Make your config files as flexible as your Puppet manifests • Parameterized Classes – Give a list of parameters when defining a class • Defined Types – Model repeatable chunksof configuration
  • 33. • Introduction – What is Puppet? – How Puppet Works? • RAL - Resource Abstraction Layer – Manifests, Resource Ordering – Variables, Facts, Classes, and Modules – More • Templates • Parameterized Classes • Defined Types • Master/Agent Puppet – Serving a Real Configuration
  • 34. • Pull-based • Agents are configured to periodically fetch a catalog and apply it • Also, you can trigger it to run manually
  • 35. • Puppet master server – Owns the manifests – Responsiblefor compilation • Puppet agents: – Don’t have to see any manifest files at all – Have no access to configuration information
  • 36. • We already built some useful classes • All classes are available on the puppet master into /etc/puppetlabs/puppet/modules • But how do we choose which classes go into an agent’s catalog?
  • 37. • Puppet master always loads the manifest file site.pp • With Puppet Enterprise, it’s located by default at /etc/puppetlabs/puppet/manifests/site.pp • You can declare classes and resources in a node definition
  • 38. • Fetches configurations from a master server • Has two main modes: – Daemon: fetch configurations every half-hour (default) – Run once and quit (use the --test option)
  • 39. • On Puppet master server
  • 40. • Run Puppet agent again
  • 41.
  • 42. • Learning Puppet – http://docs.puppetlabs.com/learning/