Skip to content

Instantly share code, notes, and snippets.

View bketelsen's full-sized avatar
💭
Making tools to make the tools.

Brian Ketelsen bketelsen

💭
Making tools to make the tools.
View GitHub Profile
@bketelsen
bketelsen / ddagent.json
Last active August 29, 2015 14:07
DataDog agent as privileged Pod with Service - collects info on host, and all docker containers. Accepts statsd on port 8125 on every machine.
{
"id": "ddagent",
"kind": "ReplicationController",
"apiVersion": "v1beta1",
"desiredState": {
"replicas": 3,
"replicaSelector": {"name": "ddagent"},
"podTemplate": {
"desiredState": {
"manifest": {
@bketelsen
bketelsen / Dig Output
Last active August 29, 2015 14:07
SkyDNS serving Kubernetes Services
dig @localhost redismaster.skydns.local
; <<>> DiG 9.9.5-3-Ubuntu <<>> @localhost redismaster.skydns.local
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 41256
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
@bketelsen
bketelsen / gist:97a06ae63a249bc25865
Created October 17, 2014 15:36
500 error on api/v1beta1/watch/endpoints
I1017 11:32:43.463820 07801 log.go:151] GET /api/v1beta1/watch/endpoints?fields=&labels=&resourceVersion=3: (286.632us) 500
goroutine 76 [running]:
github.com/GoogleCloudPlatform/kubernetes/pkg/httplog.(*respLogger).WriteHeader(0xc208004900, 0x1f4)
/home/bketelsen/src/github.com/GoogleCloudPlatform/kubernetes/_output/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/httplog/log.go:170 +0x9c
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.writeJSON(0x1f4, 0x7f91cd5d48e0, 0xc2080467a0, 0x7f91cd5d4a58, 0xc208000000, 0x7f91cd5d7a60, 0xc208004900)
/home/bketelsen/src/github.com/GoogleCloudPlatform/kubernetes/_output/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:147 +0x132
github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver.errorJSON(0x7f91cd5d01b0, 0xc20810fd40, 0x7f91cd5d48e0, 0xc2080467a0, 0x7f91cd5d7a60, 0xc208004900)
/home/bketelsen/src/github.com/GoogleCloudPlatform/kubernetes/_output/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver/apiserver.go:15
"*****************************************************************************
"" NeoBundle core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
" Required:
set runtimepath+=~/.vim/bundle/neobundle.vim/
endif
@bketelsen
bketelsen / pkgin
Created January 3, 2015 19:48
where did it go?
new-host-4:bin bketelsen$ sudo pkgin install eterm
calculating dependencies... done.
nothing to upgrade.
21 packages to be installed: libxcb-1.9.3 libXdmcp-1.1.1 libXau-1.0.8 libICE-1.0.8 jbigkit-2.0 tiff-4.0.3nb6 png-1.6.10rc01 jpeg-9nb1 giflib-5.0.5 freetype2-2.5.3 libXt-1.1.4 pcre-8.33 libX11-1.6.2 libSM-1.2.2 perl-5.18.1nb3 libast-0.7nb12 libXres-1.0.7 libXmu-1.1.2 libXext-1.3.2 imlib2-1.4.5nb7 eterm-0.9.5nb14 (0B to download, 88M to install)
proceed ? [Y/n] Y
downloading packages...
installing packages...
installing libxcb-1.9.3...
@bketelsen
bketelsen / log output
Created March 22, 2015 21:52
Kubelet won't start containers
I0322 22:51:16.199351 12178 event.go:138] Event(api.ObjectReference{Kind:"Pod", Namespace:"default", Name:"skydns-gziey", UID:"ec36d3dc-d0db-11e4-bc53-b827eb839ccd", APIVersion:"v1beta1", ResourceVersion:"497", FieldPath:"spec.containers{skydns}"}): reason: 'failed' Failed to start with docker id 81f8ac72c96a72d44858effe7699a8b95df4988a2824d902f726882682127484 with error: API error (500): Cannot start container 81f8ac72c96a72d44858effe7699a8b95df4988a2824d902f726882682127484: socket operation on non-socket
However... docker run -d skynetservices/skydns-arm works great
@bketelsen
bketelsen / gist:7d94ab5bd4fe46d4302e
Created April 28, 2015 15:07
docker containers for Gopher Sites
2f89c113c68c bketelsen/gophercon15:latest "/usr/sbin/nginx" 16 minutes ago Up 16 minutes 0.0.0.0:49156->80/tcp romantic_shockley
e8371c6519e7 bketelsen/gopheracademy:latest "/bin/sh -c 'revel r 10 days ago Up 18 minutes 80/tcp gopheracademy
88e055287a46 bketelsen/goinaction:latest "nginx" 12 days ago Up 18 minutes 80/tcp goinaction
e65d89d58c80 jwilder/nginx-proxy:latest "forego start -r" 12 days ago Up 18 minutes 443/tcp, 0.0.0.0:80->80/tcp nginx-proxy
@bketelsen
bketelsen / gist:18802b301ad0e6cc072b
Created April 29, 2015 13:29
mesos master logs
I0429 13:29:19.036458 28426 authenticator.hpp:170] Creating new server SASL connection
I0429 13:29:19.186409 28426 master.cpp:3799] Queuing up authentication request from slave(1)@10.209.129.31:5051 because authentication is still in progress
W0429 13:29:19.186610 28426 master.cpp:3866] Failed to authenticate slave(1)@10.209.129.31:5051: Authentication discarded
I0429 13:29:19.186656 28426 master.cpp:3813] Authenticating slave(1)@10.209.129.31:5051
I0429 13:29:19.186672 28426 master.cpp:3824] Using default CRAM-MD5 authenticator
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:8400 0.0.0.0:* LISTEN
tcp 0 0 172.31.100.17:8500 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:8500 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:35896 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:8600 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:5051 0.0.0.0:* LISTEN
package git
import (
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"strings"
"sync"