This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ./hsandbox go | |
Traceback (most recent call last): | |
File "./hsandbox", line 519, in <module> | |
main(sys.argv) | |
File "./hsandbox", line 508, in main | |
screen(hacking, argv, vertical) | |
File "./hsandbox", line 348, in screen | |
del os.environ["TMUX"] | |
File "/usr/lib64/python2.7/os.py", line 496, in __delitem__ | |
del self.data[key] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Docker registry mirror | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
Environment=UNIT=docker-registry-mirror | |
TimeoutStartSec=0 | |
ExecStartPre=/usr/bin/docker pull registry | |
ExecStartPre=-/usr/bin/docker run --name ${UNIT}-dvc -v /tmp/registry busybox true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[sheldonh@localhost etcdctl]$ cat Dockerfile | |
FROM golang:1.3.3-onbuild | |
RUN ln -s /go/bin/app /usr/bin/etcdctl | |
WORKDIR / | |
CMD ["/bin/bash"] | |
[sheldonh@localhost etcdctl]$ grep -bo R Dockerfile | |
1:R |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
kill_daemon() { | |
pid=$(getpid) | |
if [ -n "$pid" ]; then | |
echo "DEBUG: killing $pid" 1>&2 | |
kill $pid | |
while kill -0 $pid 2>/dev/null; do | |
if ! sleep 1; then | |
trap EXIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Background: | |
=========== | |
Running docker with --bip to support routing amongst containers across a CoreOS cluster. | |
Connections established outbound from containers are masqueraded to the host address. :-( | |
The culprit: | |
============ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FLEETCTL_TUNNEL="$(vagrant ssh-config core-01 | sed -n "s/[ ]*HostName[ ]*//gp"):$(vagrant ssh-config core-01 | sed -n "s/[ ]*Port[ ]*//gp")" | |
export FLEETCTL_TUNNEL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# pods/private-docker-registry.yml | |
id: private-docker-registry | |
kind: Pod | |
desiredState: | |
manifest: | |
id: privateDockerRegistry | |
version: v1beta1 | |
containers: | |
- name: registry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
172.17.8.1 - - [16/Sep/2014:09:28:37] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http" | |
2014-09-16 09:28:37,434 INFO: 172.17.8.1 - - [16/Sep/2014:09:28:37] "GET /v1/_ping HTTP/1.1" 200 4 "-" "Go 1.1 package http" | |
2014-09-16 09:28:37,438 DEBUG: args = {'namespace': 'library', 'repository': u'busybox'} | |
2014-09-16 09:28:37,438 DEBUG: api_error: images not found | |
2014-09-16 09:28:37,440 DEBUG: Source provided, registry acts as mirror | |
2014-09-16 09:28:37,440 DEBUG: Request: GET https://index.docker.io/v1/repositories/busybox/images | |
Headers: {'X-Docker-Token': u'true', 'Accept-Encoding': u'gzip', 'User-Agent': u'docker/1.2.0 go/go1.2.2 kernel/3.16.2-200.fc20.x86_64 os/linux arch/amd64'} | |
2014-09-16 09:28:37,455 INFO: Starting new HTTPS connection (1): index.docker.io | |
2014-09-16 09:28:39,104 DEBUG: "GET /v1/repositories/busybox/images HTTP/1.1" 200 None | |
2014-09-16 09:28:39,105 WARNING: {'x-docker-token': 'signature=2f670a58ee92ad39ffd15cc69c504fc435361f9d,repository="library/busybox",access=read', 'transfer-enc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fleetctl start redis-1-slave-1-amb-master.service | |
Unit redis-1-slave-1-amb-master.service launched on ddb48170.../172.17.8.102 | |
fleetctl start redis-1-slave-1.service | |
<<...hangs...>> | |
# redis-1-slave-1-amb-master.service | |
#################################### | |
[Unit] | |
Description=Redis cluster 1 slave 1 ambassador to master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var redis = require('haredis'); | |
var uuid = require('node-uuid'); | |
var swig = require('swig'); | |
var defaultRedises = '{{REDIS1_PORT_10000_TCP_ADDR}}:10000 {{REDIS2_PORT_10000_TCP_ADDR}}:10000 {{REDIS3_PORT_10000_TCP_ADDR}}:10000'; | |
var template = process.env.REDISES || defaultRedises; | |
var redises = swig.compile(template)(process.env).split(/\s+/); | |
var id = process.env.HOSTNAME || uuid.v4(); | |
var keepaliveMilliseconds = process.env.KEEPALIVE_MS || 3000; |