Puppet
Infrastructure as Code
Samir Chekkal
https://twitter.com/chekkal
Configuration Management
CM Tools
Puppet
Chef
CFEngine
Salt
Ansible
Puppet
Configuration Management Tool
A Declarative Domain Specific Language (DSL)
Final State of the System
Directory Layout
|-- Puppetfile
|-- modules
|-- manifests: *.pp
|-- templates: *.rb
|-- files
|-- lib
Resource Abstraction Layer
Puppet DSL Example
package { 'openssh-server':
ensure => installed,
}
file { '/etc/ssh/sshd_config':
source => 'puppet:///modules/sshd/sshd_config',
owner => 'root',
group => 'root',
mode => '640',
notify => Service['sshd'], # sshd will restart whenever you edit this file.
require => Package['openssh-server'],
}
service { 'sshd':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
}
type title argument
Operational modes
Puppet Standalone
Puppet Master/Client
Puppet Standalone: $ puppet apply
Puppet Master: $ puppet agent -t
Resources
https://docs.puppetlabs.com/
https://puppetlabs.com/download-learning-vm
http://www.example42.com/tutorials/PuppetTutorial/
https://en.wikipedia.org
https://www.iconfinder.com/iconsets/designer-skills

Puppet Intfrastructure as Code