Chapter 3. Command-Line Client

In this chapter, I’m going to introduce some key terms and concepts you’ll hear continuously throughout the book. Each section will introduce and explain the concept, and (if applicable) the plugin that implements its usage.

The most common way to interact with mcollective is the mco command-line client, which can be used interactively or in scripts. It’s also relatively easy to write other clients in Ruby, which can be used as backends for GUI apps or as glue in a reactive infrastructure. We’ll cover how to build your own clients in Part III. In this chapter, we’re going to focus on the command-line client.

As I introduce each concept, I’ll show you command lines that use that feature. As we will only use the ping and find commands, these are safe to run in your own MCollective setup. Feel free to run each of them and see what results you receive.

Configuration File

The global configuration file for an MCollective client will be stored in the installation directory, usually /etc/mcollective/client.cfg.

Users can create their own configuration files. The default file name is .mcollective in the user’s home directory. Alternative config files can be specified with -c configfile on the command line. Each configuration file must be whole and complete. If you specify a configuration file, then the global configuration file is ignored.

In the first part of this book, user-specific configuration files are not necessary. All changes can be made to the ...

Get Learning MCollective now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.