Skip to content

Instantly share code, notes, and snippets.

View ahonor's full-sized avatar

Alex Honor ahonor

View GitHub Profile
#!/usr/bin/env bash
yum -y install curl unzip nc autoconf
# Add the Webtatic repository to get git software.
rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm
# Install the latest version of git
yum -y install --enablerepo=webtatic git-all
import com.dtolabs.rundeck.plugins.notification.NotificationPlugin;
import com.dtolabs.rundeck.core.plugins.configuration.StringRenderingConstants;
import com.dtolabs.rundeck.core.plugins.configuration.ValidationException;
import com.fasterxml.jackson.databind.ObjectMapper;
// curl -H "Content-type: application/json" -X POST \
// -d '{
// "service_key": "ee59049e89dd45f28ce35467a08577cb",
// "event_type": "trigger",
// "description": "FAILURE for production/HTTP on machine srv01.acme.com",
#!/usr/bin/env bash
# Exit immediately on error or undefined variable.
set -e
set -u
# Process command line arguments.
if [ $# -ne 4 ]
then
echo >&2 "usage: bootstrap rdversion hostname hostip mysqladdr"
description: Acess for dev.
context:
project: '.*'
for:
job:
- equals:
group: 'anvils'
name: 'Status'
allow: [run,read]
- equals:
@ahonor
ahonor / gist:5801057
Created June 17, 2013 22:27
stack trace
com.dtolabs.rundeck.core.plugins.PluginException: Unable to expand plugin libs: /var/lib/rundeck/libext/cache/webdav-logstore-plugin/lib/httpclient-4.2.3.jar (Permission denied)
at com.dtolabs.rundeck.core.plugins.JarPluginProviderLoader.loadClass(JarPluginProviderLoader.java:328)
at com.dtolabs.rundeck.core.plugins.JarPluginProviderLoader.isLoaderFor(JarPluginProviderLoader.java:440)
at com.dtolabs.rundeck.core.plugins.DirPluginScanner.test(DirPluginScanner.java:217)
at com.dtolabs.rundeck.core.plugins.DirPluginScanner.scanAll(DirPluginScanner.java:238)
at com.dtolabs.rundeck.core.plugins.DirPluginScanner.scanForFile(DirPluginScanner.java:112)
at com.dtolabs.rundeck.core.plugins.FilePluginCache.rescanForItem(FilePluginCache.java:151)
at com.dtolabs.rundeck.core.plugins.FilePluginCache.getLoaderForIdent(FilePluginCache.java:102)
at com.dtolabs.rundeck.core.plugins.PluginManagerService.loadProvider(PluginManagerService.java:99)
at com.dtolabs.rundeck.core.plugins.ServiceProviderLoader$loadProvider.ca
description: Anonymous access.
context:
project: '.*' # all projects
for:
resource:
- allow: [read]
adhoc:
- allow: [read]
job:
- allow: [read]
@ahonor
ahonor / nduff example.xml
Created February 7, 2013 18:56
Include and exclude job for nDuff
<joblist>
<job>
<id>b3548839-620f-4f83-8b62-5047a579324b</id>
<loglevel>INFO</loglevel>
<sequence keepgoing='false' strategy='node-first'>
<command>
<scriptargs />
<script><![CDATA[env|grep RD_
echo ${node.name}]]></script>
@ahonor
ahonor / gist:4497568
Created January 9, 2013 22:25
rerun archive calling commands
$ rerun stubbs:add-module --module blar
$ rerun stubbs: add-command --module blar --command hi
$ rerun stubbs: add-command --module blar --command bye
$ vi /Users/alexh/rerun-workspace/rerun/modules/blar/commands/hi/script
$ vi /Users/alexh/rerun-workspace/rerun/modules/blar/commands/bye/script
$ rerun stubbs: add-command --module blar --command hi-bye
$ vi /Users/alexh/rerun-workspace/rerun/modules/blar/commands/hi-bye/script
$ rerun stubbs: archive --modules blar
Wrote self extracting archive script: /Users/alexh/rerun-workspace/rerun/rerun.bin
@ahonor
ahonor / migrate.sh
Created November 1, 2012 15:17
Migrate rerun modules to 1.0 spec
#!/usr/bin/env bash
#
# Migrate rerun 0.9 modules to the 1.0 spec
#
set -e
[[ $# = 1 ]] || {
echo >&2 "usage: $0 <moddir>"
exit 2 ;
}
@ahonor
ahonor / repoquery.cgi
Created September 25, 2012 22:45
Rundeck option provider. Generates JSON about packages in a yum repo
#!/bin/bash
#
# repoqery --
#
# This CGI generates JSON format suitable for Rundeck
# job option data.
#
# -----------------------------------------------------------
#