-
-
Save rvenugopal/71997a8a0777b6f6472a to your computer and use it in GitHub Desktop.
Revisions
-
Ross Kukulinski revised this gist
Mar 25, 2015 . 1 changed file with 1 addition and 6 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -16,12 +16,7 @@ TimeoutStartSec=0 ExecStart=/bin/bash -c '\ while true; do \ port=$(docker inspect --format=\'{{(index (index .NetworkSettings.Ports "6379/tcp") 0).HostPort}}\' app-redis.service); \ etcdctl set /services/app-redis/dfw ${COREOS_PRIVATE_IPV4}:$port --ttl 10; \ sleep 5; \ done' -
Ross Kukulinski revised this gist
Oct 30, 2014 . 2 changed files with 0 additions and 41 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,28 +0,0 @@ This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +0,0 @@ -
Ross Kukulinski revised this gist
Oct 9, 2014 . 2 changed files with 60 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ [Unit] Description=App Redis Sidekick Requires=docker.service Requires=etcd.service After=docker.service After=etcd.service After=app-redis.service BindsTo=app-redis.service [Service] EnvironmentFile=/etc/environment User=core TimeoutStartSec=0 ExecStart=/bin/bash -c '\ while true; do \ port=$(docker inspect --format=\'{{(index (index .NetworkSettings.Ports "6379/tcp") 0).HostPort}}\' app-redis.service); \ timeout 1 bash -c "cat < /dev/null > /dev/tcp/${COREOS_PRIVATE_IPV4}/\"$port\""; \ if [ $? -eq 0 ]; then \ etcdctl set /services/app-redis/dfw ${COREOS_PRIVATE_IPV4}:$port --ttl 10; \ else \ etcdctl rm /services/app-redis/dfw; \ fi; \ sleep 5; \ done' ExecStop=/usr/bin/etcdctl rm /services/app-redis/dfw [X-Fleet] MachineOf=app-redis.service This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ [Unit] Description=App Service Requires=docker.service Requires=etcd.service Requires=app-sk@%i.service After=docker.service After=etcd.service [Service] EnvironmentFile=/etc/environment User=core Restart=always TimeoutStartSec=0 ExecStartPre=-/usr/bin/docker kill %p-%i ExecStartPre=-/usr/bin/docker rm %p-%i ExecStartPre=/usr/bin/docker pull quay.io/user/app ExecStart=/usr/bin/docker run --name %p-%i \ -p ${COREOS_PRIVATE_IPV4}::3000 \ -e REDIS_PASSWORD=XYZ1234 \ -e DATACENTER=dfw \ quay.io/user/app ExecStop=/usr/bin/docker stop %p-%i [X-Fleet] Conflicts=app@*.service -
Ross Kukulinski revised this gist
Oct 9, 2014 . 1 changed file with 16 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ [Unit] Description=App Redis After=docker.service Requires=docker.service Requires=app-redis-sk.service [Service] EnvironmentFile=/etc/environment TimeoutStartSec=0 Restart=always ExecStartPre=-/usr/bin/docker kill %n ExecStartPre=-/usr/bin/docker rm %n ExecStartPre=/usr/bin/docker pull redis ExecStart=/usr/bin/docker run --name %n -p ${COREOS_PRIVATE_IPV4}::6379 redis:latest redis-server --requirepass XYZ1234 ExecStop=/usr/bin/docker stop %n -
Ross Kukulinski revised this gist
Oct 9, 2014 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -10,4 +10,4 @@ RUN npm -g install bower gulp grunt-cli bunyan RUN mkdir -p /var/log/supervisor ENTERYPOINT ["/usr/bin/node", "--version"] -
Ross Kukulinski created this gist
Oct 9, 2014 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ FROM ubuntu:14.04 MAINTAINER Ross Kukulinski "[email protected]" RUN apt-get -qq update RUN apt-get -qq install -y python-software-properties software-properties-common curl git build-essential supervisor emacs23-nox nano RUN add-apt-repository -y ppa:chris-lea/node.js RUN apt-get -qq update RUN apt-get -qq install -y nodejs RUN npm -g install npm RUN npm -g install bower gulp grunt-cli bunyan RUN mkdir -p /var/log/supervisor CMD ["/usr/bin/node", "--version"]