Skip to content

Instantly share code, notes, and snippets.

View ahonor's full-sized avatar

Alex Honor ahonor

View GitHub Profile
@ahonor
ahonor / wrapper.sh
Last active May 14, 2022 22:22
example wrapper for rerun modules
#!/usr/bin/env bash
# Wrapper for modules sharing same prefix
: ${RERUN:=$(which rerun)}
: ${RERUN_MODULE_PREFIX:=rundeck-}
if (( $# == 1 ))
then
exec command $RERUN ${RERUN_MODULE_PREFIX}${1}
[
"Tue Feb 27 02:39:35",
"Sun Feb 25 04:06:58",
"Mon Feb 26 01:03:08"
]
rundeck-config.properties:
rdeck.base=$RDECK_BASE
#
#
grails.serverURL=$SERVER_URL
#
# default log level for jobs. Choose from: ERROR,WARN,INFO,VERBOSE,DEBUG
loglevel.default=INFO
#
@ahonor
ahonor / jenkins-notification-curl.groovy
Created September 3, 2015 15:39
example rundeck notification plugin that triggers a jenkins job via a curl command
import com.dtolabs.rundeck.plugins.notification.NotificationPlugin;
import groovy.text.SimpleTemplateEngine
/**
* This plugin executes a curl command with some arguments as defined
* by the user in the GUI. It wraps an invocation like shown below
*
* curl --user <your_jenkins_username>:<your_jenkins_API_key> http://<jenkins_job_url>
*
*/
@ahonor
ahonor / gist:1006584
Created June 3, 2011 16:01
job run example via curl
#!/bin/bash
#!/bin/bash
#Utility to log into the RunDeck server and store cookie file for later use
errorMsg() {
echo "$*" 1>&2
}
java.lang.NullPointerException: Cannot get property 'dataContext' on null object
at rundeck.services.ExecutionService.createJobReferenceContext(ExecutionService.groovy:1661)
at rundeck.services.WorkflowService$_createStateForWorkflow_closure1.doCall(WorkflowService.groovy:111)
at rundeck.services.WorkflowService.createStateForWorkflow(WorkflowService.groovy:94)
at rundeck.services.WorkflowService$_createStateForWorkflow_closure1.doCall(WorkflowService.groovy:117)
at rundeck.services.WorkflowService.createStateForWorkflow(WorkflowService.groovy:94)
at rundeck.services.WorkflowService.createStateForWorkflow(WorkflowService.groovy:76)
at rundeck.services.WorkflowService.createWorkflowStateListenerForExecution(WorkflowService.groovy:134)
at rundeck.services.ExecutionService.executeAsyncBegin(ExecutionService.groovy:617)
at rundeck.quartzjobs.ExecutionJob.executeCommand(ExecutionJob.groovy:258)
[vagrant@rundeck ~]$ cat /var/log/rundeck/service.log
Starting rundeckd: [ OK ]
WARNING: HTTPS is not enabled, specify -Drundeck.ssl.config=/var/lib/rundeck/server/config/ssl.properties to enable.
2014-01-26 01:25:25.404:INFO:oejs.Server:jetty-7.6.0.v20120127
2014-01-26 01:25:27.483:INFO:oejw.StandardDescriptorProcessor:NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
2014-01-26 01:25:28.977:INFO:/:Initializing Spring root WebApplicationContext
INFO BootStrap: using rdeck.base config property: /var/lib/rundeck
INFO BootStrap: loaded configuration: /etc/rundeck/framework.properties
INFO BootStrap: RSS feeds disabled
2014-01-26 01:25:47.037:INFO:oejsh.ContextHandler:started o.e.j.w.WebAppContext{/,file:/var/lib/rundeck/exp/webapp/},/var/lib/rundeck/exp/webapp
<joblist>
<job>
<id>6c322f98-5967-42a2-93ba-f37021b661b1</id>
<loglevel>INFO</loglevel>
<sequence keepgoing='false' strategy='node-first'>
<command>
<scriptargs />
<script><![CDATA[#!/usr/bin/env bash
env|grep RD_NODE|sort]]></script>
@ahonor
ahonor / mtl.dsl.markdown
Last active January 3, 2016 06:29
whacky idea for command DSL

MTL, Meta Tool Language

Preparation

Use mtl init to initialize the environment for mtl. Creates a workspace in current working directory.

mtl init 

Default values are: --name $(hostname) --dir $(pwd)

@ahonor
ahonor / gist:8074671
Created December 21, 2013 20:34
some coda hale metrics from rightscale plugin
12/21/13 12:33:39 PM ===========================================================
-- Counters --------------------------------------------------------------------
com.simplifyops.rundeck.plugin.resources.RightscaleAPIRequest.authentication
count = 2
com.simplifyops.rundeck.plugin.resources.RightscaleAPIRequest.request.fail
count = 0
com.simplifyops.rundeck.plugin.resources.RightscaleAPIRequest.request.success
count = 1818