Skip to content

Instantly share code, notes, and snippets.

@eegilbert
eegilbert / pedantically_commented_playbook.yml
Created May 12, 2016 17:10 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@eegilbert
eegilbert / Find DHCP Server
Created April 16, 2017 14:04
Find DHCP Server
dhclient -d -nw br0
Internet Systems Consortium DHCP Client 4.2.5
Copyright 2004-2013 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/br0/1c:c1:de:02:d4:52
Sending on LPF/br0/1c:c1:de:02:d4:52
Sending on Socket/fallback
DHCPDISCOVER on br0 to 255.255.255.255 port 67 interval 8 (xid=0x44249adb)
@eegilbert
eegilbert / docker-notes.txt
Created August 8, 2017 23:08 — forked from rayhassan/docker-notes.txt
Docker Notes
http://cloud-mechanic.blogspot.co.uk/2014/10/storage-concepts-in-docker.html
http://developerblog.redhat.com/2014/09/30/overview-storage-scalability-docker/
https://docs.docker.com/
https://www.digitalocean.com/community/tutorials/docker-explained-how-to-containerize-python-web-applications
http://blog.flux7.com/blogs/docker/docker-tutorial-series-part-1-an-introduction
http://blog.flux7.com/blogs/docker/docker-tutorial-series-part-2-the-15-commands
http://blog.flux7.com/blogs/docker/docker-tutorial-series-part-3-automation-is-the-word-using-dockerfile
@eegilbert
eegilbert / cloud-service.yaml
Created August 9, 2017 20:22 — forked from voobscout/cloud-service.yaml
CoreOS Baremetal cluster cloud configs, worker and service nodes
#cloud-config
hostname: <%= shortname %>
ssh_authorized_keys:
- ssh-rsa xxxx rsa-key-20120604
coreos:
units:
- name: settimezone.service
command: start
@eegilbert
eegilbert / bridged.conf
Created August 9, 2017 20:25 — forked from gdamjan/bridged.conf
bridged openvpn with networkd
# /etc/openvpn/bridged.conf
comp-lzo
persist-key
persist-tun
dh /etc/openvpn/dh1024.pem
ca /etc/openvpn/ca.crt
cert /etc/openvpn/bridged.crt
key /etc/openvpn/bridged.key
@eegilbert
eegilbert / docker-bridge.service
Created August 9, 2017 20:33 — forked from cornelius-keller/docker-bridge.service
Scripts and systemd units to run tinc and flannel on coreos
# there is surely a much better way to do this using sytemd/networkd
[Unit]
Description=Configure Docker Bridge
Requires=docker.service
#After=docker.socket
[Service]
Type=oneshot
#ExecStartPre=-/bin/sh -c "route del -net 10.1.0.0 netmask 255.255.0.0 dev tap0"
ExecStartPre=/bin/sh -c "while ! ifconfig -s | grep -q tap0 ; do sleep 1; done"
ExecStartPre=/bin/sh -c "while ! ifconfig -s | grep -q docker0 ; do sleep 1; done"
@eegilbert
eegilbert / ignition_config.yml
Created August 9, 2017 20:38 — forked from Titerote/ignition_config.yml
Ignition problem on coreos
---
systemd:
units:
- name: etcd2.service
enable: true
dropins:
- name: 40-etcd-cluster.conf
contents: |
[Service]
Environment="ETCD_NAME={{.etcd_name}}"
@eegilbert
eegilbert / terraform-app.sh
Created November 2, 2017 00:28 — forked from kzap/terraform-app.sh
Wrapper for terraform that lets you specify an environment and calls an $ENV.tfvars file, uses a $ENV.tfstate file and sets the env variable
#!/bin/bash
#
# terraform-app
#
# This to terraform the servers for the Galleon App
# By storing the date now, we can calculate the duration of provisioning at the
# end of this script.
start_seconds="$(date +%s)"
@eegilbert
eegilbert / keybase.md
Created November 10, 2017 14:53
keybase.md

Keybase proof

I hereby claim:

  • I am eegilbert on github.
  • I am erric (https://keybase.io/erric) on keybase.
  • I have a public key ASB0WkGxC7SgguPdq7ixH7EOrV_T633ZZjyp4cQ1sa5P3Qo

To claim this, I am signing this object:

#!/bin/bash
#Set colour prompt using the name, platform or instance id and avzone
if [ ! -f "/opt/aws/AWS-INSTID" ]; then
curl -s --fail http://169.254.169.254/latest/meta-data/instance-id > /opt/aws/AWS-INSTID
fi
export INSTID=`cat /opt/aws/AWS-INSTID`
if [ ! -f "/opt/aws/AWS-AVZONE" ]; then
curl -s --fail http://169.254.169.254/latest/meta-data/placement/availability-zone > /opt/aws/AWS-AVZONE