• Overview
  • Deploying MCollective
  • Configuration / Deployment Topics
  • Use and Administer MCollective
  • Write Agent Plugins
  • Write Clients and Applications
  • Write Other Plugins
  • Plugin Directory
  • Internals
  • Older and Non-Recommended Information

MCollective Plugin: Puppet Commander

Sections

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.

Installation

  • You need to have Puppet Agent installed and working.
  • You should not be running the Puppet Daemons, shut those services down.
  • Get the code from GitHub.
  • Place the puppetcommanderd script in /usr/sbin.
  • Place the puppetcommander.init in your rc directory, often that is /etc/init.d/puppetcommander and enable it.
  • Create /etc/sysconfig/puppetcommanderd and set any settings like those for security plugins or MCOLLECTIVE_EXTRA_OPTS.
  • Create /etc/puppetcommander.cfg from the provided template.

Configuration

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:

:filter: ""
See an issue? Please file a JIRA ticket in our [DOCUMENTATION] project
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.