Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
feat(logger): use new logger component from controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Monroy authored and Matthew Fisher committed Apr 15, 2014
1 parent 7701372 commit 7216f73
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion controller/scheduler/coreos.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def attach(self, name):
[Service]
ExecStartPre=/bin/sh -c "until /usr/bin/docker inspect {name} >/dev/null 2>&1; do sleep 1; done"
ExecStart=/bin/sh -c "/usr/bin/docker logs -f {name} 2>&1 | logger -p local0.info -t {app}[{c_type}.{c_num}] --tcp --server $(etcdctl get /deis/services/deis-logger/deis-logger.1 | cut -d ':' -f1) --port $(etcdctl get /deis/services/deis-logger/deis-logger.1 | cut -d ':' -f2)"
ExecStart=/bin/sh -c "/usr/bin/docker logs -f {name} 2>&1 | logger -p local0.info -t {app}[{c_type}.{c_num}] --udp --server $(etcdctl get /deis/logs/host | cut -d ':' -f1) --port $(etcdctl get /deis/logs/port | cut -d ':' -f2)"
[X-Fleet]
X-ConditionMachineOf={name}.service
Expand Down
3 changes: 2 additions & 1 deletion controller/systemd/deis-controller.service
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[Unit]
Description=deis-controller
Requires=deis-logger.service

[Service]
TimeoutStartSec=20m
ExecStartPre=/bin/sh -c "/usr/bin/docker history deis/controller >/dev/null || /usr/bin/docker pull deis/controller"
ExecStart=/bin/sh -c "IFACE=$(netstat -nr | grep ^0.0.0.0 | awk '{print $8}') && HOST_IP=$(/bin/ifconfig $IFACE | awk '/inet /{print $2}') && exec /usr/bin/docker run --name deis-controller -p 8000:8000 -e PUBLISH=8000 -e HOST=$HOST_IP deis/controller"
ExecStart=/bin/sh -c "IFACE=$(netstat -nr | grep ^0.0.0.0 | awk '{print $8}') && HOST_IP=$(/bin/ifconfig $IFACE | awk '/inet /{print $2}') && exec /usr/bin/docker run --name deis-controller -p 8000:8000 -e PUBLISH=8000 -e HOST=$HOST_IP --volumes-from=deis-logger deis/controller"
ExecStop=/usr/bin/docker rm -f deis-controller

[Install]
Expand Down

0 comments on commit 7216f73

Please sign in to comment.