Giter VIP home page Giter VIP logo

mcollective-package-agent's Introduction

Package Agent

This fork is only updated for security issues and bugs with its use in Puppet Enterprise. Please file bugs with PE support. For security issues, see Puppet's product security policy.

The package agent that lets you install, uninstall, update, purge and query the status of packages on your system.

The package agent does not do any management of packages itself. Instead it uses the functionality defined in MCollective::Util::Package classes to perform the actions. By default the Package agent ships with a PuppetPackage util class, but creating your own is as simple as adding a new class to util/package/ and implementing the #install, #uninstall, #purge, #update and #status methods.

Installation

Follow the basic plugin install guide.

Configuration

There is one plugin configuration setting for the package agent.

  • provider - The Util class that implements the install, uninstall, purge, update and status behavior. Defaults to 'puppet'

General provider configuration options can then also be set in the config file.

plugin.package.provider = puppet

# Puppet provider specific options
plugin.package.puppet.allowcdrom = true

Usage

% mco rpc package install package=nano

 * [ ============================================================> ] 4 / 4



Summary of Ensure:

   2.0.9-7.el6 = 4


Finished processing 4 / 4 hosts in 18176.83 ms
% mco package nano uninstall

 * [ ============================================================> ] 4 / 4


Summary of Ensure:

   absent = 4


Finished processing 4 / 4 hosts in 393.68 ms
% mco rpc package install package=openssl version=0.9.8k-7ubuntu8

 * [ ============================================================> ] 4 / 4



Summary of Ensure:

   0.9.8k-7ubuntu8 = 4


Finished processing 4 / 4 hosts in 18176.83 ms

Data Plugin

The Package agent also supplies a data plugin which uses the Package agent to check the current status of a package. The data plugin will set installed to true/false if the package is not installed or not, and will set status to the currently installed version if it is present and can be used during discovery or any other place where the MCollective discovery language is used.

mco rpc rpcutil ping -S "package('mypackage').installed=false"

mco rpc rpcutil ping -S "package('mypackage').status=3.2-1"

Extending

The default package agent achieves platform portability by using the Puppet provider system to support package managers on all platforms that Puppet supports.

If however you are not a Puppet user or simply want to implement some new method of package management you can do so by providing your own backend provider for this agent.

The logic for the Puppet version of this agent is implemented in Util::Package::PuppetPackage, you can create a custom package implementation that overrides #install, #uninstall, #update, #purge and #status.

This agent defaults to Util::Package::PuppetPackage but if you have your own you can configure it in the config file using:

plugin.package.provider = puppet

mcollective-package-agent's People

Contributors

richardc avatar ploubser avatar mikaelsmith avatar frangm avatar haus avatar melissa avatar reguero avatar mruzicka avatar gunzl1ng3r avatar fiddyspence avatar treydock avatar ripienaar avatar nicklewis avatar teancom avatar davewongillies avatar cristi- avatar br0ch0n avatar

Watchers

 avatar Reid Vandewiele avatar Brad Heller avatar Michael Sigler avatar Alex Dreyer avatar Filip Hrbek avatar Chris Roddy avatar James Cloos avatar Alanna Brown avatar  avatar adam buxton avatar  avatar Thomas Linkin avatar Joe Wagner avatar Boris Veltman avatar Keith Apps avatar  avatar  avatar Rajesh Radhakrishnan avatar Spencer avatar  avatar Matthew Stone avatar Kyoko Zuch avatar Lavinia Dan avatar  avatar Troy Klein avatar  avatar  avatar Pamela Ju avatar  avatar  avatar  avatar Cody Clements avatar Patrick Merritt avatar John Coffey avatar  avatar  avatar Dario Molinari avatar MarkW avatar Paul Anderson avatar Nick Burgan avatar  avatar Gillian Weisgram avatar Paul Reed avatar  avatar Sebastian Adam avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.