Integrate Rundeck notifications with Slack

There are many plugins available for Rundeck to integrate with Slack. In this blog, I’ve explained in simple steps to configure Rundeck Job Notifications with Slack. This blog is useful for the use-cases like audit, monitor and maintain logs of Rundeck job executions.

I spent many hours of searching and fixing unexpected errors/issues in different version of Rundeck, which are all covered and documented as simple steps in this blog.

I’m using Higanworks’s plugin downloadable from GitHub

Advantages:

  • Single window to view all notifications from Rundeck {better than pile of emails}
  • Multiple users/groups can be notified by adding them to the notifications channel {no need to mess with distribution lists etc}
  • Logging and Auditing now made easier by using the powerful search options available in Slack

Requirements:

  • Rundeck 2.10.x or above {Running on CentOS 7}
  • openjdk version “1.8.0_171”
    OpenJDK Runtime Environment (build 1.8.0_171-b10)
    OpenJDK 64-Bit Server VM (build 25.171-b10, mixed mode)
  • Rundeck-slack-incoming-webhook-plugin v.0.6.dev or above
  • Working Slack user account,
  • Dedicated channel for Rundeck notifications with webhook app enabled

Downloads:

Pre-Installation Steps

  • Create a new private channel in slack {e.g: rundeck_notifications}
  • Webhook URL for the newly created channel. Refer Slack guide

Install and Configuration Steps

By now server is ready with installation of Rundeck and plugin downloaded from the Github. Make sure Rundeck server has internet access to connect and send messages to slack.

  • Copy rundeck-slack-incoming-webhook-plugin-x.y.z.jar executable file to Rundeck’s libext directory {/var/lib/rundeck/libext}

2018-06-17 11_11_23-Mint [Running] - Oracle VM VirtualBox

  • After the above file is placed in the libext directory, Rundeck automatically configure the plugin and no further user actions required. No need to restart Rundeck service. Please refer Rundeck Plugins Installation Guide for further details.
  • Below screenshot show new option ‘Slack Incoming Webhook’ available while Creating/Editing jobs in Rundeck. Paste here the webhook generated for new rundeck_notifications channel

configuration

  • Sample output for reference. Slack channel rundeck_notifications showing notifications generated by Rundeck Job executions

2018_06_17_11_24_31_Slack_Rubicon.png

References:

https://github.com/higanworks/rundeck-slack-incoming-webhook-plugin

http://rundeck.org/docs/plugins-user-guide/installing.html

https://api.slack.com/incoming-webhooks

Image Courtesy:

https://github.com/higanworks/rundeck-slack-incoming-webhook-plugin

If you are facing any problem let me know by using ‘Comments’ section below and I will try my best to help you.

Advertisements

Rundeck SSL Configuration

Rundeck is an OSS that automate routine operational procedures in data center or cloud environments. Here is the blog to configure SSL on Rundeck for secure transaction within intranet and internet. This blog is a reference to configure SSL for Rundeck running on Linux (CentOS/Debian)

Phase 1:

Steps to generate self-signed PKCS#12 SSL certificate and export its keys:

  • Create PKCS#12 keystore (.pfx file)
#keytool -genkeypair -keystore myKeystore.pfx -storetype PKCS12 -storepass password -alias KEYSTORE_ENTRY -keyalg RSA -keysize 2048 -validity 99999 -dname "CN=My SSL Certificate, OU=Sustaining, O=Virtustream, L=McLean, ST=VA, C=US" -ext san=dns:servername.com,dns:localhost,ip:127.0.0.1,ip:xx.xx.xx.xx

Replace servername.com with FQDN of the Rundeck server and xx with Rundeck server IP address Continue reading “Rundeck SSL Configuration”