Skip to content

Instantly share code, notes, and snippets.

View Afterglow's full-sized avatar

Paul Thomas Afterglow

  • Oracle Inc
  • Bristol
View GitHub Profile
[2012-07-26T13:49:44+01:00] DEBUG: Processing jenkins_job[ohai] on chef-jenkins2
[2012-07-26T13:49:44+01:00] INFO: Processing jenkins_job[ohai] action nothing (jenkins::lsjenkins line 161)
[2012-07-26T13:49:44+01:00] DEBUG: Doing nothing for jenkins_job[ohai]
[2012-07-26T13:49:44+01:00] DEBUG: Processing template[/var/lib/jenkins/ohai-config.xml] on chef-jenkins2
[2012-07-26T13:49:44+01:00] INFO: Processing template[/var/lib/jenkins/ohai-config.xml] action create (jenkins::lsjenkins line 166)
[2012-07-26T13:49:44+01:00] DEBUG: Not fetching cookbooks/jenkins/templates/default/job-config.xml.erb, as the cache is up to date.
[2012-07-26T13:49:44+01:00] DEBUG: current checksum: a8701c7d9e1eeadc6dcaa95859b69e3d; manifest checksum: a8701c7d9e1eeadc6dcaa95859b69e3d)
[2012-07-26T13:49:44+01:00] DEBUG: Current content's checksum: 1a98b948102ae2b0c2313190debcdbb346361d2e06f5b06ddb674fe30728bbe3
[2012-07-26T13:49:44+01:00] DEBUG: Rendered content's checksum: 95c7fee9459f7daee8469d5b52da41ac81ce0c4b8b21ead3672b52ccd2a0f
@Afterglow
Afterglow / ipxe_controller.rb
Created October 5, 2012 14:37
Setting IPXE from environment
class IpxeController < ApplicationController
def script
@uuid = params[:id].upcase
@node = Spice.nodes(:q => "uuid:#{@uuid} OR dmi_system_uuid:#{@uuid}")
if @node.length > 1
raise "More than one node with UUID #{@uuid} please remove all but one to proceed"
end
render :template => 'ipxe/script', :formats => [:text]
end
end
@Afterglow
Afterglow / glance_oboe.patch
Created October 15, 2012 21:00
Patch to add oboe to devstack glance
From d1647fb64c6e3ed1d89a2b43331855fb26b5ca69 Mon Sep 17 00:00:00 2001
From: Paul Thomas <paul.thomas@livingsocial.com>
Date: Mon, 15 Oct 2012 21:57:31 +0100
Subject: [PATCH] Add oboe middleware for tracelytics
---
glance/common/wsgi.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/glance/common/wsgi.py b/glance/common/wsgi.py
@Afterglow
Afterglow / oboe_keystone.patch
Created October 15, 2012 21:12
Add oboe/tracelytics to devstack keystone
From 90f34261bb1f6107669a27f4c9e7937c96b7a00f Mon Sep 17 00:00:00 2001
From: Paul Thomas <paul.thomas@livingsocial.com>
Date: Mon, 15 Oct 2012 22:11:19 +0100
Subject: [PATCH] add oboe to keystone
---
keystone/common/wsgi.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py
@Afterglow
Afterglow / oboe_nova.patch
Created October 15, 2012 21:17
Add oboe/tracelytics to devstack nova
From ea738daa8dd9b87ba34d99ef6b17bbef4dadad6b Mon Sep 17 00:00:00 2001
From: Paul Thomas <paul.thomas@livingsocial.com>
Date: Mon, 15 Oct 2012 22:17:10 +0100
Subject: [PATCH] add oboe to nova
---
nova/wsgi.py | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/nova/wsgi.py b/nova/wsgi.py
@Afterglow
Afterglow / middleware.py
Created October 15, 2012 22:19
oboeware for openstack (possibly webob generally)
for k, v in environ.get('wsgiorg.routing_args', [{},{}])[1].items():
# if k in set(("controller", "action")):
# evt.add_info(str(k).capitalize(), str(v))
if k == "action":
evt.add_info(str(k).capitalize(), str(v))
elif k == "controller":
evt.add_info(str(k).capitalize(), str(v.controller))
precise_install_kernel: http://10.2.0.51/ubuntu-installer/i386/linux
precise_install_initrd: http://10.2.0.51/ubuntu-installer/i386/initrd.gz
precise_install_imgargs: vga=normal ramdisk_size=16432 interface=#{@node[0][:normal][:bootstrap][:interface]} auto url=#{APP_CONFIG[:farmer_url]}/install/preseed?id=#{@uuid} locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us hostname=#{@node[0][:name]} --
centos63_install_kernel: http://10.2.0.51/centos-6.3/vmlinuz
centos63_install_initrd: http://10.2.0.51/centos-6.3/initrd.img
centos63_install_imgargs: APP_CONFIG['farmer_url']/install/ks.cfg?#{@uuid}
@Afterglow
Afterglow / gist:4142046
Created November 25, 2012 01:39
omnibus-chef fpm fail
[project:chef] Executing `fpm -s dir -t deb -v 10.16.2-300-g70f80b2 -n chef --iteration 0.debian.wheezy/sid /opt/chef -m 'Opscode, Inc.' --description 'The full stack of chef' --url http://www.opscode.com --post-install '/home/pi/work/omnibus-chef/package-scripts/chef/postinst' --post-uninstall '/home/pi/work/omnibus-chef/package-scripts/chef/postrm' --replaces chef-full`
rake aborted!
Expected process to exit with [0], but received '1'
---- Begin output of fpm -s dir -t deb -v 10.16.2-300-g70f80b2 -n chef --iteration 0.debian.wheezy/sid /opt/chef -m 'Opscode, Inc.' --description 'The full stack of chef' --url http://www.opscode.com --post-install '/home/pi/work/omnibus-chef/package-scripts/chef/postinst' --post-uninstall '/home/pi/work/omnibus-chef/package-scripts/chef/postrm' --replaces chef-full ----
STDOUT:
STDERR: tar: Removing leading `/' from member names
tar: Removing leading `/' from member names
tar: Removing leading `/' from hard link targets
ar: /var/cache/omnibus/pkg/chef_10.16.2-300-g70f80b2-
@Afterglow
Afterglow / srf01.py
Created March 2, 2013 12:04
A quick script to show using an SRF01 ultrasonic transducer with a raspberry pi (although in reality presumably any serial port)
import serial
import sys
import time
SRF01_PORT = '/dev/ttyAMA0'
class SRF01:
""" A class to operate an SRF01 ultrasonic range finder """
def __init__(self):
@Afterglow
Afterglow / candump.txt
Created April 17, 2014 17:19
Dump from my GMLAN canbus
CLIMATE_CONTROL = b'000000606f0268'
HS_DEVICE_INFORMATION = b'170080ff6908'
FUEL_INFORMATION = b'0072000000000000'
ENGINE_INFORMATION_1 = b'00009c00026a3539'
ANTILOCK_BRAKE_AND_TC_STATUS = b'0400020005001d'
AIR_CONDITIONING_CONTROL = b'001c00'
ADAPTIVE_CRUISE_DISPLAY = b'00000000'
BATTERY_VOLTAGE = b'005a7a00'
HS_DEVICE_INFORMATION = b'170080ff6908'
VEHICLE_SPEED_INFORMATION = b'0089000000003100'