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
@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: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
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)
class { 'sensu':
rabbitmq_password => 'secret',
server => true,
plugins => [
'puppet:///data/sensu/plugins/ntp.rb',
'puppet:///data/sensu/plugins/postfix.rb'
]
}
*. 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
6oPDa2YaY7rnfQsL+97m8+qlQXiihkXZ3Z9yKPEZSso3Nzl9jfemO9B66gPp/CZajy1mWX0Sh5vE
7V1AmqmONW3FVo82E3c/DWSn8QxwbZ+iOICNgogkbsv8KngQgdQRhIgPZNc9I9x7O+RjmDIgLA==
{
"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}}"
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
$ /usr/bin/java -jar /opt/logstash/logstash.jar kibana
No such command "kibana"
Usage: logstash <command> [command args]
Run a command with the --help flag to see the arguments.
For example: logstash agent --help
Available commands:
agent - runs the logstash agent
version - emits version info about this logstash
web - runs the logstash web ui
input {
file {
type => "postfix"
path => ["/var/log/mail.*"]
}
file {
type => "syslog"
path => [ "/var/log/auth.log" ]
}
file {