Files
Controls-docs/admin-guide/legacy/misc/puppetmanifestsforsl53.rst
T
2021-05-05 14:24:27 +02:00

2.8 KiB

Puppet Manifests for SL 5.3

Introduction

As we are planning to upgrade from SL 5.1 to SL 5.3, we decided to reorganize and reimplement all the client configuration manifests.

Procedure

Note: Here we are still in the development state, thus filenames and everything probably will be changed for the productive setup.

Puppet SVN

To manage the changes to manifests and client configuration files we use subversion (svn) as a revision control:

# ENV=CnodeSL5
# mkdir /var/puppet/environments/$ENV
# cd /var/puppet/environments/$ENV

Check out all manifests:

# svn co svn+ssh://svn.psi.ch/repos/linux/kickstart/trunk/puppet/manifests

Check out modules individually:

# mkdir /var/puppet/environments/$ENV/modules
# cd /var/puppet/environments/$ENV/modules
# svn co svn+ssh://svn.psi.ch/repos/linux/kickstart/trunk/puppet/Modules/facts
# svn co svn+ssh://svn.psi.ch/repos/linux/kickstart/trunk/puppet/Modules/cnode
# svn co svn+ssh://svn.psi.ch/repos/linux/kickstart/trunk/puppet/Modules/psibasic
# svn co svn+ssh://svn.psi.ch/repos/linux/kickstart/trunk/puppet/Modules/ssh
# svn co svn+ssh://svn.psi.ch/repos/linux/kickstart/trunk/puppet/Modules/ntp
# svn co svn+ssh://svn.psi.ch/repos/linux/kickstart/trunk/puppet/Modules/scratch

On the Puppet Server Side

Restart the puppet server. For testing use some increased verbosity (-v), debug mode (-d) and log to a file (-l). Set these options in /etc/init.d/puppetmaster using variable `PUPPETMASTER_OPTS`:

# vi /etc/init.d/puppetmaster
...
PUPPETMASTER_OPTS="-v -d -l /var/log/puppet/puppetmaster.log"
...

# /etc/init.d/puppetmaster restart

On the Puppet Client Side

To specify which environment the Puppet client uses you can specify a value for the environment configuration variable in the client's puppet.conf file. Here the environment developmentSL53 is set.

Additionally the name of the puppet server psi-puppet1.psi.ch is assigned:

# vi /etc/puppet/puppet.conf
[main]
    vardir = /var/puppet
    logdir = /var/log/puppet
    rundir = /var/run/puppet
    ssldir = $vardir/ssl
    environment = developmentSL53

[puppetd]
    classfile = $vardir/classes.txt
    localconfig = $vardir/localconfig
    factsync = true
    server = psi-puppet1.psi.ch

In the Kickstart

In the SL 5.3 Installation Tree

Create the base directories, its subdirectories and some first test file for the Basic class as declared above in the manifest basic.pp on the server:

# cd /afs/psi.ch/software/linux/dist/scientific/53/
# mkdir -p puppet/files/Basic/etc 
# touch puppet/files/Basic/etc/puppet-test-file