Forge Home

pe_slack_bot

A module to configure the pe-slack-bot for interacting with Puppet Orchestrator / PuppetDB

11,283 downloads

6,968 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 1.0.2 (latest)
  • 1.0.0
  • 0.1.10
  • 0.1.9
  • 0.1.8
  • 0.1.7
  • 0.1.6
  • 0.1.5
  • 0.1.4
  • 0.1.3
  • 0.1.1
  • 0.1.0
released Dec 28th 2016
This version is compatible with:
  • Puppet Enterprise >=2015.2.0 < 2016.2.0

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'ncorrare-pe_slack_bot', '1.0.2'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add ncorrare-pe_slack_bot
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install ncorrare-pe_slack_bot --version 1.0.2

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

ncorrare/pe_slack_bot — version 1.0.2 Dec 28th 2016

pe_slack_bot

Build Status

Table of Contents

  1. Overview
  2. Setup - The basics of getting started with skel
  3. Limitations - OS compatibility, etc.
  4. Development - Guide for contributing to the module

Overview

This module configures the PE Bot for Slack.

Setup

Setup Requirements

Classify your Master with the pe_slack_bot. You'll need at least to make your $slack_api_key available as a variable. You can get it by clicking the Add to Slack Button below (it will call back to a web page showing your API Key for the bot).

In order to do orchestration tasks, you'll need to configure the right permissions in "Access Control", in the PE Console, and a token in /opt/puppetlabs/server/data/puppetserver/.puppetlabs/token.

The following animations briefly illustrate how to do it, but for more information please refer to the Puppet Enteprise documentation

Beginning with pe_slack_bot

First /invite puppet to your channel. Check the documentation on how to use the bot, or try on of the following:

  • puppet status $certname
  • puppet job list
  • puppet job show $showid
  • puppet app list
  • puppet job run

What pe_slack_bot affects

The bot is designed to run with the Puppet Enterprise Ruby (in order not to affect neither Puppet nor the system ruby). It does however install a number of gems:

  • puma
  • sinatra
  • dotenv
  • slack-ruby-bot
  • puppetdb-ruby
  • foreman
  • json_pure
  • rspec
  • rake-tests

It also creates a configuration file in the Puppet configuration directory (/etc/puppetlabs/puppet by default), and a systemd service to run the bot at start time (after the start of pe-orchestration-services). Finally in clones the master (stable) branch of the bot from https://github.com/ncorrare/pe-slack-bot in /opt/pe-slack-bot. You can specify a $version variable upon classification to fix it to a specific tag.

Limitations

This bot has only been tested in Centos 7, but it should work with most of the certified PE Master operating systems (that use systemd). I'll try to extend the testing to other platforms, and possibly add backwards compatibility to init.d.

Development

Send a PR to either the Puppet module or the bot. I haven't had time to write unit tests yet, but they'll be added shortly. Travis is used for CI so every PR is automatically tested. Upon merging, a new release of the module will be pushed to the forge.