This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM busybox:ubuntu-14.04 | |
MAINTAINER [email protected] | |
ENV VERSION 2.3.0.132 | |
ADD https://download.newrelic.com/server_monitor/release/newrelic-sysmond-${VERSION}-linux.tar.gz . | |
RUN tar zxvf newrelic-sysmond-${VERSION}-linux.tar.gz && \ | |
rm -f newrelic-sysmond-${VERSION}-linux.tar.gz | |
WORKDIR /newrelic-sysmond-${VERSION}-linux |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
worker_processes 4; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'aws-sdk-v1' | |
require 'capistrano/framework' | |
@autoscaling_groups = [] | |
def autoscaling_servers(opts = {}) | |
Array(opts[:regions]).each do |region| | |
AWS::AutoScaling.new(region: region).groups[opts[:group]].tap do |group| | |
@autoscaling_groups.push(group) | |
end.ec2_instances.each do |instance| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM busybox | |
MAINTAINER Ric Lister <[email protected]> | |
## busybox wget cannot do https, so grab curl binary | |
ENV CURL_VERSION 7.30.0 | |
RUN (wget -O - http://www.magicermine.com/demos/curl/curl/curl-${CURL_VERSION}.ermine.tar.bz2 | bunzip2 -c - | tar xf -) \ | |
&& mv /curl-${CURL_VERSION}.ermine/curl.ermine /bin/curl \ | |
&& rm -rf /curl-${CURL_VERSION}.ermine | |
WORKDIR /app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
## use applescript to start multiple iTerm tabs with ssh into listed hosts | |
## | |
## usage: | |
## | |
## iterm.pl host1 host2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## for an unknown reason, on a subset of instances the | |
## ohai ec2 data is not populated unless this file exists | |
## so touch it until we figure out why | |
[ '/etc/chef', '/etc/chef/ohai', '/etc/chef/ohai/hints' ].each do |dir| | |
directory(dir).run_action(:create) | |
end | |
## this plugin file just needs to exist to able the plugin | |
ec2_json = file '/etc/chef/ohai/hints/ec2.json' do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## export upstart config using foreman | |
namespace :foreman do | |
desc "Export Procfile to upstart" | |
task :export do | |
links = { | |
'.env' => "~#{fetch(:foreman_user)}/#{fetch(:application)}/env", | |
'.foreman' => "~#{fetch(:foreman_user)}/#{fetch(:application)}/foreman", | |
} | |
on roles(:app) do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2014/01/14 18:49:08 http: multiple response.WriteHeader calls | |
SIGSEGV: segmentation violation | |
PC=0x412f84 | |
signal arrived during cgo execution | |
runtime.cgocall(0x412e40, 0x7fdfa0134778) | |
/home/vagrant/bin/go/src/pkg/runtime/cgocall.c:149 +0x11b fp=0x7fdfa0134760 | |
parser._Cfunc_parse_query(0x27dc340, 0xc2102cae40, 0x27dc340, 0x7, 0xc2101da5c0) | |
parser/_obj/_cgo_defun.c:71 +0x31 fp=0x7fdfa0134778 | |
parser.ParseQuery(0xc2102cac60, 0x18, 0x0, 0x0, 0x0, ...) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BluepillOverride | |
def self.provider | |
Class.new(Chef::Provider::BluepillService) do | |
def shell_out!(*args) | |
args.each do |command| | |
rvm_shell "#{command}" do | |
code command | |
end | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## gather mongo-related stats and jam them into graphite | |
require 'mongo' | |
## method to convert nested hash to array of dot-separated properties | |
class Hash | |
def propertize(prepend=nil) | |
self.map do |key,value| | |
new_key = [prepend, key].compact.join('.') | |
value.is_a?(Hash) ? value.propertize(new_key) : "#{new_key} #{value.to_s}" | |
end.flatten |