Permalink
Browse files

Added logspout container - just need to add LOGSPOUT_TARGET.

  • Loading branch information...
darron committed May 14, 2014
1 parent 0752bfe commit 855e26ec1c69808e1a1c1d04c644f0b8eecde339
Showing with 45 additions and 0 deletions.
  1. +4 −0 bin/default
  2. +41 −0 bin/octo
View
@@ -28,3 +28,7 @@ ENDPONT_ADDR="127.0.0.1"
EMAIL_NOTIFICATION="sysadmin@example.com"
OCTO_BIN="https://raw.githubusercontent.com/octohost/octohost/master/bin/octo"
+
+LOGSPOUT_IMAGE="progrium/logspout"
+#LOGSPOUT_TARGET=""
+LOGSPOUT="docker run -p 8000:8000 -d -v=/var/run/docker.sock:/tmp/docker.sock $LOGSPOUT_IMAGE $LOGSPOUT_TARGET"
View
@@ -63,8 +63,45 @@ pull_tentacles ()
docker pull $TENTACLES_IMAGE
}
+start_logspout ()
+{
+ if [ -z "$LOGSPOUT_TARGET" ]; then
+ echo "No LOGSPOUT_TARGET in /etc/default/octohost - not starting."
+ exit
+ fi
+ if [ -e "/var/run/docker.sock" ]; then
+ $LOGSPOUT
+ else
+ service docker start
+ sleep 5
+ $LOGSPOUT
+ fi
+}
+
+stop_logspout ()
+{
+ docker ps | grep "$LOGSPOUT_IMAGE" | awk '{ print $1 }' | xargs docker kill
+}
+
+pull_logspout ()
+{
+ docker pull $LOGSPOUT_IMAGE
+}
+
case "$1" in
+ logspout)
+ if [ "$2" == "start" ]; then
+ start_logspout
+ elif [ "$2" == "stop" ]; then
+ stop_logspout
+ elif [ "$2" == "pull" ]; then
+ pull_logspout
+ else
+ echo "Usage: octo logspout {start|stop|pull}"
+ fi
+ ;;
+
tentacles)
if [ "$2" == "start" ]; then
start_tentacles
@@ -249,6 +286,10 @@ case "$1" in
octo tentacles start Start octohost/tentacles service.
octo tentacles stop Stop octohost/tentacles service.
+ octo logspout pull Pull progrium/logspout image.
+ octo logspout start Start progrium/logspout service.
+ octo logspout stop Stop progrium/logspout service.
+
octo proxy:set {domain-name} {port} Set {domain-name} and {port} in tentacles.
octo proxy:get {domain-name} Get {port} for {domain-name} from tentacles.
octo proxy:rm {domain-name} Remove record for {domain-name} in tentacles.

0 comments on commit 855e26e

Please sign in to comment.