Skip to content

Instantly share code, notes, and snippets.

View ahonor's full-sized avatar

Alex Honor ahonor

View GitHub Profile
@ahonor
ahonor / import.xml
Created May 18, 2012 18:48
Example Yana XML import
<yana>
<attributes>
<attribute id="controller" filter="String"/>
<!-- Package -->
<attribute id="arch" filter="String"/>
<attribute id="base" filter="String"/>
<attribute id="buildtime" filter="String"/>
<attribute id="filename" filter="String"/>
@ahonor
ahonor / gist:2705698
Created May 15, 2012 22:42
Yana output
<nodes>
<node id="1" name="test.server.com" type="Server" tags="server,test">
<description>This is a server</description>
<attributes>
<attribute name="Serial_Number" value="12345" required="false"/>
<attribute name="RAM" value="4GB" required="false"/>
<attribute name="OS_Name" value="Ubuntu_Test_Server" required="false"/>
<attribute name="OS_Family" value="Linux" required="false"/>
<attribute name="Number_of_CPUs" value="2" required="false"/>
@ahonor
ahonor / gist:1536434
Created December 29, 2011 22:11
vsaas_cookbook_promote.xml
<joblist>
<job>
<id>f711604c-877f-4a30-8693-dd4f22f074b7</id>
<loglevel>VERBOSE</loglevel>
<sequence keepgoing='false' strategy='node-first'>
<command>
<scriptargs />
<script><![CDATA[export jenkins_url=http://build.cmf.vmware.com:8080/jenkins/$workSpace/$jobName/var/chef
export cb=chef-solo-svn${svnRev}-j${buildNum}.tgz
$ tools/bin/dispatch -p zbig -I serverType=typeB
node2
$ tools/bin/dispatch -p zbig -I serverType=typeA
node1
@ahonor
ahonor / gist:1236183
Created September 22, 2011 22:04
rerun profile example
PATH=$PATH:$HOME/.rerun/rerun
export RERUN_MODULES=$HOME/.rerun/modules
export RERUN_LOGS=$HOME/.rerun/logs
[ -t 0 ] && export RERUN_COLOR=true
@ahonor
ahonor / gist:1233402
Created September 21, 2011 21:42
Rerun with check log
$ ./rerun -checklog /tmp/rerun-logs/freddy-dance-2011-0921-140744.log freddy: dance -jumps 3
jumps (3)
2c2
< jumps (3)
---
> jumps ()
@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
}
* Jobs
** List jobs
+ [[https://gist.github.com/785084][Query rundeck jobs list for a project, optionally save the xml file]]
+ Existing URL: "/menu/workflows.xml?projFilter={project}"
+ Proposed 1.2:
+ Summary: /api/jobs?project={project}
+ Exporting: /api/jobs/export?project={project}&format={format}
+ Importing: "POST /api/jobs/import?format={format} + (job content)
** Run a job
@ahonor
ahonor / Rundeck API URL strawmen
Created January 27, 2011 16:21
URLs that better mesh with current concept names
* Jobs
** List jobs
+ [[https://gist.github.com/785084][Query rundeck jobs list for a project, optionally save the xml file]]
+ Existing URL: "/menu/workflows.xml?projFilter={project}"
+ Hypothetical alternatives:
+ Jobs-oriented:
+ /api/jobs.xml?project={project}
+ /api/jobs/list.xml?project={project}
** Run a job
+ [[https://gist.github.com/783971][How to run a job using curl]]
@ahonor
ahonor / ssh-generate-resources.sh
Created December 13, 2010 23:52
simple resource model provider script
#!/bin/bash
# Requires: mktemp
#
# DESCRIPTION
# Takes a set of newline delimited hosts and runs a remote
# script to collect host metadata to generate resources.xml document.
#
# DISCOVERING HOSTS
# Hosts lists can be generated with a tool like nmap. Here an nmap script
# returns hosts listening on SSH port 22 on the specified subnet: