Skip to content

Instantly share code, notes, and snippets.

Avatar

Greg Schueler gschueler

View GitHub Profile
@gschueler
gschueler / bc-providers.groovy
Created Sep 6, 2022
List PBE providers for Jasypt with BouncyCastle and groovy
View bc-providers.groovy
@Grab('org.jasypt:jasypt:1.9.3')
import org.jasypt.registry.AlgorithmRegistry
@Grab('org.bouncycastle:bcprov-jdk15on:1.70')
import org.bouncycastle.jce.provider.BouncyCastleProvider
import java.security.Security
Security.addProvider(new BouncyCastleProvider());
Set digestAlgos = AlgorithmRegistry.getAllDigestAlgorithms();
Set pbeAlgos = AlgorithmRegistry.getAllPBEAlgorithms();
@gschueler
gschueler / success-template.html
Created May 2, 2014
Example email templates for rundeck notifications
View success-template.html
<div>Execution ${execution.id} was <b>${execution.status}</b></div>
<ul>
<li><a href="${execution.href}">Execution result</a></li>
<li><a href="${job.href}">Job</a></li>
<li><a href="${execution.projectHref}">Project: ${execution.project}</a></li>
<li><a href="${rundeck.href}">Rundeck</a></li>
</ul>
<p>
</p>
@gschueler
gschueler / Curl job run.md
Created Jan 18, 2011
How to run a rundeck job using curl
View Curl job run.md

Run a Job using Curl

This document describes how to use CURL to interact with the RunDeck server to invoke a Job to run.

The steps are as follows:

  1. Authenticate to the RunDeck server and acquire a session cookie.
  2. Submit run request for particular Job ID, sending session cookie.
@gschueler
gschueler / rundeck-config.groovy
Created Jun 4, 2013
Example rundeck-config for SMTP mail configuration
View rundeck-config.groovy
loglevel.default = "DEBUG"
rdeck.base = "/var/lib/rundeck"
rss.enabled = true
dataSource {
dbCreate = "update"
url = "jdbc:h2:file:/var/lib/rundeck/data/rundeckdb;MVCC=true"
}
@gschueler
gschueler / basic-app.json
Last active Nov 5, 2020
Basic Rundeck aclpolicy, allows access to one project for one group
View basic-app.json
{
"description": "MyGroup allowed access to MyProject only",
"context": {
"application": "rundeck"
},
"for": {
"project": [
{
"match": {
"name": "MyProject"
@gschueler
gschueler / rundecknotify.sh
Created Dec 5, 2012
Example CGI script for receiving Rundeck Webhook calls
View rundecknotify.sh
#!/bin/bash -e
#set to correct path to xmlstarlet
XMLSTARLET=/usr/local/bin/xml
# xmlstarlet select xpath
# usage: xmlsel XPATH file
xmlsel(){
xpath=$1
shift
$XMLSTARLET sel -T -t -v "$xpath" $*
View guide.md

enable debug logging for rundeck grails controller in rundeck 3

Create a file logback.groovy as above.

Launch rundeck with the following jvm system property: logging.config=<path to logback.groovy>

for example:

java -Xmx4g -Dlogging.config=pwd/server/config/logback.groovy -jar rundeck-3.0.20-20190408.war

View gotchas.md

an incomplete list of gotchas while using the Groovy language

for vs each

def findItem(key){
	def defval='some value'
	someMap.each{k,v->
		if(k.startsWith(key)){
			return v

}

@gschueler
gschueler / rundeck-2.0.2-h2-upgrade.sh
Last active Jan 2, 2019
Upgrade rundeck 2.0.2 h2 database from earlier 2.0.x version.
View rundeck-2.0.2-h2-upgrade.sh
#!/bin/bash
set -e
#set -x
RDECK_BASE=${RDECK_BASE:-$(pwd)}
CONFFILE=$1
H2JAR=$2
if [ -z "$CONFFILE" ] ; then
if [ -f ${RDECK_BASE}/server/config/rundeck-config.properties ] ; then
CONFFILE=${RDECK_BASE}/server/config/rundeck-config.properties
@gschueler
gschueler / Dockerfile
Created Mar 13, 2017
rundeck ubuntu 16.04
View Dockerfile
FROM ubuntu:16.04
RUN apt-get -y update && \
apt-get -y install openjdk-8-jdk apt-transport-https curl openssh-client uuid-runtime
ENV RDECK_BASE=/var/lib/rundeck
RUN mkdir $RDECK_BASE
RUN echo "deb https://rundeck.bintray.com/rundeck-deb /" | tee -a /etc/apt/sources.list