Skip to content

Instantly share code, notes, and snippets.

View carmstrong's full-sized avatar

Chris Armstrong carmstrong

View GitHub Profile
input {
tcp {
host => "0.0.0.0"
port => 5228
codec => json_lines
}
}
output {
elasticsearch {
@carmstrong
carmstrong / gist:66f9cc2ce5e8fb005d4d
Last active April 14, 2016 16:01
AWS CloudFormation circular dependency
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description": "Deis on EC2: http://deis.io/",
"Parameters" : {
"KeyPair" : {
"Description" : "Name of an existing EC2 KeyPair to enable SSH access to the Deis hosts",
"Type" : "String",
"MinLength": "1",
"MaxLength": "64",
"AllowedPattern" : "[-_ a-zA-Z0-9]*",
diff --git a/builder/bin/boot b/builder/bin/boot
index 89f6211..fe8119f 100755
--- a/builder/bin/boot
+++ b/builder/bin/boot
@@ -60,14 +60,12 @@ docker load -i /progrium_cedarish.tar
# pull required images
# Custom slugbuilder?
-etcdctl --no-sync -C $ETCD mk /deis/slugbuilder/image deis/slugbuilder:latest >/dev/null 2>&1 || true
-SLUGBUILDER=`etcdctl --no-sync -C $ETCD get /deis/slugbuilder/image`
@carmstrong
carmstrong / bootstrap_etcd
Created July 31, 2014 00:46
confd 0.6.x templating woes
wget -q https://s3-us-west-2.amazonaws.com/opdemand/confd-0.6.x-json-firstsecondlastpart-rand -O ./confd
chmod +x ./confd
etcdctl set /deis/domains/upright-banana foo.bar.ca whoami.com
etcdctl set /deis/services/upright-banana/upright-banana_v2 1.2.3.4:4445
etcdctl set /deis/services/downright-tropico/downright-tropico_v2 2.3.4.5:1233
etcdctl set /deis/builder/users/carmstrong/deis PRIVATE_KEY_MATERIAL
etcdctl set /deis/builder/users/carmstrong/too PRIVATE_KEY_MATERIAL
etcdctl set /deis/builder/users/gabrtv/gabriel PRIVATE_KEY_MATERIAL
etcdctl set /deis/builder/users/gabrtv/gabrtv PRIVATE_KEY_MATERIAL
{{ range $user := gets "/builder/users/*" }}{{ range $keys := gets "/builder/users/" + base $user.Key + "/*" }}
command="/usr/local/bin/gitreceive run {{ base $user.Key }} {{ base $keys.Key }}",no-agent-forwarding,no-pty,no-user-rc,no-X11-forwarding,no-port-forwarding {{ $keys.Value }}
{{ end }}{{ end }}
$ make status
fleetctl --strict-host-key-checking=false list-units
UNIT STATE LOAD ACTIVE SUB DESC MACHINE
deis-builder-data.service loaded loaded active exited deis-builder-data b67b505e.../172.17.8.100
deis-builder.service launched loaded active running deis-builder b67b505e.../172.17.8.100
deis-cache.service launched loaded active running deis-cache b67b505e.../172.17.8.100
deis-controller.service launched loaded active running deis-controller b67b505e.../172.17.8.100
deis-database-data.service loaded loaded active exited deis-database-data b67b505e.../172.17.8.100
deis-database.service launched loaded active running deis-database b67b505e.../172.17.8.100
deis-logger-data.service loaded loaded active exited deis-logger-data b67b505e.../172.17.8.100
@carmstrong
carmstrong / gist:8770e5dbb30b07ae4a24
Created July 21, 2014 02:38
deis registry /data
core@deis-1 ~ $ docker tag carmstrong/router:latest 172.17.8.100:5000/router
core@deis-1 ~ $ docker push 172.17.8.100:5000/router
The push refers to a repository [172.17.8.100:5000/router] (len: 1)
Sending image list
Pushing repository 172.17.8.100:5000/router (1 tags)
Image 511136ea3c5a already pushed, skipping
101e9f33c3dc: Image successfully pushed
53e0ea871c5d: Image successfully pushed
42ffda5fb276: Image successfully pushed
cc0067db4f11: Image successfully pushed
diff --git a/contrib/ec2/README.md b/contrib/ec2/README.md
index 6bbf8e1..fc39338 100644
--- a/contrib/ec2/README.md
+++ b/contrib/ec2/README.md
@@ -62,11 +62,12 @@ which is already filled out. The defaults will be applied for the other settings
## Choose whether to launch in VPC
-To launch you cluster into a VPC, export two additional environment variables:
+To launch your cluster into a VPC, export three additional environment variables:
@carmstrong
carmstrong / fleettest.sh
Created June 17, 2014 22:54
Fleet load blocking on ExecStartPre
#!/bin/bash
for i in {1..10}
do
printf "[Service]\nExecStartPre=/bin/sh -c 'while true; do echo hi; done'\nExecStart=/bin/true\n" > ./$i.service
fleetctl load --block-attempts=600 ./$i.service
rm -f ./$i.service
fleetctl start $i.service
done
@carmstrong
carmstrong / gist:23fd387c80942540236a
Created May 28, 2014 18:43
Docker index out-of-space
Step 0 : FROM deis/base
Pulling image (latest) from deis/base, endpoint: https://cdn-registry-1.docker.io/v1/ 60024338bc63
Download complete 511136ea3c5a
Download complete 6170bb7b0ad1
Error downloading dependent layers 79fdb1362c84
Error pulling image (latest) from deis/base, endpoint: https://cdn-registry-1.docker.io/v1/, mkdir /var/lib/docker/btrfs/subvolumes/79fdb1362c848d06252eb2cb466fe196d1f852b11d8c4532b21dfd9c64cfa632/usr/share/doc/lsb-base: no space left on device 60024338bc63
Error pulling image (latest) from deis/base, mkdir /var/lib/docker/btrfs/subvolumes/79fdb1362c848d06252eb2cb466fe196d1f852b11d8c4532b21dfd9c64cfa632/usr/share/doc/lsb-base: no space left on device 60024338bc63
Could not find repository on any of the indexed registries.