Skip to content

Instantly share code, notes, and snippets.

View darron's full-sized avatar
🎯
Focusing

darron froese darron

🎯
Focusing
View GitHub Profile
description "Docker daemon"
start on (local-filesystems and net-device-up IFACE!=lo)
stop on runlevel [!2345]
limit nofile 524288 1048576
limit nproc 524288 1048576
respawn
kill timeout 20
@darron
darron / gist:2aadb8f30f3dd6f580bf
Created September 12, 2015 21:41
etcd open file errors
015/09/12 07:22:58 etcdserver: failed to purge wal file open infra.etcd/member/wal: too many open files
2015/09/12 07:25:58 etcdserver: failed to purge wal file open infra.etcd/member/wal: too many open files
2015/09/12 07:28:59 etcdserver: failed to purge snap file open infra.etcd/member/snap: too many open files
2015/09/12 07:32:00 etcdserver: failed to purge snap file open infra.etcd/member/snap: too many open files
2015/09/12 07:35:00 etcdserver: failed to purge snap file open infra.etcd/member/snap: too many open files
2015/09/12 07:38:01 etcdserver: failed to purge snap file open infra.etcd/member/snap: too many open files
2015/09/12 07:41:02 etcdserver: failed to purge snap file open infra.etcd/member/snap: too many open files
2015/09/12 07:44:03 etcdserver: failed to purge snap file open infra.etcd/member/snap: too many open files
2015/09/12 07:47:03 etcdserver: failed to purge snap file open infra.etcd/member/snap: too many open files
2015/09/12 07:50:04 etcdserver: failed to purge wal file open infr
@darron
darron / problem.md
Last active August 29, 2015 14:24
Rackspace, cloud-init and old Trusty Image IDs.

Turns out that if you're using this version of the Ubuntu 14.04 Image and you do an apt-get upgrade then it seems to overwrite /etc/init/cloud-init-local.conf which appears to cause the next boot to fail.

It is the only difference I could find when building the image repeatadly over the last few hours.

Getting the Rackspace Nova client upgraded (my old one didn't work) so that I could see the current Ubuntu Trusty Image ID gave me a different problem with the new image (28153eac-1bae-4039-8d9f-f8b513241efe) that I have now dealt with.

Wish list: It would be very nice if there were easily findable lists of Image IDs kind of like this:

http://cloud-images.ubuntu.com/trusty/current/

@darron
darron / gist:89a5e46599b0ab8937c1
Last active August 29, 2015 14:23
Userdata for octohost on Digital Ocean with ZFS - be careful - it might eat your data.
export PUBLIC_IPV4=$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)
export CONSUL_KEY=$(consul keygen)
service consul stop
rm -rf /var/cache/octohost/*
sudo cat > /etc/consul.d/default.json << EOL
{
"data_dir": "/var/cache/octohost",
"server": true,
"bootstrap": true,
"client_addr": "0.0.0.0",
@darron
darron / base.json
Last active August 29, 2015 14:21
virtualbox-iso build
{
"variables": {
"chef_version": "12.0.3",
"packer_box_dir": "/home/packer/builds/"
},
"builders": [
{
"type": "virtualbox-iso",
"boot_command": [
"<esc><wait>",
root@doctohost01:~# consul-template -config config.cfg -log-level debug
2015/05/26 15:11:28 [DEBUG] (config) loading configs from "config.cfg"
2015/05/26 15:11:28 [DEBUG] (logging) setting up logging
2015/05/26 15:11:28 [DEBUG] (logging) config:
{
"name": "consul-template",
"level": "debug",
"syslog": true,
"syslog_facility": "LOCAL5"
@darron
darron / gist:1592debd77598dd7041e
Created May 26, 2015 19:09
Running under Consul Template 0.9.0
darron@doctohost01:~$ cat config.cfg
consul = "127.0.0.1:8500"
retry = "10s"
max_stale = "10m"
log_level = "debug"
wait = "30s"
syslog {
enabled = true
facility = "LOCAL5"
2015-05-25T20:38:19.382201+00:00 i-c972d41e consul-template[27516]: (runner) creating new runner (dry: false, once: false)
2015-05-25T20:38:19.382622+00:00 i-c972d41e consul-template[27516]: merging with config at /etc/consul-template/config/
2015-05-25T20:38:19.396508+00:00 i-c972d41e consul-template[27516]: runner: final config (tokens suppressed):#012#012{#012 "path": "",#012 "consul": "127.0.0.1:8500",#012 "vault": {#012 "address": "",#012 "ssl": {#012 "enabled": true,#012 "verify": true,#012 "cert": "",#012 "ca_cert": ""#012 }#012 },#012 "auth": {#012 "enabled": false,#012 "username": "",#012 "password": ""#012 },#012 "ssl": {#012 "enabled": false,#012 "verify": true,#012 "cert": "",#012 "ca_cert": ""#012 },#012 "syslog": {#012 "enabled": true,#012 "facility": "LOCAL5"#012 },#012 "max_stale": 600000000000,#012 "templates": [#012 {#012 "source": "/etc/consul-template/templates/default.ctmpl",#012 "destination": "/etc/consul-t
2015/05/25 11:52:27 [INFO] (runner) creating consul/api client
2015/05/25 11:52:27 [DEBUG] (runner) setting consul address to 127.0.0.1:8500
2015/05/25 11:52:27 [INFO] (runner) creating vault/api client
2015/05/25 11:52:27 [DEBUG] (runner) enabling vault SSL
2015/05/25 11:52:27 [INFO] (runner) creating Watcher
2015/05/25 11:52:27 [INFO] (runner) starting
2015/05/25 11:52:27 [DEBUG] (runner) running initial templates
2015/05/25 11:52:27 [INFO] (runner) running
2015/05/25 11:52:27 [DEBUG] (runner) checking template /home/darron/template.ctmpl
2015/05/25 11:52:27 [INFO] (runner) was not watching 1 dependencies
consul = "127.0.0.1:8500"
retry = "10s"
max_stale = "10m"
log_level = "debug"
wait = "30s"
syslog {
enabled = true
facility = "LOCAL5"
}