pe_mco_shell_agent

Puppet deployment wrapper for the mco shell agent

reidmv

reidmv

21,845 downloads

15,278 latest version

4.6 quality score

Version information

  • 2.0.0 (latest)
  • 1.1.0
  • 1.0.1
  • 1.0.0
  • 0.1.2
  • 0.1.1-uploadtest2 (deleted)
  • 0.1.1-uploadtest1 (deleted)
  • 0.1.1 (deleted)
  • 0.1.0-dev1 (deleted)
  • 0.1.0
released Mar 9th 2017
This version is compatible with:
  • RedHat, Windows, Debian, Ubuntu, Solaris, SLES, AIX

Start using this module

Documentation

reidmv/pe_mco_shell_agent — version 2.0.0 Mar 9th 2017

pe_mco_shell_agent

Build Status

####Table of Contents

  1. Overview
  2. Setup
  3. Usage
  4. Limitations

##Overview

Installs the mcollective-shell-agent plugin for Puppet Enterprise MCollective installs.

##Setup

###What pe_mco_shell_agent affects

  • Creates a plugin directory under MCollective's libdir:
    • PE <= 3.8 - /opt/puppet/libexec/mcollective
    • PE >= 2015.1 - /opt/puppetlabs/mcollective/plugins/
  • Restarts the service on changes

Configuration

  • Easiest setup is adding class pe_mco_shell_agent to the PE MCollective node group. The install_app and install_agent parameters can be set to either install or uninstall/not install the application and agent, respectively.

  • If setting up via code the following can be done:

To setup the MCO agent onto nodes the defaults can be used:

include pe_mco_shell_agent

or

class { 'pe_mco_shell_agent': }

To setup the MCO application on a node that has a MCO client present use:

class { 'pe_mco_shell_agent':
  install_app => true,
}

If the MCO agent is not required on the MCO client node this can be removed/not installed by:

class { 'pe_mco_shell_agent':
  install_app   => true,
  install_agent => false,
}

Usage

For full documentation of the plugin see https://github.com/puppetlabs/mcollective-shell-agent

Here's some examples:

run

# su - peadmin

$ peadmin@master:~$ mco shell run 'echo Hello world'

 * [ ============================================================> ] 1 / 1

master.vm:
Hello world


Finished processing 1 / 1 hosts in 173.74 ms

start

Run a script ascryonously. Returns an ID that can be watched or killed

peadmin@master:/home/vagrant$ mco shell start "sleep 5 && echo '5 seconds'"

 * [ ============================================================> ] 1 / 1

precise64.home: 116f9387-78d6-43dc-a493-232a41c1d9be

Finished processing 1 / 1 hosts in 175.77 ms

list

Used to list the job ID's for jobs from start

peadmin@master:/home/vagrant$ mco shell start "sleep 5 && echo '5 seconds'"

 * [ ============================================================> ] 1 / 1

precise64.home: 116f9387-78d6-43dc-a493-232a41c1d9be

Finished processing 1 / 1 hosts in 175.77 ms

show

Used to see the output for jobs run by start

peadmin@master:/home/vagrant$ mco shell watch 116f9387-78d6-43dc-a493-232a41c1d9be

 * [ ============================================================> ] 3 / 3

precise64.home stdout: 5 seconds

kill

Used to see the kill a job run by start

peadmin@master:/home/vagrant$ mco shell kill 116f9387-78d6-43dc-a493-232a41c1d9be

 * [ ============================================================> ] 3 / 3

precise64.home stdout: 5 seconds

##Limitations

Primary support is for Debian-family and RedHat, but should work on all Linux flavours.

Partial Windows suport is also available