Skip to content

Instantly share code, notes, and snippets.

View carmstrong's full-sized avatar

Chris Armstrong carmstrong

View GitHub Profile
@carmstrong
carmstrong / diff.diff
Created October 14, 2015 17:11
Custom Docker
core@deis-01 ~ $ logout
diff --git a/contrib/coreos/user-data.example b/contrib/coreos/user-data.example
index 5bb6e0f..48cb009 100644
--- a/contrib/coreos/user-data.example
+++ b/contrib/coreos/user-data.example
@@ -42,6 +42,23 @@ coreos:
command: stop
enable: false
- name: docker.service
+ content: |
@carmstrong
carmstrong / diff.diff
Created October 1, 2015 01:17
azure diff
--- azuredeploy-sgoings.json 2015-09-30 18:15:49.000000000 -0700
+++ azuredeploy.json 2015-09-30 18:16:06.000000000 -0700
@@ -14,9 +14,15 @@
"description": "Domain name associated with the load balancer public IP"
}
},
+ "dnsPrefixNameForPublicIP": {
+ "type": "string",
+ "metadata": {
+ "description": "Unique DNS Name for the Public IP used to access the Virtual Machine."
@carmstrong
carmstrong / Dockerfile
Created August 14, 2015 00:01
Mount CoreOS VHD
FROM ubuntu:12.04
WORKDIR /tmp
RUN apt-get install -y bzip2 qemu wget
RUN modprobe nbd
RUN wget http://stable.release.core-os.net/amd64-usr/647.2.0/coreos_production_azure_image.vhd.bz2
RUN bzip2 -d coreos_production_azure_image.vhd.bz2
RUN qemu-nbd -c /dev/nbd0 coreos_production_azure_image.vhd
RUN mkdir /mnt/coreos
@carmstrong
carmstrong / gist:88e96bc8ba359002d5e4
Created July 10, 2015 22:33
Deis healthcheck HTTP codes
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
HTTP/1.1 200 OK
@carmstrong
carmstrong / gist:fc40c9034c7545d967eb
Created June 18, 2015 20:57
deis-builder new volume
diff --git a/deisctl/units/deis-builder.service b/deisctl/units/deis-builder.service
index 9de18c7..53661d8 100644
--- a/deisctl/units/deis-builder.service
+++ b/deisctl/units/deis-builder.service
@@ -4,11 +4,10 @@ Description=deis-builder
[Service]
EnvironmentFile=/etc/environment
TimeoutStartSec=30m
-ExecStartPre=/bin/sh -c "docker inspect deis-builder-data >/dev/null 2>&1 || docker run --name deis-builder-data -v /var/lib/docker alpine:3.1 /bin/true"
ExecStartPre=/bin/sh -c "IMAGE=`/run/deis/bin/get_image /deis/builder` && docker history $IMAGE >/dev/null 2>&1 || docker pull $IMAGE"
@carmstrong
carmstrong / policy.json
Created June 10, 2015 04:34
AWS IAM access policy for Deis creation
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1433910304184",
"Action": "autoscaling:*",
"Effect": "Allow",
"Resource": "*"
},
{
/deis/store
/deis/store/monSetupComplete
/deis/store/filesystemSetupComplete
/deis/store/delayStart
/deis/store/monKeyring
/deis/store/adminKeyring
/deis/store/osds
/deis/store/osds/10.21.1.34
/deis/store/osds/10.21.2.188
/deis/store/osds/10.21.1.35
@carmstrong
carmstrong / gist:b58c0446be10a3d21713
Created May 13, 2015 23:23
deis-publisher strace
deis-01:~# strace -p 16787 &
deis-01:~# Process 16787 attached
epoll_wait(4, {{EPOLLOUT, {u32=2343648864, u64=140430594358880}}}, 128, -1) = 1
epoll_wait(4, {{EPOLLIN|EPOLLOUT, {u32=2343648864, u64=140430594358880}}}, 128, -1) = 1
futex(0x8cc560, FUTEX_WAKE, 1) = 1
read(3, "HTTP/1.1 200 OK\r\nContent-Type: a"..., 4096) = 2992
epoll_wait(4, {}, 128, 0) = 0
futex(0x8cc560, FUTEX_WAKE, 1) = 1
epoll_ctl(4, EPOLL_CTL_DEL, 3, 7ffd66f5fdb4) = 0
close(3) = 0
@carmstrong
carmstrong / daemon1
Last active August 29, 2015 14:20
Ceph hang on start
2015-05-05 23:25:06.330716 7f7e82697700 0 -- 10.132.253.121:6801/1 >> 10.132.162.15:6801/1 pipe(0x6829000 sd=71 :6801 s=0 pgs=0 cs=0 l=0 c=0x426ffa0).accept connect_seq 2 vs existing 1 state standby
2015-05-05 23:25:06.355427 7f7e82d9e700 0 -- 10.132.253.121:6801/1 >> 10.132.253.118:6801/1 pipe(0x6824000 sd=108 :6801 s=0 pgs=0 cs=0 l=0 c=0x4270aa0).accept connect_seq 2 vs existing 1 state standby
2015-05-05 23:25:06.363901 7f7e837a1700 0 -- 10.132.253.121:6801/1 >> 10.132.162.16:6801/1 pipe(0x6b65000 sd=150 :6801 s=0 pgs=0 cs=0 l=0 c=0x4270100).accept connect_seq 2 vs existing 1 state standby
2015-05-05 23:30:51.366301 7f7e82d9e700 0 -- 10.132.253.121:6801/1 >> 10.132.253.118:6801/1 pipe(0x6824000 sd=108 :6801 s=2 pgs=12 cs=3 l=0 c=0x4270ec0).fault with nothing to send, going to standby
2015-05-05 23:30:51.384787 7f7e837a1700 0 -- 10.132.253.121:6801/1 >> 10.132.162.16:6801/1 pipe(0x6b65000 sd=150 :6801 s=2 pgs=12 cs=3 l=0 c=0x4270680).fault with nothing to send, going to standby
2015-05-05 23:30:51.3855
@carmstrong
carmstrong / etcd-20rc1.diff
Last active August 29, 2015 14:13
etcd 2.0rc1 on CoreOS
diff --git a/contrib/coreos/user-data.example b/contrib/coreos/user-data.example
index 6c37afc..12308f8 100644
--- a/contrib/coreos/user-data.example
+++ b/contrib/coreos/user-data.example
@@ -5,12 +5,10 @@ coreos:
# generate a new token for each unique cluster from https://discovery.etcd.io/new
# uncomment the following line and replace it with your discovery URL
# discovery: https://discovery.etcd.io/12345693838asdfasfadf13939923
- addr: $private_ipv4:4001
- peer-addr: $private_ipv4:7001