O'Reilly logo

Learning MCollective by Jo Rhett

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Custom Plugins

In this chapter we will are going to cover how to create, test, and use custom plugins. We’ll cover how to:

  1. Provide new, custom requests you can make to your servers.
  2. Make MCollective requests from a script rather than through the mco command line too.
  3. Collect registration data from your servers.
  4. Send the results of MCollective requests to a program, instead of returning to your screen.

This section is where you’ll learn exactly how mutable and adaptable MCollective can be to service your needs.

The first thing we’re going to do is build our own custom Agent and Client. As discussed in Agent Plugins, the agent implements server-side functionality that a client can create requests for.

We will start with a basic template useful as a starting point for agent development. We’ll expand the basics to provide additional features, and discuss different ways to work with the MCollective plugin ecosystem.

When you are done with this chapter you’ll have an actual working agent and client to use as a starting point for building your own custom agent.

Building an Agent

The first thing we’re going to do is build a custom Agent. We will start with a basic template useful as a starting point for agent development. After reading this chapter you’ll be able to take this agent and replace just a few lines of Ruby with any code you want to put there.

SimpleRPC Framework

As we build MCollective clients and agents we will be utilizing a set of libraries which comprise the SimpleRPC ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required