|
24 | 24 | sleep $(($ETCD_TTL+1)) |
25 | 25 |
|
26 | 26 | # seed initial service configuration if necessary |
27 | | -if ! etcdctl -C $ETCD ls $ETCD_PATH >/dev/null 2>/dev/null; then |
28 | | - etcdctl -C $ETCD set $ETCD_PATH/protocol ${DEIS_PROTOCOL:-http} |
29 | | - etcdctl -C $ETCD set $ETCD_PATH/secretKey ${DEIS_SECRET_KEY:-`openssl rand -base64 64 | tr -d '\n'`} |
30 | | - etcdctl -C $ETCD set $ETCD_PATH/builderKey ${DEIS_BUILDER_KEY:-`openssl rand -base64 64 | tr -d '\n'`} |
| 27 | +if ! etcdctl -C $ETCD ls $ETCD_PATH >/dev/null 2>&1; then |
| 28 | + etcdctl -C $ETCD set $ETCD_PATH/protocol ${DEIS_PROTOCOL:-http} >/dev/null |
| 29 | + etcdctl -C $ETCD set $ETCD_PATH/secretKey ${DEIS_SECRET_KEY:-`openssl rand -base64 64 | tr -d '\n'`} >/dev/null |
| 30 | + etcdctl -C $ETCD set $ETCD_PATH/builderKey ${DEIS_BUILDER_KEY:-`openssl rand -base64 64 | tr -d '\n'`} >/dev/null |
31 | 31 | fi |
32 | 32 |
|
33 | 33 | # wait for confd to run once and install initial templates |
34 | 34 | until confd -onetime -node $ETCD -config-file /app/confd.toml 2>/dev/null; do |
35 | | - echo "waiting for confd to write initial templates..." |
| 35 | + echo "controller: waiting for confd to write initial templates..." |
36 | 36 | sleep $(($ETCD_TTL/2)) # sleep for half the TTL |
37 | 37 | done |
38 | 38 |
|
39 | 39 | # wait for confd to populate all values |
40 | 40 | while grep -q '<no value>' /templates/confd_settings.py; do |
41 | | - echo "waiting for confd to write all values..." |
| 41 | + echo "controller: waiting for confd to write all values..." |
42 | 42 | confd -onetime -node $ETCD -config-file /app/confd.toml 2>/dev/null |
43 | 43 | sleep $(($ETCD_TTL/2)) # sleep for half the TTL |
44 | 44 | done |
@@ -67,6 +67,8 @@ trap on_exit INT TERM |
67 | 67 | confd -node $ETCD -config-file /app/confd.toml & |
68 | 68 | CONFD_PID=$! |
69 | 69 |
|
| 70 | +echo deis-controller running... |
| 71 | + |
70 | 72 | # publish the service to etcd using the injected HOST and PORT |
71 | 73 | if [[ ! -z $PUBLISH ]]; then |
72 | 74 |
|
|
0 commit comments