4. *
admins are generally as lazy as
possible...
for s in $(<some_outdated_list.txt)
do
ssh $s „/bin/false“
done
http://optempo.com/images/trained_monkey.gi
f
10. *
1. describe what you want to be configured
2. (don‘t care how it is done)
3. describe dependencies
file package service types
win *nix deb rpm POSIX win providers
13. *
before after
without refresh before => Resource[‚name‘] require => Resource[‚name‘]
with refresh notify => Resource[‚name‘] subscribe => Resource[‚name‘]
in our resources
chaining syntax
Resource[‚‘] -> Resource[‚name‘] ~> Resource[‚name‘]
15. 1. retreive plugins
from server
2. get „facts“ on client
and send them to
master
3. compile catalog and
send it to the client
4. apply catalog on
client
5. process report
16. *
* Manifest: your Puppet DSL (*.pp)
* Catalog: serialized host specific DSL
* Facts: host specific set of vars
* Plugins: puppet extensions
* facts, types, providers, reports...
21. *
directory structure in %modulepath:
mkdir –p modulename/{manifests,files,templates,lib,spec}
- manifests : where your .pp goes
- files : where your static content goes
- templates : where your dynamic content goes
(remember facts)
- lib : where your advanced puppet knowledge goes
- specs : home of Q&A‘s happiness
25. [root@puppet ~]# puppet help
Usage: puppet <subcommand> [options] <action> [options]
Available subcommands:
agent The puppet agent daemon
apply Apply Puppet manifests locally
cert Manage certificates and requests
master The puppet master daemon
module Creates, installs and searches for modules on the Puppet Forge.
parser Interact directly with the parser.
puppet apply:
• apply manifests locally
• no master needed
• no centralized fileserver
• test
• headless puppet
• no SSL-communication allowed
26. [root@puppet ~]# puppet help
Usage: puppet <subcommand> [options] <action> [options]
Available subcommands:
agent The puppet agent daemon
apply Apply Puppet manifests locally
cert Manage certificates and requests
master The puppet master daemon
module Creates, installs and searches for modules on the Puppet Forge.
parser Interact directly with the parser.
puppet master:
• starts https service
• TCP/8140
• internal webserver (ruby)
• scalable (mod_passenger)
puppet agent:
• manages puppet runs on client
• regularly
• one-time
27. [root@puppet ~]# puppet help
Usage: puppet <subcommand> [options] <action> [options]
Available subcommands:
agent The puppet agent daemon
apply Apply Puppet manifests locally
cert Manage certificates and requests
master The puppet master daemon
module Creates, installs and searches for modules on the Puppet Forge.
parser Interact directly with the parser.
puppet module:
• interacts with puppetlabs module repository
puppet parser validate:
• syntax check manifests
31. *
* connect to your learning instance and play around a bit
* launch puppet help
* launch a puppet master
* launch a client side puppet run
* find configuration files
* inspect the process list / ports
* find your manifests, site.pp, modules
* create an empty testfile via local puppet run
* implement a NTP module _1
* make sure NTPd is installed
* deliver your ntp.conf via puppet
* make sure NTPd is running
pingyourselfifidle:pinglocalhost
32. *
* implement a NTP module _2
* make sure NTPd is installed
* deliver your ntp.conf via puppet – dynamic content
* make sure NTPd is running
pingyourselfifidle:pinglocalhost
33. *
* implement a NTP module _3
* make sure NTPd is installed
* deliver your ntp.conf via puppet
* dynamic file content
* make sure NTPd is running
* first install NTPd, then configure it, then handle the service
* restart the service, if configuration file has been changed
pingyourselfifidle:pinglocalhost