PuppetTricks: Difference between revisions

From DISI
Jump to navigation Jump to search
m (→‎On Client: spelling)
Line 7: Line 7:


=== On Client ===
=== On Client ===
     $ sudo servce puppet stop
     $ sudo service puppet stop
     $ sudo mv /var/lib/puppet/ssl /var/lib/puppet/ssl~
     $ sudo mv /var/lib/puppet/ssl /var/lib/puppet/ssl~
     $ puppet agent --no-daemonize --onetime --verbose --waitforcert=60
     $ puppet agent --no-daemonize --onetime --verbose --waitforcert=60

Revision as of 23:08, 24 July 2017

This page is a collection of tricks and tips for using Puppet to administer systems.

The names master, puppetmaster, and foreman all refer to (at the time of writing this) alpha. The name client refers to any machine that is maintained by puppet.


Regenerating a Certificate

On Client

   $ sudo service puppet stop
   $ sudo mv /var/lib/puppet/ssl /var/lib/puppet/ssl~
   $ puppet agent --no-daemonize --onetime --verbose --waitforcert=60

On Server (within 60 seconds)

   $ sudo puppet cert clean <client hostname>
   $ sudo puppet cert sign <client hostname>
      OR if you wish to allow DNS aliases
   $ sudo puppet cert --allow-dns-alt-names sign <client hostname>

Note this can also be done through Foreman by going to the Infrastructure -> Smart Proxies -> Puppetmaster -> Certificates page

On Client

The previous run should finish without errors (errors are in purple). It should then be possible to run `sudo puppet agent -t` without any waiting or errors.


changing mounts, dbraw =

cd /opt/bks/src/cluster/puppet/modules/bks-nfs_mounts/files/dbraw

or edit

manifests/init.pp

Then from nfs_mounts directory

  • 1) Bump version in Modulefile
  • 2) puppet module build .
  • 3) puppet module install -f pkg/bks-nfs_mounts-0.0.X.tar.gz
  • 4) proceed to standard goat sacrifice procedure