Puppet
Revision as of 14:52, 10 October 2007 by 217.10.60.85 (talk)
Template:Incomplete
This is only a draft to write down all the things I got from the work that Ohad started:
Introduction
Links
Template:Ibox Template:Ibox Template:Ibox
Puppet-daemons: Client: puppetd (call with -t and -d option to see what he does) Server: puppetmasterd
Puppet installation
- see RD-Computefarm-Checklist before starting
- Puppet-Server: puppet.klu.infineon.com (this is a alias that points to kluls231.klu.infineon.com)
- Puppet-rpms:
- puppet-server-0.23.2-1.el4 (Server package)
- puppet-0.23.2-1.el4 (client package)
- The client rpm automatically tries to contact the server with the name puppet.<local-domain>
Puppet configuration
Configuration directories and files
(Stored in svn,http://svn.klu.infineon.com/repos/AdminToolKit/trunk/puppet ):
- /etc/puppet:
- facts (fact definiton, e.g. sitename, which can be used in the rules afterwards)
- manifests (definitions and rules,...)
- ssl
- fileserver.conf (defining where files are served from and to whom)
- /var/lib/puppet: (place where the puppet-files are stored)
- <site> (Site specific files, place defined in fileserver.conf)
- <site>/push
- <site>/static
- <site> (Site specific files, place defined in fileserver.conf)
Some configuration files with short describtion
To get a feeling for the language:
/etc/puppet/manifests/site.pp (read by the puppetmaster to find out what do to for the site)
#import custom facts file { $factdir: source => "puppet://$servername/facts", recurse => true } # import the functions import "functions.pp" # import site defenitions import "sitedef.pp" # import all of the server classes import "classes/*" # Common settings import "common.pp" # vim: set syntax=puppet
/etc/puppet/fileserver.conf:
# This file consists of arbitrarily named sections/modules # defining where files are served from and to whom # Define a section 'files' # Adapt the allow/deny settings to your needs. Order # for allow/deny does not matter, allow always takes precedence # over deny [klu] path /var/lib/puppet/files/klu # Files specially for the klu site allow *.klu.infineon.com # only machines in KLU see them [kia] # same for the other sites ... [facts] # place for the fact definitions path /etc/puppet/facts allow *.infineon.com
/etc/puppet/facts (example fact definiton)
# returns site name to facter # ohad.levy@infineon.com # Solaris returns the LDAP domain instead of DNS domain Facter.add("sitename") do setcode do %x{hostname | cut -c 1-3}.chomp end end
Useful links
Autogenerate puppet pp files.
http://cft.et.redhat.com/