IoT-Unit5-Part3-Tools For IoT
IoT-Unit5-Part3-Tools For IoT
Puppet
Chef
Overview
Why Puppet?
Introduction to Puppet
Puppet in a nutshell
Puppet's modules
CERN openlab
Introduction to Puppet
What Is Puppet?
In author's own words:
“Puppet is a system for automating system
administration tasks.”
An open-source project written in Ruby and
system configuration
Cross-platform – Linux, Unix, Windows
autosign.conf (used
CERN openlab Presentation 2011 by puppetmaster) 11
Puppet in a nutshell
Puppet's language
Resources (file, service, user) – describe
configurations using attributes(ensure,
mode, source)
(Parameterized) Class – a named
collection of resources
Definition – abstract description of class
with the idea to be used multiple times
Recipe/Manifest – sample puppet
code(*.pp)
Variables, Arrays, Hashes, Selectors and
If/else, case statements
CERN openlab Presentation 2011 12
Puppet in a nutshell
Example:
package { "ntp":
ensure => installed,
}
service { "ntp":
ensure => running,
require => Package[“ntp”],
}
$file = “/etc/sample”
file { $file:
ensure => present,
source => “puppet:///example/$hostname”,
}
CERN openlab Presentation 2011 13
Puppet in a nutshell
Facter
Holds a stash of predefined variables
Custom facts could be added
Prefixed with “$” or “$::” (explicit)
architecture => amd64
domain => example.com
facterversion => 1.5.7
fqdn => client.example.com
hardwareisa => unknown
hardwaremodel => x86_64
hostname => client
MODULE_PATH/
└──downcased_module_name/
├──files/
├──manifests/
│ ├──init.pp
├──templates/
└──README