Online Book Reader

Home Category

Managing Infrastructure with Puppet - James Loope [15]

By Root 126 0
a sort of metacommand, allowing access to all of the available agents. We can execute the puppetd agent, for example, with the following syntax:

:> mc-rpx --agent puppetd --with-class example runonce

Alternatively, we can use mc-rpc to read out the documentation for a particular agent:

:> mc-rpc --agent-help puppetd

SimpleRPC Puppet Agent

======================

Agent to manage the puppet daemon

Author: R.I.Pienaar

Version: 1.3-sync

License: Apache License 2.0

Timeout: 120

Home Page: http://mcollective-plugins.googlecode.com/

ACTIONS:

========

disable, enable, runonce, status

disable action:

---------------

Disables the Puppetd

INPUT:

OUTPUT:

output:

Description: String indicating status

Display As: Statc

runonce action:

---------------

Initiates a single Puppet run

INPUT:

OUTPUT:

output:

Description: Output from puppetd

Display As: Output

status action:

--------------

Status of the Puppet daemon

INPUT:

OUTPUT:

enabled:

Description: Is the agent enabled

Display As: Enabled

lastrun:

Description: When last did the agent run

Display As: Last Run

output:

Description: String displaying agent status

Display As: Status

running:

Description: Is the agent running

Display As: Running

You’ve seen the basic features of MCollective in this chapter. It works as a great orchestration tool for Puppet, allowing you greater control over your Puppet agents and more insight into your configurations through Facter. Beyond this, the agents are fairly simple to write and can be used to accomplish any task that you might want to execute in a distributed fashion across all or part of your infrastructure. Puppet Labs provides documentation on extending MCollective with custom agents with SimpleRPC at http://docs.puppetlabs.com/mcollective/simplerpc/agents.html.

About the Author


James Loope is the Operations Lead at Janrain. He is a specialist in scalable infrastructure, virtualization, cloud infrastructure and computer security.

Colophon


The animal on the cover of Managing Infrastructure with Puppet is an English setter.

The cover image is from Wood’s Animate Creations. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont’s TheSansMonoCondensed.

Return Main Page Previous Page

®Online Book Reader