• Overview
  • Deploying MCollective
  • Configuration / Deployment Topics
  • Use and Administer MCollective
  • Write Agent Plugins
  • Write Clients and Applications
  • Write Other Plugins
  • Plugin Directory
  • Internals
  • Older and Non-Recommended Information

MCollective Plugin: Packages Agent

Sections

Packages agent for MCollective - a agent to install/upgrade/downgrade multiple packages at a time.

When using MCollective to roll-out changes in a Continuous Delivery environment, the included has some shortcomings, the main one being that it does not support multiple packages in one run, which adds overhead.

Packages agent tackles the following requirements

  1. The client does not know wether a package is already installed or not.
  2. Allow install, update and downgrade.
  3. Handle multiple packages in one operation.
  4. Respond with a list of packages and their exact version/revision installed.
  5. Re-try operations when they fail.
  6. Include “yum clean expire-cache”

Limitations

Mainly tested on Scientific Linux 6.1.

Installation

The source is on GitHub

Usage

Install multiple packages at a time:

% mco packages uptodate htop iotop
Do you really want to operate on packages unfiltered? (y/n): y

 * [ ============================================================> ] 5 / 5

ip-10-56-51-48                           = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
ip-10-56-5-253                           = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
ip-10-250-141-198                        = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
ip-10-56-46-219                          = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
ip-10-250-126-24                         = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::

Request installation of specific version (and disable y/n for automated deployments):

# mco packages --batch uptodate htop/0.8.3/2.el6 iotop/0.3.2/3.el6

 * [ ============================================================> ] 5 / 5

ip-10-56-46-219                          = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
ip-10-56-5-253                           = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
ip-10-250-126-24                         = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
ip-10-56-51-48                           = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
ip-10-250-141-198                        = OK ::: [{"name":"htop","tries":1,"version":"0.8.3","status":0,"release":"2.el6"},{"name":"iotop","tries":1,"version":"0.3.2","status":0,"release":"3.el6"}] :::
See an issue? Please file a JIRA ticket in our [DOCUMENTATION] project
Puppet sites use proprietary and third-party cookies. By using our sites, you agree to our cookie policy.