Skip to content

Instantly share code, notes, and snippets.

View sirhopcount's full-sized avatar

Adrian van Dongen sirhopcount

View GitHub Profile
@sirhopcount
sirhopcount / cloud-config.yml
Created September 26, 2016 06:25 — forked from cbsmith/cloud-config.yml
modifying fleet metadata (from aws meta-data service) before fleet.service start; this is a proof of concept (but it works!)
#cloud-config
---
coreos:
units:
- name: update-fleet-metadata.service
command: start
content: |-
[Unit]
Description=Update Fleet metadata tag
Before=fleet.service
#!/bin/bash
APP='flannel-conf'
[[ "$DEBUG" == 'true' ]] && set -x
K8S_CLUSTER_ID=${K8S_CLUSTER_ID:?"${APP}: \$K8S_CLUSTER_ID is not set"}
K8S_S3_BUCKET=${K8S_S3_BUCKET:?"${APP}:\$K8S_S3_BUCKET is not set"}
SERVER_CERTIFICATES="flannel.pem flannel-key.pem"
CERTIFICATES="ca.pem"
@sirhopcount
sirhopcount / etcd.yml
Created September 15, 2016 06:45 — forked from tomazzaman/etcd.yml
Etcd Kubernetes DaemonSet
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
name: etcd
name: etcd
spec:
template:
metadata:
labels:
@sirhopcount
sirhopcount / README.md
Created September 7, 2016 14:54 — forked from digital-wonderland/README.md
Unit files to deploy an ElasticSearch cluster on CoreOS via Fleet

What

Unit files to deploy an ElasticSearch cluster on CoreOS via Fleet.

Service discovery & registration is done via etcd.

[email protected] provides a dumb discovery service by registering an elasticsearch host if it should be up. [email protected] registers the service only if it is running.

A service & timer unit for elasticsearch curator is provided which does some housekeeping.

@sirhopcount
sirhopcount / README.md
Created September 6, 2016 13:15 — forked from nathanielks/README.md
Simple wrapper around terraform to manage multiple environments

This script will pull down an S3 remote configuration before running any terraform actions. Assumes the following structure:

main.tf
terraform.cfg
env/dev/vars
env/staging/vars
env/whatever/vars
env/whatever/somefile.tf
@sirhopcount
sirhopcount / 10-calico.conf
Last active August 26, 2016 14:45
k8s-caclico
{
"name": "calico-k8s-network",
"type": "calico",
"etcd_endpoints": "http://127.0.0.1:2379",
"log_level": "none",
"log_level_stderr": "info",
"ipam": {
"type": "calico-ipam"
}
}
@sirhopcount
sirhopcount / dns-hack.sh
Created August 8, 2016 12:55 — forked from neilellis/dns-hack.sh
Fixes links on Alpine Linux
#!/usr/bin/with-contenv sh
if [ ! -f /etc/dnsmasq-resolv.conf ]
then
cp -f /etc/resolv.conf /etc/dnsmasq-resolv.conf
echo "nameserver 127.0.0.1" > /etc/resolv.conf
fi
while ! ps -ef | grep -v grep | grep dnsmasq-resolv.conf
do
sleep 1
@sirhopcount
sirhopcount / gist:b8b0404bb4d8adbec71d59e35ac3894e
Created August 4, 2016 19:15 — forked from tjcorr/gist:3baf86051471062b2fb7
CloudFormation to demo etcd-aws-cluster
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "An etcd cluster based off an auto scaling group",
"Mappings" : {
"RegionMap" : {
"eu-central-1" : {
"AMI" : "ami-840a0899"
},
"ap-northeast-1" : {
"AMI" : "ami-6c5ac56c"
@sirhopcount
sirhopcount / docker-register-2-list-images.sh
Created July 26, 2016 09:55 — forked from OndrejP/docker-register-2-list-images.sh
list all images on Docker Register v2
#!/bin/bash
export Register=https://register.example.com
export cLink="/v2/_catalog?n=10"
export cFile=docker.register.catalog
export tFile=docker.register.tags
function listFullCatalog {
while true; do
@sirhopcount
sirhopcount / README.md
Created July 22, 2016 12:39 — forked from jfromaniello/README.md
CoreOS template for CloudFormation with two EBS disks on /var/lib/docker

This is a fork from the original CoreOS cloud formation template. It adds two EBS disks of 30G, mounted to /var/lib/docker.

This is intended to be used with an m3.large machine which comes with 30G of SSD.

The reason I add two of 30 and not one of 60 is because a BTRFS limitation.

You can use the "btrfs add" approach in the units to create a BTRFS raid.