Puppet: Difference between revisions

From Halfface
Jump to navigation Jump to search
No edit summary
 
(28 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Incomplete}}
==Test run puppet==  
This is only a draft to write down all the things I got from the work that Ohad started:
puppet agent --test --debug --noop
 
==list certificate requests==
== Introduction ==
  puppet ca list
 
==list certs==
=== Links ===
  puppet cert list
{{Webpage|reductivelabs.com/trac/puppet/wiki/PuppetIntroduction#why-puppet-exists|Puppet Introduction}}
==remove cert==
{{Webpage|reductivelabs.com/trac/puppet/wiki/DocumentationStart|General Puppet documentation}}
puppet cert clean host.domain.se
{{Webpage|reductivelabs.com/trac/puppet/wiki/LanguageTutorial|Puppet language tutorial}}
=remove cache directory=
 
  locate puppet/cache
Puppet-daemons:
[[Category:Applications]]
Client:  puppetd  (call with -t and -d option to see what he does)
[[Category:Unix]]
Server:  puppetmasterd
[[Category:Automation]]
 
 
== 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
 
== 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/

Latest revision as of 09:19, 7 October 2019

Test run puppet

puppet agent --test --debug --noop

list certificate requests

puppet ca list

list certs

puppet cert list 

remove cert

puppet cert clean host.domain.se

remove cache directory

locate puppet/cache