Using with Puppet
If you’re a Puppet user you are supported in both facts and classes filters.
There are a number of community plugins related to Puppet:
- Manage the Puppetd, request runs, enable and disable - AgentPuppetd
- Manage the Puppet CA, sign, list and revoke certificates - AgentPuppetca
- Use the Puppet Ral to create resources on demand, a distributed ralsh - AgentPuppetRal
- Schedule your puppetd’s controlling concurrency and resource usage - PuppetCommander
- The ServiceAgent and PackageAgent use the Puppet RAL to function on many operating systems
There are also several blog posts related to Puppet and MCollective:
- Running puppet on a number of nodes as quick as possible - RapidRuns
- Bootstrapping a Puppet + EC2 environment with Puppet - EC2Bootstrap
- Using the Puppet RAL with MCollective - PuppetRalBlog
- General scheduling of Puppet Runs - SchedulingPuppet
- Managing Puppetd - ManagingPuppetd
- Bootstrapping your cloud environment - CloudBootstrap
Facts
There is a community plugin to enable Facter as a fact source.
So you can use the facts provided by Facter in filters, reports etc.
$ mco find --with-fact lsbdistrelease=5.4
This includes facts pushed out with Plugin Sync.
A less resource intensive approach has can be found here, it converts the Puppet scope into a YAML file that the YAML fact source then loads. This is both less resource intensive and much faster.
Class Filters
Puppet provides a list of classes applied to a node by default in /var/puppet/state/classes.txt or /var/lib/puppet/state/classes.txt (depending on which Puppet version you are using. The latter is true for 0.25.5 onwards) , we’ll use this data with –with-class filters.
You should configure MCollective to use this file by putting the following in your server.cfg
classesfile = /var/lib/puppet/classes.txt
or if using Puppet 0.23.0 and onwards
classesfile = /var/lib/puppet/state/classes.txt
You can now use your classes lists in filters:
$ mco find --with-class /apache/