The Puppet Commander solves the problem where at times even when using splay you will find a large amount of checkins hitting your master and overwhelming it.
The basic theory is that using the Puppet Agent plugin we can figure out how many machines are currently running and we can schedule runs. We can thus ensure that at any given time we only schedule a certain amount of current runs. This will help you with capacity planning of your masters.
As a side effect it also means if you are busy managing servers and running puppetd –test runs or some other scheduled runs the commander will back down and not schedule runs, leaving the resources of the master free for your interactive use.
A sample config file can be seen below:
--- :filter: "country=/de|uk|za/" :interval: 30 :concurrency: 2 :randomize: true :logfile: /var/log/puppetcommander.log :daemonize: true
It runs my nodes in de, uk and za in 30 minutes, never more than 2 at a time. It will shuffle the nodes it discovered and log to the given log file.
The filter option above is quite limiting, from MCollective 1.1.0 and newer to supply filters do the following in /etc/sysconfig/puppetcommanderd, this lets you supply a much richer set of filters than before.
export MCOLLECTIVE_EXTRA_OPTS="-W country=/de|uk|za/"
And set the filter in the YAML above to: