Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
at the keebs

Brandon Philips philips

👨‍💻
at the keebs
View GitHub Profile
View prometheus.yml
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
labels:
name: prometheus-deployment
name: prometheus
spec:
replicas: 1
template:
View gist:2c546c5a4fb53e43fddb4ca551d51499
$ DOCKER_BUILDTAGS="exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_aufs" AUTO_GOPATH=1 ./hack/make.sh binary
View docker.service
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=docker.socket early-docker.target network.target
Requires=docker.socket early-docker.target
[Service]
EnvironmentFile=-/run/flannel_docker_opts.env
MountFlags=slave
LimitNOFILE=1048576
View gist:682feed223d13d83b718
package main
import (
"fmt"
"net/http"
)
func main() {
waitIndex := 0
for {
View gist:2b232c2a042fe139780a
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQINBFGL6agBEAC9i3rxSHYvRzyUrxYQQiq3O8VVNFmnU95+I4w8UeH2bmFQ7edp
55ZzWRQZkc5niEZ3Nx+HYujw3RFU3biWYHIotUPUqg3fJI/TUFiS45Uhf+8wP5yL
lu0kUdaU4GuOeQNR1DqUCPnDaFxVZC9IdDce201pgwVbqZiEB5wY1W/OVmpKgYdU
MGYhXpw1sV4gTolr0Dwn0npIfYoW60T76cT3qkP+uJQMgjVtTJSx/Gzkagi6YDrc
Pun+VGU1UlxBOeVp6Olw27QWvnmYvhmLtSXhGj+lTMX1GMeLa/6xyLIDe3e1eW+w
FbRFpoFfz9+fYV35leMo5BT1ZKlhlfgoffBpkUd0ydOmX5QmeNtLQN3WKEyIEDJ0
Nu6nNgUt7mKngZhvuBQk17IKO2zqkJdtNAuu1nUhUsIPtFeqmvm+GhBoRid5gX/G
View gist:d17d75e4348443a46240
#cloud-config
coreos:
units:
- name: docker-tcp.socket
command: start
enable: true
content: |
[Unit]
Description=Docker Socket for the API
@philips
philips / merklesum.go
Last active Jul 3, 2016
merklesum prints out the hashes of each chunk from a merkle tree.
View merklesum.go
package main
import (
"fmt"
"github.com/vbatts/merkle"
"io"
"os"
)
func traverse(n *merkle.Node) *merkle.Node {
View gist:bf96c263bc1d4b27c3a3
Instructions for trying ext4+overlay with docker! In an up-to-date SDK:
Write the following to /build/amd64-usr/etc/portage/package.keywords/overlay
sys-kernel/coreos-sources
sys-kernel/coreos-kernel
sys-fs/btrfs-progs
app-emulation/docker
In src/scripts make the following change to switch to ext4:
@philips
philips / user-data
Last active Sep 16, 2020
Running consul on top of CoreOS utilizing etcd for automatic bootstrapping.
View user-data
#!/bin/bash
source /etc/environment
name=$(cat /etc/machine-id)
if [ ! -f /opt/consul ]; then
mkdir /opt
mkdir /var/lib/consul
curl http://storage.googleapis.com/ifup-org-tilde/consul-0.2.0-linux-x86-64.lzma | lzcat > /opt/consul
chmod +x /opt/consul
View gist:9480854
systemctl enable --runtime /media/state/units/docker-local.service
systemctl daemon-reload
systemctl start docker-local