Tutorial Puppet
Upcoming SlideShare
Loading in...5
×
 

Tutorial Puppet

on

  • 966 views

Tutorial dos conceitos básicos de Puppet, uma ferramenta de gestão automática de configuração de servidores. ...

Tutorial dos conceitos básicos de Puppet, uma ferramenta de gestão automática de configuração de servidores.

Essa apresentação está incompleta, pois foi parte de um curso básico sobre Puppet.

Statistics

Views

Total Views
966
Views on SlideShare
965
Embed Views
1

Actions

Likes
0
Downloads
5
Comments
0

1 Embed 1

https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Tutorial Puppet Tutorial Puppet Presentation Transcript

  • ExercícioDistribuir configuração de clientes Zabbix (monitoração)
  • ConceitosResource user { ze: ensure => present, Type gid => 1000, User, File, Package require => Group[ze], } Name Attributes Meta AttributesClassesDefinitionsModules
  • Exemplo Simples - LocalesConfigurar locales em um servidor Pacote locales Arquivo /etc/default/locale Arquivo /etc/locale.gen Executar /usr/sbin/locale.genCódigo fonte em: https://github.com/dcsobral/puppet-exemplo-locale
  • Experimentando com a linha de Comandoralsh 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 Comandopuppet 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 Arquivospackage { locales: ensure => installed,}
  • Puppet Applypackage { locales: ensure => installed,}file { /etc/default/locale: ensure => present, content => LANG=pt_BR.UTF-8,}
  • Dependênciaspackage { locales: ensure => installed,}file { /etc/default/locale: ensure => present, content => LANG=pt_BR.UTF-8, require => Package[locales],}
  • Outros Atributospackage { 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 Arquivosfile { /etc/locale.gen: ensure => present, source => /root/exemplo/locale.gen, require => Package[locales], owner => root, group => root, mode => 644,}
  • Executando Processosexec { /usr/sbin/locale-gen:}
  • Múltiplas Dependênciasexec { /usr/sbin/locale-gen: require => [ Package[locales],File[/etc/locale.gen] ],}
  • Notificaçõesexec { /usr/sbin/locale-gen: subscribe => File[/etc/locale.gen], require => [ Package[locales],File[/etc/locale.gen] ],}
  • Refreshexec { /usr/sbin/locale-gen: subscribe => File[/etc/locale.gen], refreshonly => true, require => [ Package[locales],File[/etc/locale.gen] ],}
  • Classes e Nósclass 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}