Skip to content

Commit 6aa0092

Browse files
Gabriel MonroyMatthew Fisher
authored andcommitted
chore(journal): suppress etcdctl output, add other clarifying output
1 parent 7e9b418 commit 6aa0092

7 files changed

Lines changed: 36 additions & 22 deletions

File tree

builder/bin/boot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fi
3030

3131
# wait for confd to run once and install initial templates
3232
until confd -onetime -node $ETCD -config-file /app/confd.toml; do
33-
echo "waiting for confd to write initial templates..."
33+
echo "builder: waiting for confd to write initial templates..."
3434
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
3535
done
3636

@@ -65,6 +65,8 @@ function on_exit() {
6565
}
6666
trap on_exit INT TERM EXIT
6767

68+
echo deis-builder running...
69+
6870
# publish the service to etcd using the injected HOST and PORT
6971
if [[ ! -z $PUBLISH ]]; then
7072

cache/bin/boot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fi
3030

3131
# wait for confd to run once and install initial templates
3232
until confd -onetime -node $ETCD -config-file /app/confd.toml; do
33-
echo "waiting for confd to write initial templates..."
33+
echo "cache: waiting for confd to write initial templates..."
3434
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
3535
done
3636

@@ -50,6 +50,8 @@ trap on_exit INT TERM
5050
confd -node $ETCD -config-file /app/confd.toml &
5151
CONFD_PID=$!
5252

53+
echo deis-cache running...
54+
5355
# publish the service to etcd using the injected HOST and PORT
5456
if [[ ! -z $PUBLISH ]]; then
5557

controller/bin/boot

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,21 @@ done
2424
sleep $(($ETCD_TTL+1))
2525

2626
# 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
3131
fi
3232

3333
# wait for confd to run once and install initial templates
3434
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..."
3636
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
3737
done
3838

3939
# wait for confd to populate all values
4040
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..."
4242
confd -onetime -node $ETCD -config-file /app/confd.toml 2>/dev/null
4343
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
4444
done
@@ -67,6 +67,8 @@ trap on_exit INT TERM
6767
confd -node $ETCD -config-file /app/confd.toml &
6868
CONFD_PID=$!
6969

70+
echo deis-controller running...
71+
7072
# publish the service to etcd using the injected HOST and PORT
7173
if [[ ! -z $PUBLISH ]]; then
7274

database/bin/boot

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ done
3131
sleep $(($ETCD_TTL+1))
3232

3333
# seed initial service configuration if necessary
34-
if ! etcdctl -C $ETCD ls $ETCD_PATH >/dev/null 2>/dev/null; then
35-
etcdctl -C $ETCD set $ETCD_PATH/engine postgresql_psycopg2
36-
etcdctl -C $ETCD set $ETCD_PATH/adminUser ${PG_ADMIN_USER:-postgres}
37-
etcdctl -C $ETCD set $ETCD_PATH/adminPass ${PG_ADMIN_PASS:-changeme123}
34+
if ! etcdctl -C $ETCD ls $ETCD_PATH >/dev/null 2>&1; then
35+
etcdctl -C $ETCD set $ETCD_PATH/engine postgresql_psycopg2 >/dev/null
36+
etcdctl -C $ETCD set $ETCD_PATH/adminUser ${PG_ADMIN_USER:-postgres} >/dev/null
37+
etcdctl -C $ETCD set $ETCD_PATH/adminPass ${PG_ADMIN_PASS:-changeme123} >/dev/null
3838
etcdctl -C $ETCD set $ETCD_PATH/user ${PG_USER_NAME:-deis} >/dev/null
39-
etcdctl -C $ETCD set $ETCD_PATH/password ${PG_USER_PASS:-changeme123}
40-
etcdctl -C $ETCD set $ETCD_PATH/name ${PG_USER_DB:-deis}
39+
etcdctl -C $ETCD set $ETCD_PATH/password ${PG_USER_PASS:-changeme123} >/dev/null
40+
etcdctl -C $ETCD set $ETCD_PATH/name ${PG_USER_DB:-deis} >/dev/null
4141
fi
4242

4343
# wait for confd to run once and install initial templates
4444
until confd -onetime -node $ETCD -config-file /app/confd.toml; do
45-
echo "waiting for confd to write initial templates..."
45+
echo "database: waiting for confd to write initial templates..."
4646
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
4747
done
4848

@@ -70,6 +70,8 @@ sleep 1 && while [[ -z $(netstat -lnt | awk "\$6 == \"LISTEN\" && \$4 ~ \".5432\
7070
# perform a one-time reload to populate database entries
7171
/usr/local/bin/reload
7272

73+
echo deis-database running...
74+
7375
# publish the service to etcd using the injected HOST and PORT
7476
if [[ ! -z $PUBLISH ]]; then
7577

logger/bin/boot

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@ done
2424
sleep $(($ETCD_TTL+1))
2525

2626
# seed initial service configuration if necessary
27-
if ! etcdctl -C $ETCD ls $ETCD_PATH >/dev/null 2>/dev/null; then
27+
if ! etcdctl -C $ETCD ls $ETCD_PATH >/dev/null 2>&1; then
2828
etcdctl -C $ETCD mkdir $ETCD_PATH >/dev/null 2>&1 || true
2929
fi
3030

3131
# wait for confd to run once and install initial templates
3232
until confd -onetime -node $ETCD -config-file /app/confd.toml; do
33-
echo "waiting for confd to write initial templates..."
33+
echo "logger: waiting for confd to write initial templates..."
3434
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
3535
done
3636

3737
# cleanup old pidfile's
38-
rm -f /var/run/rsyslog.pid
38+
test -e /var/run/rsyslog.pid && rm -f /var/run/rsyslog.pid
3939

4040
# spawn the service in the background
4141
/usr/sbin/rsyslogd -n &
@@ -52,6 +52,8 @@ trap on_exit INT TERM
5252
confd -node $ETCD -config-file /app/confd.toml &
5353
CONFD_PID=$!
5454

55+
echo deis-logger running...
56+
5557
# publish the service to etcd using the injected HOST and PORT
5658
if [[ ! -z $PUBLISH ]]; then
5759

registry/bin/boot

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fi
3434

3535
# wait for confd to run once and install initial templates
3636
until confd -onetime -node $ETCD -config-file /app/confd.toml; do
37-
echo "waiting for confd to write initial templates..."
37+
echo "registry: waiting for confd to write initial templates..."
3838
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
3939
done
4040

@@ -55,6 +55,8 @@ trap on_exit INT TERM
5555
confd -node $ETCD -config-file /app/confd.toml &
5656
CONFD_PID=$!
5757

58+
echo deis-registry running...
59+
5860
# publish the service to etcd using the injected HOST and PORT
5961
if [[ ! -z $PUBLISH ]]; then
6062

router/bin/boot

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ sleep $(($ETCD_TTL+1))
2525

2626
# seed initial service configuration if necessary
2727
if ! etcdctl -C $ETCD ls /deis/services >/dev/null 2>&1; then
28-
etcdctl -C $ETCD mkdir /deis/services || true 2>/dev/null
29-
etcdctl -C $ETCD set $ETCD_PATH/port ${PORT:-80}
28+
etcdctl -C $ETCD mkdir /deis/services || true >/dev/null 2>&1
29+
etcdctl -C $ETCD set $ETCD_PATH/port ${PORT:-80} >/dev/null
3030
fi
3131

3232
# wait for confd to run once and install initial templates
3333
until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>/dev/null; do
34-
echo "waiting for confd to write initial templates..."
34+
echo "router: waiting for confd to write initial templates..."
3535
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
3636
done
3737

@@ -51,6 +51,8 @@ trap on_exit INT TERM
5151
confd -node $ETCD -config-file /app/confd.toml &
5252
CONFD_PID=$!
5353

54+
echo deis-router running...
55+
5456
# publish the service to etcd using the injected HOST and PORT
5557
if [[ ! -z $PUBLISH ]]; then
5658

0 commit comments

Comments
 (0)