SlideShare a Scribd company logo
1 of 15
Exercício




Distribuir configuração de clientes Zabbix
               (monitoração)
Conceitos
Resource                   user { 'ze':
                               ensure => present,
  Type                         gid      => 1000,
     User, File, Package       require => Group['ze'],
                           }
  Name
  Attributes
  Meta Attributes
Classes
Definitions
Modules
Exemplo Simples - Locales
Configurar locales em um servidor
  Pacote locales
  Arquivo /etc/default/locale
  Arquivo /etc/locale.gen
  Executar /usr/sbin/locale.gen
Código fonte em:
  https://github.com/dcsobral/puppet-exemplo-locale
Experimentando com a linha de
           Comando
ralsh

        puppet:~# ralsh user bob
        user { 'bob':
            ensure => 'absent'
        }
        puppet:~# ralsh user bob ensure=present
        notice: /User[bob]/ensure: created
        user { 'bob':
            ensure => 'present'
        }
        puppet:~# ralsh user bob ensure=absent
        notice: /User[bob]/ensure: removed
        user { 'bob':
            ensure => 'absent'
        }
Experimentando com a linha de
           Comando
puppet describe
 dcs@puppet:~/exemplo$ puppet describe package -s

 package
 =======
 descrição e funcionamento

 Parameters
 ----------
     adminfile, allowcdrom, category, configfiles, description, ensure,
     flavor, instance, name, platform, responsefile, root, source, status,
     type, vendor

 Providers
 ---------
     aix, appdmg, apple, apt, aptitude, aptrpm, blastwave, darwinport, dpkg,
     fink, freebsd, gem, hpux, nim, openbsd, pkg, pkgdmg, portage, ports,
     portupgrade, rpm, rug, sun, sunfreeware, up2date, urpmi, yum, zypper
Criando Arquivos



package { 'locales':
        ensure => installed,
}
Puppet Apply

package { 'locales':
        ensure => installed,
}

file { '/etc/default/locale':
        ensure => present,
        content => 'LANG=pt_BR.UTF-8',
}
Dependências

package { 'locales':
        ensure => installed,
}

file { '/etc/default/locale':
        ensure => present,
        content => 'LANG=pt_BR.UTF-8',
        require => Package['locales'],
}
Outros Atributos

package { 'locales':
        ensure => installed,
}

file { '/etc/default/locale':
        ensure => present,
        content => 'LANG=pt_BR.UTF-8',
        require => Package['locales'],
        owner   => 'root',
        group   => 'root',
        mode    => 644,
}
Enviando Arquivos

file { '/etc/locale.gen':
        ensure => present,
        source => '/root/exemplo/locale.gen',
        require => Package['locales'],
        owner   => 'root',
        group   => 'root',
        mode    => 644,
}
Executando Processos
exec { '/usr/sbin/locale-gen':
}
Múltiplas Dependências
exec { '/usr/sbin/locale-gen':
    require => [ Package['locales'],
File['/etc/locale.gen'] ],
}
Notificações
exec { '/usr/sbin/locale-gen':
    subscribe => File['/etc/locale.gen'],
    require   => [ Package['locales'],
File['/etc/locale.gen'] ],
}
Refresh
exec { '/usr/sbin/locale-gen':
    subscribe   => File['/etc/locale.gen'],
    refreshonly => true,
    require     => [ Package['locales'],
File['/etc/locale.gen'] ],
}
Classes e Nós
class locale {
    package { 'locales':
        ensure => installed,
    }
    file { '/etc/default/locale':
        ensure => present,
        content => 'LANG=pt_BR.UTF-8',
        require => Package['locales'],
    }
    file { '/etc/locale.gen':
        ensure => present,
        source => '/root/exemplo/locale.gen',
        require => Package['locales'],
    }
    exec { '/usr/sbin/locale-gen':
        subscribe   => File['/etc/locale.gen'],
        refreshonly => true,
        require     => [ Package['locales'], File['/etc/locale.gen'] ],
    }
}

node default {
    include locale
}

More Related Content

What's hot

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
 
Perforce Object and Record Model
Perforce Object and Record Model  Perforce Object and Record Model
Perforce Object and Record Model Perforce
 
Creating beautiful puppet modules with puppet-lint
Creating beautiful puppet modules with puppet-lintCreating beautiful puppet modules with puppet-lint
Creating beautiful puppet modules with puppet-lintSpencer Owen
 
A Brief Introduction to Writing and Understanding Puppet Modules
A Brief Introduction to Writing and Understanding Puppet ModulesA Brief Introduction to Writing and Understanding Puppet Modules
A Brief Introduction to Writing and Understanding Puppet ModulesDavid Phillips
 
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonbСтажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonbSmartTools
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebookguoqing75
 
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with PuppetPuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with PuppetWalter Heck
 
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 - Puppet Deployment at OnApp
PuppetCamp SEA 1 - Puppet Deployment  at OnAppPuppetCamp SEA 1 - Puppet Deployment  at OnApp
PuppetCamp SEA 1 - Puppet Deployment at OnAppWalter Heck
 
JDD 2017: Nginx + Lua = OpenResty (Marcin Stożek)
JDD 2017: Nginx + Lua = OpenResty (Marcin Stożek)JDD 2017: Nginx + Lua = OpenResty (Marcin Stożek)
JDD 2017: Nginx + Lua = OpenResty (Marcin Stożek)PROIDEA
 
Introducing PHP Data Objects
Introducing PHP Data ObjectsIntroducing PHP Data Objects
Introducing PHP Data Objectswebhostingguy
 
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
 
MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoSF
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linuxtutorialsruby
 
Dependency Injection with PHP and PHP 5.3
Dependency Injection with PHP and PHP 5.3Dependency Injection with PHP and PHP 5.3
Dependency Injection with PHP and PHP 5.3Fabien Potencier
 

What's hot (18)

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...
 
Perforce Object and Record Model
Perforce Object and Record Model  Perforce Object and Record Model
Perforce Object and Record Model
 
Creating beautiful puppet modules with puppet-lint
Creating beautiful puppet modules with puppet-lintCreating beautiful puppet modules with puppet-lint
Creating beautiful puppet modules with puppet-lint
 
A Brief Introduction to Writing and Understanding Puppet Modules
A Brief Introduction to Writing and Understanding Puppet ModulesA Brief Introduction to Writing and Understanding Puppet Modules
A Brief Introduction to Writing and Understanding Puppet Modules
 
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonbСтажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
Стажировка 2016-07-27 02 Денис Нелюбин. PostgreSQL и jsonb
 
4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook4069180 Caching Performance Lessons From Facebook
4069180 Caching Performance Lessons From Facebook
 
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with PuppetPuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with Puppet
 
File::CleanupTask
File::CleanupTaskFile::CleanupTask
File::CleanupTask
 
EC2
EC2EC2
EC2
 
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 - Puppet Deployment at OnApp
PuppetCamp SEA 1 - Puppet Deployment  at OnAppPuppetCamp SEA 1 - Puppet Deployment  at OnApp
PuppetCamp SEA 1 - Puppet Deployment at OnApp
 
JDD 2017: Nginx + Lua = OpenResty (Marcin Stożek)
JDD 2017: Nginx + Lua = OpenResty (Marcin Stożek)JDD 2017: Nginx + Lua = OpenResty (Marcin Stożek)
JDD 2017: Nginx + Lua = OpenResty (Marcin Stożek)
 
Introducing PHP Data Objects
Introducing PHP Data ObjectsIntroducing PHP Data Objects
Introducing PHP Data Objects
 
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
 
MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)MongoDB Replication (Dwight Merriman)
MongoDB Replication (Dwight Merriman)
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
Dependency Injection with PHP and PHP 5.3
Dependency Injection with PHP and PHP 5.3Dependency Injection with PHP and PHP 5.3
Dependency Injection with PHP and PHP 5.3
 
Bento lunch talk
Bento   lunch talkBento   lunch talk
Bento lunch talk
 

Viewers also liked

Les Français, les élections Municipales et l’eventualité d’un remaniement min...
Les Français, les élections Municipales et l’eventualité d’un remaniement min...Les Français, les élections Municipales et l’eventualité d’un remaniement min...
Les Français, les élections Municipales et l’eventualité d’un remaniement min...LCP Assemblée nationale
 
Matriz estrategia de aprendizaje
Matriz estrategia de aprendizajeMatriz estrategia de aprendizaje
Matriz estrategia de aprendizajeGalasan
 
Brochure pully hiver-web
Brochure pully hiver-webBrochure pully hiver-web
Brochure pully hiver-webPulinfo Pully
 
IMMD - Extrait de cours ecommerce 1
IMMD - Extrait de cours ecommerce 1IMMD - Extrait de cours ecommerce 1
IMMD - Extrait de cours ecommerce 1Florent Bertiaux
 
Communist party line fbi file series in 25 parts - vol. (25)
Communist party line   fbi file series in 25 parts - vol. (25)Communist party line   fbi file series in 25 parts - vol. (25)
Communist party line fbi file series in 25 parts - vol. (25)RareBooksnRecords
 
Le CRP de L'ADAPT VAR : quel parcours et pour qui ?
Le CRP de L'ADAPT VAR : quel parcours et pour qui ?Le CRP de L'ADAPT VAR : quel parcours et pour qui ?
Le CRP de L'ADAPT VAR : quel parcours et pour qui ?Annabelle Denet
 
Kyr salvador dali mi
Kyr salvador dali miKyr salvador dali mi
Kyr salvador dali mikabbada
 
The yellow kid (Diana)
The yellow kid (Diana)The yellow kid (Diana)
The yellow kid (Diana)FrancesESAP
 
Ireo lesneven powerpoint agri game
Ireo lesneven powerpoint agri gameIreo lesneven powerpoint agri game
Ireo lesneven powerpoint agri gamekarim29
 
Loi santé ars paca mdph et zéro sans solutions
Loi santé ars paca  mdph et zéro sans solutionsLoi santé ars paca  mdph et zéro sans solutions
Loi santé ars paca mdph et zéro sans solutionsAnnabelle Denet
 
Cdp - Audience Internet - France - Avril2011
Cdp - Audience Internet - France - Avril2011Cdp - Audience Internet - France - Avril2011
Cdp - Audience Internet - France - Avril2011baileypeter
 

Viewers also liked (20)

Les Français, les élections Municipales et l’eventualité d’un remaniement min...
Les Français, les élections Municipales et l’eventualité d’un remaniement min...Les Français, les élections Municipales et l’eventualité d’un remaniement min...
Les Français, les élections Municipales et l’eventualité d’un remaniement min...
 
Actuar
ActuarActuar
Actuar
 
Matriz estrategia de aprendizaje
Matriz estrategia de aprendizajeMatriz estrategia de aprendizaje
Matriz estrategia de aprendizaje
 
Exposicion de informatica grupo #1
Exposicion de informatica grupo #1Exposicion de informatica grupo #1
Exposicion de informatica grupo #1
 
Brochure pully hiver-web
Brochure pully hiver-webBrochure pully hiver-web
Brochure pully hiver-web
 
Aucito hotel high tech2
Aucito hotel high tech2Aucito hotel high tech2
Aucito hotel high tech2
 
IMMD - Extrait de cours ecommerce 1
IMMD - Extrait de cours ecommerce 1IMMD - Extrait de cours ecommerce 1
IMMD - Extrait de cours ecommerce 1
 
Communist party line fbi file series in 25 parts - vol. (25)
Communist party line   fbi file series in 25 parts - vol. (25)Communist party line   fbi file series in 25 parts - vol. (25)
Communist party line fbi file series in 25 parts - vol. (25)
 
Le CRP de L'ADAPT VAR : quel parcours et pour qui ?
Le CRP de L'ADAPT VAR : quel parcours et pour qui ?Le CRP de L'ADAPT VAR : quel parcours et pour qui ?
Le CRP de L'ADAPT VAR : quel parcours et pour qui ?
 
Conférence EducPros
Conférence EducProsConférence EducPros
Conférence EducPros
 
Kyr salvador dali mi
Kyr salvador dali miKyr salvador dali mi
Kyr salvador dali mi
 
Nature en sursis
Nature en sursisNature en sursis
Nature en sursis
 
The yellow kid (Diana)
The yellow kid (Diana)The yellow kid (Diana)
The yellow kid (Diana)
 
Manual balay encimera 3eb715xq
Manual balay   encimera 3eb715xqManual balay   encimera 3eb715xq
Manual balay encimera 3eb715xq
 
LE LOW-COST HÔTELIER
LE LOW-COST HÔTELIERLE LOW-COST HÔTELIER
LE LOW-COST HÔTELIER
 
Ireo lesneven powerpoint agri game
Ireo lesneven powerpoint agri gameIreo lesneven powerpoint agri game
Ireo lesneven powerpoint agri game
 
Loi santé ars paca mdph et zéro sans solutions
Loi santé ars paca  mdph et zéro sans solutionsLoi santé ars paca  mdph et zéro sans solutions
Loi santé ars paca mdph et zéro sans solutions
 
Representación y gestión del diálogo
Representación y gestión del diálogoRepresentación y gestión del diálogo
Representación y gestión del diálogo
 
Pres bb
Pres bbPres bb
Pres bb
 
Cdp - Audience Internet - France - Avril2011
Cdp - Audience Internet - France - Avril2011Cdp - Audience Internet - France - Avril2011
Cdp - Audience Internet - France - Avril2011
 

Similar to Tutorial Puppet

Puppet: What _not_ to do
Puppet: What _not_ to doPuppet: What _not_ to do
Puppet: What _not_ to doPuppet
 
PuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetPuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetWalter Heck
 
PuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetPuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetOlinData
 
Does your configuration code smell?
Does your configuration code smell?Does your configuration code smell?
Does your configuration code smell?Tushar Sharma
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Carlos Sanchez
 
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
 
On secure application of PHP wrappers
On secure application  of PHP wrappersOn secure application  of PHP wrappers
On secure application of PHP wrappersPositive Hack Days
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013grim_radical
 
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
 
Learning Puppet basic thing
Learning Puppet basic thing Learning Puppet basic thing
Learning Puppet basic thing DaeHyung Lee
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOpsAgile Spain
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Puppet
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkMichael Peacock
 
Puppet Troubleshooting
Puppet TroubleshootingPuppet Troubleshooting
Puppet TroubleshootingPuppet
 
Puppet Intfrastructure as Code
Puppet Intfrastructure as CodePuppet Intfrastructure as Code
Puppet Intfrastructure as CodeSamir Chekkal
 

Similar to Tutorial Puppet (20)

Puppet: What _not_ to do
Puppet: What _not_ to doPuppet: What _not_ to do
Puppet: What _not_ to do
 
PuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetPuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with Puppet
 
PuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with PuppetPuppetCamp Ghent - What Not to Do with Puppet
PuppetCamp Ghent - What Not to Do with Puppet
 
Does your configuration code smell?
Does your configuration code smell?Does your configuration code smell?
Does your configuration code smell?
 
Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012Puppet for Java developers - JavaZone NO 2012
Puppet for Java developers - JavaZone NO 2012
 
Puppet
PuppetPuppet
Puppet
 
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
 
On secure application of PHP wrappers
On secure application  of PHP wrappersOn secure application  of PHP wrappers
On secure application of PHP wrappers
 
Puppet
PuppetPuppet
Puppet
 
Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013Puppet: Eclipsecon ALM 2013
Puppet: Eclipsecon ALM 2013
 
Puppet @ Seat
Puppet @ SeatPuppet @ Seat
Puppet @ Seat
 
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
 
Learning Puppet basic thing
Learning Puppet basic thing Learning Puppet basic thing
Learning Puppet basic thing
 
From Dev to DevOps
From Dev to DevOpsFrom Dev to DevOps
From Dev to DevOps
 
Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014Writing and Publishing Puppet Modules - PuppetConf 2014
Writing and Publishing Puppet Modules - PuppetConf 2014
 
Dance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech TalkDance for the puppet master: G6 Tech Talk
Dance for the puppet master: G6 Tech Talk
 
Puppet Troubleshooting
Puppet TroubleshootingPuppet Troubleshooting
Puppet Troubleshooting
 
Troubleshooting Puppet
Troubleshooting PuppetTroubleshooting Puppet
Troubleshooting Puppet
 
Puppet Intfrastructure as Code
Puppet Intfrastructure as CodePuppet Intfrastructure as Code
Puppet Intfrastructure as Code
 
Puppet fundamentals
Puppet fundamentalsPuppet fundamentals
Puppet fundamentals
 

More from Daniel Sobral

What can scala puzzlers teach us
What can scala puzzlers teach usWhat can scala puzzlers teach us
What can scala puzzlers teach usDaniel Sobral
 
Injecting Clock in Java
Injecting Clock in JavaInjecting Clock in Java
Injecting Clock in JavaDaniel Sobral
 
A JSR-310 Date: Beyond JODA Time
A JSR-310 Date: Beyond JODA TimeA JSR-310 Date: Beyond JODA Time
A JSR-310 Date: Beyond JODA TimeDaniel Sobral
 
Gestão automática de configuração usando puppet
Gestão automática de configuração usando puppetGestão automática de configuração usando puppet
Gestão automática de configuração usando puppetDaniel Sobral
 
Scala 2.10.0 (english version)
Scala 2.10.0 (english version)Scala 2.10.0 (english version)
Scala 2.10.0 (english version)Daniel Sobral
 
Palestra ganeti puppet
Palestra ganeti puppetPalestra ganeti puppet
Palestra ganeti puppetDaniel Sobral
 
Akka - Uma plataforma para o desenvolvimento de sistemas concorrentes e distr...
Akka - Uma plataforma para o desenvolvimento de sistemas concorrentes e distr...Akka - Uma plataforma para o desenvolvimento de sistemas concorrentes e distr...
Akka - Uma plataforma para o desenvolvimento de sistemas concorrentes e distr...Daniel Sobral
 

More from Daniel Sobral (10)

What can scala puzzlers teach us
What can scala puzzlers teach usWhat can scala puzzlers teach us
What can scala puzzlers teach us
 
Injecting Clock in Java
Injecting Clock in JavaInjecting Clock in Java
Injecting Clock in Java
 
A JSR-310 Date: Beyond JODA Time
A JSR-310 Date: Beyond JODA TimeA JSR-310 Date: Beyond JODA Time
A JSR-310 Date: Beyond JODA Time
 
Gestão automática de configuração usando puppet
Gestão automática de configuração usando puppetGestão automática de configuração usando puppet
Gestão automática de configuração usando puppet
 
Scala 2.10.0 (english version)
Scala 2.10.0 (english version)Scala 2.10.0 (english version)
Scala 2.10.0 (english version)
 
Scala 2.10.0
Scala 2.10.0Scala 2.10.0
Scala 2.10.0
 
Palestra ganeti puppet
Palestra ganeti puppetPalestra ganeti puppet
Palestra ganeti puppet
 
Regex
RegexRegex
Regex
 
Introdução a TDD
Introdução a TDDIntrodução a TDD
Introdução a TDD
 
Akka - Uma plataforma para o desenvolvimento de sistemas concorrentes e distr...
Akka - Uma plataforma para o desenvolvimento de sistemas concorrentes e distr...Akka - Uma plataforma para o desenvolvimento de sistemas concorrentes e distr...
Akka - Uma plataforma para o desenvolvimento de sistemas concorrentes e distr...
 

Recently uploaded

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
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
 
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
 
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
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
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
 
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
 
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
 
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]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 

Recently uploaded (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
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...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
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
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
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...
 
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
 
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]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Tutorial Puppet

  • 1. Exercício Distribuir configuração de clientes Zabbix (monitoração)
  • 2. Conceitos Resource user { 'ze': ensure => present, Type gid => 1000, User, File, Package require => Group['ze'], } Name Attributes Meta Attributes Classes Definitions Modules
  • 3. Exemplo Simples - Locales Configurar locales em um servidor Pacote locales Arquivo /etc/default/locale Arquivo /etc/locale.gen Executar /usr/sbin/locale.gen Código fonte em: https://github.com/dcsobral/puppet-exemplo-locale
  • 4. Experimentando com a linha de Comando ralsh puppet:~# ralsh user bob user { 'bob': ensure => 'absent' } puppet:~# ralsh user bob ensure=present notice: /User[bob]/ensure: created user { 'bob': ensure => 'present' } puppet:~# ralsh user bob ensure=absent notice: /User[bob]/ensure: removed user { 'bob': ensure => 'absent' }
  • 5. Experimentando com a linha de Comando puppet describe dcs@puppet:~/exemplo$ puppet describe package -s package ======= descrição e funcionamento Parameters ---------- adminfile, allowcdrom, category, configfiles, description, ensure, flavor, instance, name, platform, responsefile, root, source, status, type, vendor Providers --------- aix, appdmg, apple, apt, aptitude, aptrpm, blastwave, darwinport, dpkg, fink, freebsd, gem, hpux, nim, openbsd, pkg, pkgdmg, portage, ports, portupgrade, rpm, rug, sun, sunfreeware, up2date, urpmi, yum, zypper
  • 6. Criando Arquivos package { 'locales': ensure => installed, }
  • 7. Puppet Apply package { 'locales': ensure => installed, } file { '/etc/default/locale': ensure => present, content => 'LANG=pt_BR.UTF-8', }
  • 8. Dependências package { 'locales': ensure => installed, } file { '/etc/default/locale': ensure => present, content => 'LANG=pt_BR.UTF-8', require => Package['locales'], }
  • 9. Outros Atributos package { 'locales': ensure => installed, } file { '/etc/default/locale': ensure => present, content => 'LANG=pt_BR.UTF-8', require => Package['locales'], owner => 'root', group => 'root', mode => 644, }
  • 10. Enviando Arquivos file { '/etc/locale.gen': ensure => present, source => '/root/exemplo/locale.gen', require => Package['locales'], owner => 'root', group => 'root', mode => 644, }
  • 11. Executando Processos exec { '/usr/sbin/locale-gen': }
  • 12. Múltiplas Dependências exec { '/usr/sbin/locale-gen': require => [ Package['locales'], File['/etc/locale.gen'] ], }
  • 13. Notificações exec { '/usr/sbin/locale-gen': subscribe => File['/etc/locale.gen'], require => [ Package['locales'], File['/etc/locale.gen'] ], }
  • 14. Refresh exec { '/usr/sbin/locale-gen': subscribe => File['/etc/locale.gen'], refreshonly => true, require => [ Package['locales'], File['/etc/locale.gen'] ], }
  • 15. Classes e Nós class locale { package { 'locales': ensure => installed, } file { '/etc/default/locale': ensure => present, content => 'LANG=pt_BR.UTF-8', require => Package['locales'], } file { '/etc/locale.gen': ensure => present, source => '/root/exemplo/locale.gen', require => Package['locales'], } exec { '/usr/sbin/locale-gen': subscribe => File['/etc/locale.gen'], refreshonly => true, require => [ Package['locales'], File['/etc/locale.gen'] ], } } node default { include locale }