Package: charlesbot-rundeck
ACharlesbotplugin that integrates with Rundeck!How does this workThis plugin adds the following!helptargets:!lock status - Prints the status of the Rundeck deployment lock
!lock acquire - Acquires the Rundeck deployment lock (only available to Slack admins)
!lock release - Releases the Rundeck deployment lock (only available to Slack admins)The!lockcommands are designed to give folks the ability to quickly and
efficiently disable (or enable) individualRundeckjobs. This is very useful
when troubleshooting a production issue where you don’t want additional
deployments going out and adding fuel to the fire.Installationpipinstallcharlesbot-rundeckInstructions for how to run Charlesbot are over athttps://www.charlesbot.org/docs/installation.html.ConfigurationIn your Charlesbotconfig.yaml, enable this plugin by adding the following
entry to themainsection:main:enabled_plugins:-'charlesbot_rundeck.rundeck.Rundeck'Create arundecksection that looks something similar to:rundeck:token:'XXXX'# Rundeck tokenurl:'http://my.rundeck.test:4440'# Rundeck base URL# If you would like to set this channel's topic to something relevant# whenever Rundeck jobs are locked, set this value. Otherwise you can omit# it completely.deployment_status_channel:'charlesbot-rundeck-test-channel'# project: project name# name: job name# friendly_name: friendly display namelock_jobs:-project:'test-project'name:'deploy-website'friendly_name:'deploywebsite'-project:'test-project'name:'deploy-app'friendly_name:'deployapp'Rundeck ACL PolicyMake sure you have aapitoken.aclpolicyfile that looks something like:description:API project level access controlcontext:project:'.*'# all projectsfor:# ...job:-allow:'*'# ...by:group:api_token_groupYou essentially need to give theapi_token_groupthe ability to enable and
disable executions for all jobs in all projects (moredetails)NotesRundeck 2.6.2 introduces the ability to enable or disablepassivemode
programatically using thesystem/executionsendpoint. This endpoint
unfortunately did not work for this use-case because it disablesallRundeck job executions. This plugin is more geared towards folks who would
rather disable individual job executions.DevelopmentAt a very minimum, you’ll need Python 3.4.3, a functionalDockerenvironment,
and aSlack bot tokento get going. I highly recommend you read the
Charlesbotdocsto get an idea of how this all fits together.Create a localdevelopment.yamlfile that looks something like the following.main:slackbot_token:'xoxb-...'enabled_plugins:-'charlesbot_rundeck.rundeck.Rundeck'rundeck:token:'baiY8aw4Ieng0aQuoo'url:'http://my.rundeck.test:4440'deployment_status_channel:'charlesbot-rundeck-test-channel'lock_jobs:-project:'test-project'name:'deploy-website'friendly_name:'deploywebsite'-project:'test-project'name:'deploy-app'friendly_name:'deployapp'Add the following entry to your/etc/hostsfile.172.17.0.1 my.rundeck.testStart up a local Rundeck Docker instance.makerundeck-serverAfter your Rundeck instance is up and running, seed it with some sample
project/job data.makerundeck-server-bootstrapAfter you have all of this in place, you should be ready to spin up your local Charlesbot instance!makerunLicenseSee theLICENSE.txtfile for license rights and limitations (MIT).