SlideShare ist ein Scribd-Unternehmen logo
1 von 17
First Moves with Puppet New Delhi Puppet HackDay/ BarCamp March 13, 2010 Presented by  Slideshare Operations Engineering/Julie Tsai
Today Quick Primer Useful Commands PuppetingSudoers I — Permissions PuppetingSudoers II — OS Conditions PuppetingSudoers III — Inheriting Class Facter References 2
Quick Primer: How It Flows Ref. http://www.linuxforu.com/wp-content/uploads/2009/06/puppet_diagram.png 3
Quick Primer: Learning the Lingo Resource – instance of native type, plugin, or definition, i.e. user, exec, file Capitalized resource: invoked by other resources of previously defined resource, i.e. file foo.txt laver invoked as File[“foo.txt”]  Class - resource(s) description with title, file, attributes Definition – abstract description of class, can be invoked multiple times Node – host instance (physical or virtual)  Collection – groups of resources Recipe – sample puppet code (manifests/*.pp) 4
Quick Primer: Data Parameters Variables – substitution values Arrays – grouped list of values Attributes – statement(s) describing resources Literals – string values that needn’t be interpolated 5
Quick Primer: Variable Scoping Overridable variable defaults defined only in outer scope of resource instances Declarative language: Within the same-level scope, variables can only be defined once Qualified variables are a method of passing parameters from a class class mothership { 	$server = “juno” } class satellite {	   	$ms = $mothership::server } 6
Quick Primer: Where Things Are Note: below assumes default install in /etc /etc/puppet/fileserver.conf(used by puppermasterd) path /var/lib/puppet/files 		allow 10.100.0.0/24 /etc/puppet/puppet.conf(used by clients’ puppetd) vardir = /var/lib/puppet logdir = /var/log/puppet classfile = $vardir/classes.txt /etc/puppet/manifests/[../..]/*.pp (architecture varies) 7
Quick Primer: A Client Directory Tree puppetclient01:/var/lib/puppet 	|-> classes.txt– node’s class membership 	|-> cientbucket– hashed config artifacts 	|-> lib 	|-> localconfig.yaml 	|-> ssl– authentication certs 	|-> state – checksums, entropy-tracking 8
Quick Primer: Master Directory Tree puppetmasterd:/var/lib/puppet 	|-> bucket 	|-> classes.txt 	|-> clientbucket 	|-> client_yaml 	|-> lib 	|-> localconfig.yaml 	|-> reports 	|-> rrd 	|-> ssl 	|-> state 	|-> yaml 9
Useful Commands to Get Started puppet <puppetscript.pp> - run standalone script -l /path/to/file.log– logpath -d– debug --noop– dry-run puppetd– daemon on client that schedules retrieval of configs from puppetmaster and applies locally -d– debug --test  – verbose logging --noop– dry-run -l /path/to/log – log path facter– find out local node’s values for reserved classes 10
PuppetingSudoers I — Permissions Configure /etc/puppet/manifests/sudoers.pp : file { "/etc/sudoers":     owner => root,     group => wheel,     mode  => 400, } 11 And run: [puppet@puppet manifests]# puppet –noop –d /etc/puppet/manifests/sudoers.pp
PuppetingSudoers II — Operating Conditions Now, correct with /etc/puppet/manifests/sudoers2.pp file { "/etc/sudoers”:     mode => $operatingsystem ? {         centos => "440", gentoo => "440", suse => "640",         default => ”400",     },     owner => root,     group => root, } 12
PuppetingSudoers III — Inheriting Class /etc/puppet/manifests/sudoers3.pp class unix {         file { "/etc/sudoers":                 owner => root,                 group => root,         }         service {                 "sshd":                 ensure => running,         } } class centos_mycompany inherits unix {         File["/etc/sudoers"] { mode => 440 } } 13
PuppetingSudoers III — Inheriting Class (cont.) /etc/puppet/manifests/sudoers3.pp node default {         include unix } node bastionhost {         include centos_mycompany } 14 And run: [puppet@puppet manifests]# puppet –d –noop sudoers3.pp [puppet@puppet manifests]# cat /var/lib/puppet/classes.txt
PuppetingSudoers III — Inheriting Class (cont. 2) Use Facter to defindnodename: [puppet@puppet manifests]#  facter | egrep -i 'fqdn|hostname’ 15 /etc/puppet/manifests/sudoers3.pp node'puppet.us-west-1.compute.internal' {         include centos_mycompany }
Facts about Facter Facter is a Puppet utility that discovers relevant “facts” that puppet can use to dynamically populate puppet manifest variables Executing command-line Facter can show you the reserved variables like FQDN, hostname, kernel, architecture, sshdsakey, etc. 16
References Reductive Labs Puppet Guideshttp://docs.reductivelabs.com/guides/ Glossary of Terms  http://reductivelabs.com/trac/puppet/wiki/GlossaryOfTerms Resource Attributeshttp://reductivelabs.com/trac/puppet/wiki/TypeReference#metaparameters Nice vimrc for Puppethttp://www.davidpashley.com/blog/systems-administration/puppet/vim-highlighting.html Classic LISA ‘98 paper on best-practice infrastructures http://www.infrastructures.org/papers/bootstrap/bootstrap.html 17

Weitere ähnliche Inhalte

Was ist angesagt?

Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Continuent
 
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...Puppet
 
Ansible for Beginners
Ansible for BeginnersAnsible for Beginners
Ansible for BeginnersArie Bregman
 
2.1.using the shell
2.1.using the shell2.1.using the shell
2.1.using the shelldonv214
 
(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104Arie Bregman
 
Apache Hadoop for System Administrators
Apache Hadoop for System AdministratorsApache Hadoop for System Administrators
Apache Hadoop for System AdministratorsAllen Wittenauer
 
(Practical) linux 101
(Practical) linux 101(Practical) linux 101
(Practical) linux 101Arie Bregman
 
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pmRyosuke IWANAGA
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting BasicsSudharsan S
 
37562259 top-consuming-process
37562259 top-consuming-process37562259 top-consuming-process
37562259 top-consuming-processskumner
 
Puppet overview
Puppet overviewPuppet overview
Puppet overviewMike_Foto
 
WordPress 運用を支える Perl
WordPress 運用を支える PerlWordPress 運用を支える Perl
WordPress 運用を支える Perl鉄次 尾形
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modulesHao-Ran Liu
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell ScriptingMustafa Qasim
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOSAdamFallon4
 
Writing file system in CPython
Writing file system in CPythonWriting file system in CPython
Writing file system in CPythondelimitry
 

Was ist angesagt? (20)

Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
Training Slides: Basics 105: Backup, Recovery and Provisioning Within Tungste...
 
Bower introduction
Bower introductionBower introduction
Bower introduction
 
Linux Command Line
Linux Command LineLinux Command Line
Linux Command Line
 
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
Puppet Camp Phoenix 2015: Managing Files via Puppet: Let Me Count The Ways (B...
 
Ansible for Beginners
Ansible for BeginnersAnsible for Beginners
Ansible for Beginners
 
2.1.using the shell
2.1.using the shell2.1.using the shell
2.1.using the shell
 
(Practical) linux 104
(Practical) linux 104(Practical) linux 104
(Practical) linux 104
 
Mac OSX Terminal 101
Mac OSX Terminal 101Mac OSX Terminal 101
Mac OSX Terminal 101
 
Apache Hadoop for System Administrators
Apache Hadoop for System AdministratorsApache Hadoop for System Administrators
Apache Hadoop for System Administrators
 
(Practical) linux 101
(Practical) linux 101(Practical) linux 101
(Practical) linux 101
 
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
"Ops Tools with Perl" 2012/05/12 Hokkaido.pm
 
DevOps with Fabric
DevOps with FabricDevOps with Fabric
DevOps with Fabric
 
Unix Shell Scripting Basics
Unix Shell Scripting BasicsUnix Shell Scripting Basics
Unix Shell Scripting Basics
 
37562259 top-consuming-process
37562259 top-consuming-process37562259 top-consuming-process
37562259 top-consuming-process
 
Puppet overview
Puppet overviewPuppet overview
Puppet overview
 
WordPress 運用を支える Perl
WordPress 運用を支える PerlWordPress 運用を支える Perl
WordPress 運用を支える Perl
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
Unix Shell Scripting
Unix Shell ScriptingUnix Shell Scripting
Unix Shell Scripting
 
Using the command line on macOS
Using the command line on macOSUsing the command line on macOS
Using the command line on macOS
 
Writing file system in CPython
Writing file system in CPythonWriting file system in CPython
Writing file system in CPython
 

Andere mochten auch

Glamping y aguas termales: vacaciones en contacto con la naturaleza para reca...
Glamping y aguas termales: vacaciones en contacto con la naturaleza para reca...Glamping y aguas termales: vacaciones en contacto con la naturaleza para reca...
Glamping y aguas termales: vacaciones en contacto con la naturaleza para reca...GaliWonders
 
Cartoon 6 Linked In
Cartoon 6 Linked InCartoon 6 Linked In
Cartoon 6 Linked InLieke_Kemper
 
Para sicologia
Para sicologiaPara sicologia
Para sicologiamoira_IQ
 
Park Inn Cardiffs 50 50 Campaign
Park Inn Cardiffs 50 50 CampaignPark Inn Cardiffs 50 50 Campaign
Park Inn Cardiffs 50 50 CampaignJan Alfrink
 
05. semana 5
05. semana 505. semana 5
05. semana 5moira_IQ
 
Assemblea constitutiva Palamós i Sant Joan per l'Autodeterminació
Assemblea constitutiva Palamós i Sant Joan per l'AutodeterminacióAssemblea constitutiva Palamós i Sant Joan per l'Autodeterminació
Assemblea constitutiva Palamós i Sant Joan per l'AutodeterminacióPere Minobas Suquet
 
Presentacion de video de stadistica
Presentacion de video de stadisticaPresentacion de video de stadistica
Presentacion de video de stadisticakeremcitha
 
Dificultades en el aprendizaje tac
Dificultades en el aprendizaje tacDificultades en el aprendizaje tac
Dificultades en el aprendizaje tacbelgica bultron
 
Oh no, I´ve lost my ducks. Help me find them and win a fun goodie...
Oh no, I´ve lost my ducks. Help me find them and win a fun goodie...Oh no, I´ve lost my ducks. Help me find them and win a fun goodie...
Oh no, I´ve lost my ducks. Help me find them and win a fun goodie...Jan Alfrink
 
Cartoon Februari 2010 Linked In
Cartoon Februari 2010 Linked InCartoon Februari 2010 Linked In
Cartoon Februari 2010 Linked InLieke_Kemper
 
Mentefacto De Poder
Mentefacto De PoderMentefacto De Poder
Mentefacto De Poderguest485c5c0
 

Andere mochten auch (19)

Royos X
Royos XRoyos X
Royos X
 
Photo Album Ahmad 047
Photo Album Ahmad 047Photo Album Ahmad 047
Photo Album Ahmad 047
 
Glamping y aguas termales: vacaciones en contacto con la naturaleza para reca...
Glamping y aguas termales: vacaciones en contacto con la naturaleza para reca...Glamping y aguas termales: vacaciones en contacto con la naturaleza para reca...
Glamping y aguas termales: vacaciones en contacto con la naturaleza para reca...
 
Cartoon 6 Linked In
Cartoon 6 Linked InCartoon 6 Linked In
Cartoon 6 Linked In
 
Para sicologia
Para sicologiaPara sicologia
Para sicologia
 
Park Inn Cardiffs 50 50 Campaign
Park Inn Cardiffs 50 50 CampaignPark Inn Cardiffs 50 50 Campaign
Park Inn Cardiffs 50 50 Campaign
 
05. semana 5
05. semana 505. semana 5
05. semana 5
 
Assemblea constitutiva Palamós i Sant Joan per l'Autodeterminació
Assemblea constitutiva Palamós i Sant Joan per l'AutodeterminacióAssemblea constitutiva Palamós i Sant Joan per l'Autodeterminació
Assemblea constitutiva Palamós i Sant Joan per l'Autodeterminació
 
Presentacion de video de stadistica
Presentacion de video de stadisticaPresentacion de video de stadistica
Presentacion de video de stadistica
 
Dificultades en el aprendizaje tac
Dificultades en el aprendizaje tacDificultades en el aprendizaje tac
Dificultades en el aprendizaje tac
 
Oh no, I´ve lost my ducks. Help me find them and win a fun goodie...
Oh no, I´ve lost my ducks. Help me find them and win a fun goodie...Oh no, I´ve lost my ducks. Help me find them and win a fun goodie...
Oh no, I´ve lost my ducks. Help me find them and win a fun goodie...
 
Cartoon Februari 2010 Linked In
Cartoon Februari 2010 Linked InCartoon Februari 2010 Linked In
Cartoon Februari 2010 Linked In
 
Urai Slideshare
Urai SlideshareUrai Slideshare
Urai Slideshare
 
Mentefacto De Poder
Mentefacto De PoderMentefacto De Poder
Mentefacto De Poder
 
Binary Trees
Binary TreesBinary Trees
Binary Trees
 
A logica dos_caes
A logica dos_caesA logica dos_caes
A logica dos_caes
 
Battle Code
Battle CodeBattle Code
Battle Code
 
Tercer sector
Tercer sectorTercer sector
Tercer sector
 
Tablas de contingencia
Tablas de contingenciaTablas de contingencia
Tablas de contingencia
 

Ähnlich wie First Moves with Puppet New Delhi Puppet HackDay/BarCamp March 13, 2010

Puppet HackDay/BarCamp New Delhi Exercises
Puppet HackDay/BarCamp New Delhi ExercisesPuppet HackDay/BarCamp New Delhi Exercises
Puppet HackDay/BarCamp New Delhi ExercisesJulie Tsai
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and AgentRanjit Avasarala
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with PuppetAlessandro Franceschi
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppetdelimiter
 
Puppet Troubleshooting
Puppet TroubleshootingPuppet Troubleshooting
Puppet TroubleshootingPuppet
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetOmar Reygaert
 
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
 
Puppet slides for intelligrape
Puppet slides for intelligrapePuppet slides for intelligrape
Puppet slides for intelligrapeSharad Aggarwal
 
Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetWalter Heck
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetOlinData
 
Beyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with PuppetBeyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with Puppetlutter
 
Writing & Sharing Great Modules on the Puppet Forge
Writing & Sharing Great Modules on the Puppet ForgeWriting & Sharing Great Modules on the Puppet Forge
Writing & Sharing Great Modules on the Puppet ForgePuppet
 
Webinar - Managing Files with Puppet
Webinar - Managing Files with PuppetWebinar - Managing Files with Puppet
Webinar - Managing Files with PuppetOlinData
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90minsLarry Cai
 

Ähnlich wie First Moves with Puppet New Delhi Puppet HackDay/BarCamp March 13, 2010 (20)

Puppet HackDay/BarCamp New Delhi Exercises
Puppet HackDay/BarCamp New Delhi ExercisesPuppet HackDay/BarCamp New Delhi Exercises
Puppet HackDay/BarCamp New Delhi Exercises
 
Installaling Puppet Master and Agent
Installaling Puppet Master and AgentInstallaling Puppet Master and Agent
Installaling Puppet Master and Agent
 
Puppet quick start guide
Puppet quick start guidePuppet quick start guide
Puppet quick start guide
 
Developing IT infrastructures with Puppet
Developing IT infrastructures with PuppetDeveloping IT infrastructures with Puppet
Developing IT infrastructures with Puppet
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppet
 
Puppet
PuppetPuppet
Puppet
 
Puppet Troubleshooting
Puppet TroubleshootingPuppet Troubleshooting
Puppet Troubleshooting
 
Troubleshooting Puppet
Troubleshooting PuppetTroubleshooting Puppet
Troubleshooting Puppet
 
Puppi. Puppet strings to the shell
Puppi. Puppet strings to the shellPuppi. Puppet strings to the shell
Puppi. Puppet strings to the shell
 
Virtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + PuppetVirtualization and automation of library software/machines + Puppet
Virtualization and automation of library software/machines + Puppet
 
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
 
Puppet slides for intelligrape
Puppet slides for intelligrapePuppet slides for intelligrape
Puppet slides for intelligrape
 
Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013Puppet without Root - PuppetConf 2013
Puppet without Root - PuppetConf 2013
 
One-Man Ops
One-Man OpsOne-Man Ops
One-Man Ops
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
PuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of PuppetPuppetCamp SEA 1 - Use of Puppet
PuppetCamp SEA 1 - Use of Puppet
 
Beyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with PuppetBeyond Golden Containers: Complementing Docker with Puppet
Beyond Golden Containers: Complementing Docker with Puppet
 
Writing & Sharing Great Modules on the Puppet Forge
Writing & Sharing Great Modules on the Puppet ForgeWriting & Sharing Great Modules on the Puppet Forge
Writing & Sharing Great Modules on the Puppet Forge
 
Webinar - Managing Files with Puppet
Webinar - Managing Files with PuppetWebinar - Managing Files with Puppet
Webinar - Managing Files with Puppet
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90mins
 

Mehr von som_nangia

Testspeakernotes 090715053843 Phpapp02
Testspeakernotes 090715053843 Phpapp02Testspeakernotes 090715053843 Phpapp02
Testspeakernotes 090715053843 Phpapp02som_nangia
 
How Stupid Can We Get
How Stupid Can We GetHow Stupid Can We Get
How Stupid Can We Getsom_nangia
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpmsom_nangia
 
Audio one_in_each_slide
Audio one_in_each_slideAudio one_in_each_slide
Audio one_in_each_slidesom_nangia
 
Animation test_notes
Animation test_notesAnimation test_notes
Animation test_notessom_nangia
 
Animation test
Animation testAnimation test
Animation testsom_nangia
 
Animation test
Animation testAnimation test
Animation testsom_nangia
 
Futureoftheinternetciscocarriergradeipv6solutioncgv6 091110191821 Phpapp01
Futureoftheinternetciscocarriergradeipv6solutioncgv6 091110191821 Phpapp01Futureoftheinternetciscocarriergradeipv6solutioncgv6 091110191821 Phpapp01
Futureoftheinternetciscocarriergradeipv6solutioncgv6 091110191821 Phpapp01som_nangia
 
Pwnotes 1234179558850871-1
Pwnotes 1234179558850871-1Pwnotes 1234179558850871-1
Pwnotes 1234179558850871-1som_nangia
 
Animation test
Animation testAnimation test
Animation testsom_nangia
 

Mehr von som_nangia (20)

Linktest
LinktestLinktest
Linktest
 
Escape Test
Escape TestEscape Test
Escape Test
 
Escape Test
Escape TestEscape Test
Escape Test
 
Escape Test
Escape TestEscape Test
Escape Test
 
Escape Test
Escape TestEscape Test
Escape Test
 
Escape Test
Escape TestEscape Test
Escape Test
 
Escape Test
Escape TestEscape Test
Escape Test
 
Escape Test
Escape TestEscape Test
Escape Test
 
Escape Test
Escape TestEscape Test
Escape Test
 
Escape Test
Escape TestEscape Test
Escape Test
 
Testspeakernotes 090715053843 Phpapp02
Testspeakernotes 090715053843 Phpapp02Testspeakernotes 090715053843 Phpapp02
Testspeakernotes 090715053843 Phpapp02
 
How Stupid Can We Get
How Stupid Can We GetHow Stupid Can We Get
How Stupid Can We Get
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
 
Audio one_in_each_slide
Audio one_in_each_slideAudio one_in_each_slide
Audio one_in_each_slide
 
Animation test_notes
Animation test_notesAnimation test_notes
Animation test_notes
 
Animation test
Animation testAnimation test
Animation test
 
Animation test
Animation testAnimation test
Animation test
 
Futureoftheinternetciscocarriergradeipv6solutioncgv6 091110191821 Phpapp01
Futureoftheinternetciscocarriergradeipv6solutioncgv6 091110191821 Phpapp01Futureoftheinternetciscocarriergradeipv6solutioncgv6 091110191821 Phpapp01
Futureoftheinternetciscocarriergradeipv6solutioncgv6 091110191821 Phpapp01
 
Pwnotes 1234179558850871-1
Pwnotes 1234179558850871-1Pwnotes 1234179558850871-1
Pwnotes 1234179558850871-1
 
Animation test
Animation testAnimation test
Animation test
 

Kürzlich hochgeladen

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
 
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
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
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
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Kürzlich hochgeladen (20)

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
 
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...
 
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
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
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
 
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
 
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
 
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
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
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...
 
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
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

First Moves with Puppet New Delhi Puppet HackDay/BarCamp March 13, 2010

  • 1. First Moves with Puppet New Delhi Puppet HackDay/ BarCamp March 13, 2010 Presented by Slideshare Operations Engineering/Julie Tsai
  • 2. Today Quick Primer Useful Commands PuppetingSudoers I — Permissions PuppetingSudoers II — OS Conditions PuppetingSudoers III — Inheriting Class Facter References 2
  • 3. Quick Primer: How It Flows Ref. http://www.linuxforu.com/wp-content/uploads/2009/06/puppet_diagram.png 3
  • 4. Quick Primer: Learning the Lingo Resource – instance of native type, plugin, or definition, i.e. user, exec, file Capitalized resource: invoked by other resources of previously defined resource, i.e. file foo.txt laver invoked as File[“foo.txt”] Class - resource(s) description with title, file, attributes Definition – abstract description of class, can be invoked multiple times Node – host instance (physical or virtual) Collection – groups of resources Recipe – sample puppet code (manifests/*.pp) 4
  • 5. Quick Primer: Data Parameters Variables – substitution values Arrays – grouped list of values Attributes – statement(s) describing resources Literals – string values that needn’t be interpolated 5
  • 6. Quick Primer: Variable Scoping Overridable variable defaults defined only in outer scope of resource instances Declarative language: Within the same-level scope, variables can only be defined once Qualified variables are a method of passing parameters from a class class mothership { $server = “juno” } class satellite { $ms = $mothership::server } 6
  • 7. Quick Primer: Where Things Are Note: below assumes default install in /etc /etc/puppet/fileserver.conf(used by puppermasterd) path /var/lib/puppet/files allow 10.100.0.0/24 /etc/puppet/puppet.conf(used by clients’ puppetd) vardir = /var/lib/puppet logdir = /var/log/puppet classfile = $vardir/classes.txt /etc/puppet/manifests/[../..]/*.pp (architecture varies) 7
  • 8. Quick Primer: A Client Directory Tree puppetclient01:/var/lib/puppet |-> classes.txt– node’s class membership |-> cientbucket– hashed config artifacts |-> lib |-> localconfig.yaml |-> ssl– authentication certs |-> state – checksums, entropy-tracking 8
  • 9. Quick Primer: Master Directory Tree puppetmasterd:/var/lib/puppet |-> bucket |-> classes.txt |-> clientbucket |-> client_yaml |-> lib |-> localconfig.yaml |-> reports |-> rrd |-> ssl |-> state |-> yaml 9
  • 10. Useful Commands to Get Started puppet <puppetscript.pp> - run standalone script -l /path/to/file.log– logpath -d– debug --noop– dry-run puppetd– daemon on client that schedules retrieval of configs from puppetmaster and applies locally -d– debug --test – verbose logging --noop– dry-run -l /path/to/log – log path facter– find out local node’s values for reserved classes 10
  • 11. PuppetingSudoers I — Permissions Configure /etc/puppet/manifests/sudoers.pp : file { "/etc/sudoers": owner => root, group => wheel, mode => 400, } 11 And run: [puppet@puppet manifests]# puppet –noop –d /etc/puppet/manifests/sudoers.pp
  • 12. PuppetingSudoers II — Operating Conditions Now, correct with /etc/puppet/manifests/sudoers2.pp file { "/etc/sudoers”: mode => $operatingsystem ? { centos => "440", gentoo => "440", suse => "640", default => ”400", }, owner => root, group => root, } 12
  • 13. PuppetingSudoers III — Inheriting Class /etc/puppet/manifests/sudoers3.pp class unix { file { "/etc/sudoers": owner => root, group => root, } service { "sshd": ensure => running, } } class centos_mycompany inherits unix { File["/etc/sudoers"] { mode => 440 } } 13
  • 14. PuppetingSudoers III — Inheriting Class (cont.) /etc/puppet/manifests/sudoers3.pp node default { include unix } node bastionhost { include centos_mycompany } 14 And run: [puppet@puppet manifests]# puppet –d –noop sudoers3.pp [puppet@puppet manifests]# cat /var/lib/puppet/classes.txt
  • 15. PuppetingSudoers III — Inheriting Class (cont. 2) Use Facter to defindnodename: [puppet@puppet manifests]# facter | egrep -i 'fqdn|hostname’ 15 /etc/puppet/manifests/sudoers3.pp node'puppet.us-west-1.compute.internal' { include centos_mycompany }
  • 16. Facts about Facter Facter is a Puppet utility that discovers relevant “facts” that puppet can use to dynamically populate puppet manifest variables Executing command-line Facter can show you the reserved variables like FQDN, hostname, kernel, architecture, sshdsakey, etc. 16
  • 17. References Reductive Labs Puppet Guideshttp://docs.reductivelabs.com/guides/ Glossary of Terms http://reductivelabs.com/trac/puppet/wiki/GlossaryOfTerms Resource Attributeshttp://reductivelabs.com/trac/puppet/wiki/TypeReference#metaparameters Nice vimrc for Puppethttp://www.davidpashley.com/blog/systems-administration/puppet/vim-highlighting.html Classic LISA ‘98 paper on best-practice infrastructures http://www.infrastructures.org/papers/bootstrap/bootstrap.html 17

Hinweis der Redaktion

  1. Instructs to participants to test--&gt; puppet -dsite.pp--&gt; optional -l $LOG + other window with tail of log--&gt; puppet --noop -dsite.pp --&gt; pgrep -lf puppetd (default incremen is 30 min)--&gt; pgrep -lf puppetmasterd
  2. 1) puppet --noopsudoers.pp2) puppet -dsudoers.pp* This faulty centos mode corrected by next exercise – this config actually changes file to faulty settings on purpose
  3. 1) demonstrate conditionals per OS &lt;&quot;puppet -d --noop sudoers2.pp&quot;&gt; 2) service, operations on resource &lt;&quot;puppet -d sudoers2.pp&quot;&gt;
  4. &lt;run site.pp to have something to change again&gt;  (c) 1) class w/ file &amp; service resources 2) inheritance &lt;run once in non-func. mode&gt; - to demo that nothing gets executed without resource instantiation, etc.
  5. 3)idefault &amp; bastionhost node instance 4) bastionhost node instance &lt;run once in non-func. mode&gt; - to demo what it meands for node to belong to a certain class 5) cat /var/lib/puppet/classes.txt (loaded by puppetd)
  6. 6)facter | egrep -i &apos;fqdn|hostname&apos; 7) specific node &apos;hostname&apos; &lt;run once in non-func. mode&gt; &lt;run once in func. mode&gt;Done
  7. !