Skip to content

Instantly share code, notes, and snippets.

input {
stdin { type => "stdin-type"}
generator { type => "generator-type" message => "generated event" }
}
output {
librato {
type => "generator-type"
account_id => "foo@foo.com"
api_token => "1231231231231231231231"
gauge => ["value", "%{sequence}","source","%{@source_host}", "name", "bar_bytes"]

Should the hiera call be done like this:

apps::cron { 'braintree-initiate_settlement':
     app_name => $app_name,
     app_root => $app_root,
     time => hiera('braintree::cron::initiate_settlement'),
     rake => true,
   }
@justinhennessy
justinhennessy / gist:9404571
Last active August 29, 2015 13:57
cdiff module

Module

# == Class: sdiff
#
# This class adds a wrapper for the diff command puppet uses.
# It introduces the ability to suppress diff output, useful for encrypted data.
#
# This module requires changes to the puppet.conf file that is on the agents,
# suggest under the [main] section.

Module

# == Class: sdiff
#
# This class adds a wrapper for the diff command puppet uses.
# It introduces the ability to suppress diff output, useful for encrypted data.
#
# This module requires changes to the puppet.conf file that is on the agents,
# suggest under the [main] section.
@justinhennessy
justinhennessy / gist:3c4d8fa956935beecd49
Last active August 29, 2015 14:06
The importantce of the inspect and adaption cycle

The importance of the inspect and adaption cycle

Here at Everyday Hero we pride ourselves on our ability as an engineering team to continually improve not only our engineering practices but also our planning, testing, and communication.

Recently we performed an operation on one of our primary databases. This involved creating a new slave database for our backups and other read only services, promoting the current slave to be the primary as it had more resources available to it, then decommission the old master.

ubuntu@ip-10-21-4-188:~$ fleetctl cat deis-controller@1
[Unit]
Description=deis-controller
Requires=deis-logger@1.service
After=deis-logger@1.service
[Service]
EnvironmentFile=/etc/environment
TimeoutStartSec=20m
ExecStartPre=/bin/sh -c "echo Waiting for deis-logger to start... ; until docker inspect deis-logger >/dev/null 2>&1; do sleep 2; done"
core@ip-10-21-3-110 ~ $ etcdctl ls / --recursive
/deis
/deis/controller
/deis/controller/secretKey
/deis/controller/builderKey
/deis/controller/registrationEnabled
/deis/controller/webEnabled
/deis/controller/protocol
/deis/domains
/deis/registry
core@ip-10-21-3-110 ~ $ docker run deis/controller:v0.12.0 cat /app/deis/__init__.py
"""
The Deis main package, including the top-level URLs, Django project
settings, and WSGI setup. Most application domain-specific code lives in
the api, provider, cm, and web Django apps.
"""
from __future__ import absolute_import
__version__ = '0.12.0'
@justinhennessy
justinhennessy / gist:85a7092c3b32766e7cbe
Last active August 29, 2015 14:07
Using the bastion box ...

SSH config for production bastion box

Host bastion_production
  Hostname bastion.everydayhero.io
  User ubuntu
  IdentityFile ~/.ssh/deis.pem

SSH to the box ssh bastion_production

Last login: Fri Oct 10 12:45:38 on ttys003
justinhennessy@Justins-MacBook-Pro:~/code/ansible-aws(master) $ traceroute 54.85.205.202
traceroute to 54.85.205.202 (54.85.205.202), 64 hops max, 52 byte packets
1 10.28.0.1 (10.28.0.1) 2.541 ms 3.042 ms 4.498 ms
2 59.167.218.236 (59.167.218.236) 2.021 ms 1.915 ms 1.787 ms
3 pos0-3-0.cor1.bne1.on.ii.net (150.101.180.118) 225.713 ms 225.563 ms 225.516 ms
4 xe-0-0-1.cr1.bne4.on.ii.net (150.101.34.10) 225.626 ms 225.877 ms 225.555 ms
5 ae1.br1.syd4.on.ii.net (150.101.33.18) 288.450 ms 225.471 ms 225.573 ms
6 te0-1-1-2.br2.lax1.on.ii.net (203.16.213.190) 225.730 ms 225.633 ms 225.700 ms
7 te0-1-0.bdr1.iad1.on.ii.net (203.16.213.186) 224.855 ms 225.008 ms 224.974 ms