Skip to content

Instantly share code, notes, and snippets.

root@02868fb43335:/app# for file in templates/* ; do if bin/check $file; then echo OK: $file $? ; else echo ERROR: $file $?; fi ; done
OK: templates/authorized_keys 0
OK: templates/builder 0
OK: templates/check-repos 0
OK: templates/gitreceive 0
OK: templates/receiver 0
@justinhennessy
justinhennessy / gist:32db68da1fe3af82f4c2
Created October 31, 2014 00:38
etcdctl ls --recursive /deis
core@ip-10-21-1-46 ~ $ etcdctl ls --recursive /deis
/deis/logs
/deis/logs/host
/deis/logs/port
/deis/controller
/deis/controller/protocol
/deis/controller/secretKey
/deis/controller/builderKey
/deis/controller/registrationEnabled
/deis/controller/webEnabled
core@ip-10-21-3-43 ~ $ systemctl status etcd
● etcd.service - etcd
Loaded: loaded (/usr/lib64/systemd/system/etcd.service; static)
Drop-In: /run/systemd/system/etcd.service.d
└─10-oem.conf, 20-cloudinit.conf
Active: active (running) since Wed 2014-10-01 23:52:18 UTC; 4 weeks 0 days ago
Main PID: 611 (etcd)
CGroup: /system.slice/etcd.service
└─611 /usr/bin/etcd
@justinhennessy
justinhennessy / gist:03a1456d1bb73c038cdc
Created October 30, 2014 00:08
etcdctl ls --recursive /deis
core@ip-10-21-2-40 ~ $ etcdctl ls --recursive /deis
/deis/controller
/deis/controller/builderKey
/deis/controller/registrationEnabled
/deis/controller/webEnabled
/deis/controller/host
/deis/controller/port
/deis/controller/protocol
/deis/controller/secretKey
/deis/services
Oct 29 23:59:33 ip-10-21-2-40.ec2.internal systemd[1]: Starting deis-router...
Oct 29 23:59:33 ip-10-21-2-40.ec2.internal sh[20115]: Error: No such image or container: deis-router
Oct 29 23:59:33 ip-10-21-2-40.ec2.internal systemd[1]: Started deis-router.
Oct 29 23:59:53 ip-10-21-2-40.ec2.internal sh[20125]: router: waiting for confd to write initial templates...
Oct 29 23:59:58 ip-10-21-2-40.ec2.internal sh[20125]: router: waiting for confd to write initial templates...
Oct 30 00:00:03 ip-10-21-2-40.ec2.internal sh[20125]: router: waiting for confd to write initial templates...
Oct 30 00:00:08 ip-10-21-2-40.ec2.internal sh[20125]: router: waiting for confd to write initial templates...
Oct 30 00:00:13 ip-10-21-2-40.ec2.internal sh[20125]: router: waiting for confd to write initial templates...
Oct 30 00:00:18 ip-10-21-2-40.ec2.internal sh[20125]: router: waiting for confd to write initial templates...
Oct 30 00:00:23 ip-10-21-2-40.ec2.internal sh[20125]: router: waiting for confd to write initial templates..
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal systemd[1]: Starting deis-router...
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal docker[28918]: [info] GET /v1.14/images/deis/router:v0.12.0/history
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal docker[28918]: [14d449d6] +job history(deis/router:v0.12.0)
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal docker[28918]: [14d449d6] -job history(deis/router:v0.12.0) = OK (0)
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal docker[28918]: [info] GET /v1.14/containers/deis-router/json
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal docker[28918]: [14d449d6] +job container_inspect(deis-router)
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal docker[28918]: No such container: deis-router
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal docker[28918]: [14d449d6] -job container_inspect(deis-router) = ERR (1)
Oct 29 13:31:21 ip-10-21-2-40.ec2.internal docker[28918]: [error] server.go:1062 Handler for GET /containers/{name:.*}/json returned error: No such container: deis-router
Oct 29 13:31:21 ip-10-21-2-40.ec2.i
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
@justinhennessy
justinhennessy / gist:28e82c2ec05f9081786a
Last active April 29, 2021 23:13
Parsing JSON with Ansible ...

Recently, Everyday Hero has been doing a heap of work around the automation and provisioning of resources with AWS cloud services. This entails working frequently with the AWS API.

A useful filter we have been using in Ansible is taking output from a shell action and turning it into something we can consume via variables.

An example playbook is below:

@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

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'