Skip to content

Instantly share code, notes, and snippets.

View jamtur01's full-sized avatar
💭
I may be slow to respond.

James Turnbull jamtur01

💭
I may be slow to respond.
View GitHub Profile
FROM ubuntu:12.04
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-6-jdk curl git-core build-essential bzr
RUN mkdir -p /tmp/downloads
# install go
RUN curl -sf -o /tmp/downloads/go1.1.1.linux-amd64.tar.gz -L https://go.googlecode.com/files/go1.1.1.linux-amd64.tar.gz
RUN mkdir -p /opt && cd /opt && tar xfz /tmp/downloads/go1.1.1.linux-amd64.tar.gz
# install jenkins
RUN curl -sf -o /opt/jenkins-1.523.war -L http://mirrors.jenkins-ci.org/war/1.523/jenkins.war
{
"builders": [{
"type": "amazon-ebs",
"access_key": "XXX",
"secret_key": "XXX",
"region": "us-east-1",
"source_ami": "ami-de0d9eb7",
"instance_type": "t1.micro",
"ssh_username": "ubuntu",
"ami_name": "packer-example {{.CreateTime}}"
6oPDa2YaY7rnfQsL+97m8+qlQXiihkXZ3Z9yKPEZSso3Nzl9jfemO9B66gPp/CZajy1mWX0Sh5vE
7V1AmqmONW3FVo82E3c/DWSn8QxwbZ+iOICNgogkbsv8KngQgdQRhIgPZNc9I9x7O+RjmDIgLA==
*. Find out what deprecated features were removed and check I am not using them
*. Update ES requirements
*. Add changes from plugin_status to milestones
*. Adjust to event schema changes
*. Change references in grok from pattern to match
*. Change grok section as 'singles' now defaults to true.
*. Use new hash syntax for pattern v. match too
*. Update Kibana install and screenshoots
*. Fix web dashboard launch
*. Include section on new configuration syntax and drop filter
class { 'sensu':
rabbitmq_password => 'secret',
server => true,
plugins => [
'puppet:///data/sensu/plugins/ntp.rb',
'puppet:///data/sensu/plugins/postfix.rb'
]
}
require 'hashr'
require 'test-kitchen/project'
require 'test-kitchen/platform'
require 'test-kitchen/runner/openstack/dsl'
module TestKitchen
module DSL
module BasicDSL
def integration_test(name, &block)
@jamtur01
jamtur01 / gist:5273050
Created March 29, 2013 19:33
Sensu release process
1. Pull request with version bump (Update release version and date) and change log edits
2. Update IRC channel about build
3. Notify IRC channel and mailing list of new release
TDD
1. Automate release via "bot" - trigger build, bump version, generate docs.
2. Docs site - Markdown, Jekyll
3. Docs structure
4. Work out what works from Wiki
@jamtur01
jamtur01 / gist:5134563
Created March 11, 2013 14:20
Boolean in types
# Processes the options for a named parameter.
# @param name [String] the name of a parameter
# @param options [Hash] a hash of options
# @option options [Boolean] :boolean if option set to true, an access method on the form _name_? is added for the param
# @return [void]
#
def self.handle_param_options(name, options)
# If it's a boolean parameter, create a method to test the value easily
if options[:boolean]
@jamtur01
jamtur01 / gist:4401589
Created December 28, 2012 20:33
Multiline weird behavior
Scenario one
Configuration:
multiline {
type => "tomcat"
pattern => "(^\w{3}\s\d{2}\,\s\d{4}\s[0-9|:]+\s\w{2}\s)"
what => "next"
add_tag => [ "merged" ]
}
@jamtur01
jamtur01 / gist:4401487
Last active December 10, 2015 07:28
multiline weirdness
# matches and merges events like:
# Dec 28, 2012 8:11:53 PM jenkins.InitReactorRunner$1 onAttained
multiline {
type => "tomcat"
pattern => "(^\w{3}\s\d{2}\,\s\d{4}\s[0-9|:]+\s\w{2}\s)"
what => "next"
}
# matches stack traces