Skip to content

Commit ed4a5e9

Browse files
author
Matthew Fisher
committed
chore(store): bump confd to v0.8
1 parent a46078a commit ed4a5e9

11 files changed

Lines changed: 20 additions & 25 deletions

File tree

store/admin/bin/boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
ETCD_PORT=${ETCD_PORT:-4001}
77
ETCD="$HOST:$ETCD_PORT"
88

9-
confd -node $ETCD -config-file /app/confd.toml &
9+
confd -node $ETCD --confdir /app --interval 5 --quiet &
1010

1111
# loop forever until the container is stopped
1212
while true; do

store/base/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/
2020
&& chmod +x /usr/local/bin/etcdctl
2121

2222
# Use modified confd with a fix for /etc/hosts - see https://github.com/kelseyhightower/confd/pull/123
23-
curl -sSL https://s3-us-west-2.amazonaws.com/opdemand/confd-git-0e563e5 -o /usr/local/bin/confd
24-
chmod +x /usr/local/bin/confd
23+
curl -sSL -o /usr/local/bin/confd https://github.com/kelseyhightower/confd/releases/download/v0.8.0/confd-0.8.0-linux-amd64 \
24+
&& chmod +x /usr/local/bin/confd
2525

2626
curl -sSL 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' | apt-key add -
2727
echo "deb http://ceph.com/debian-giant trusty main" > /etc/apt/sources.list.d/ceph.list

store/base/confd.toml

Lines changed: 0 additions & 5 deletions
This file was deleted.

store/base/templates/admin_keyring

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ .deis_store_adminKeyring }}
1+
{{ getv "/deis/store/adminKeyring" }}

store/base/templates/ceph.conf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[global]
2-
fsid = {{ .deis_store_fsid }}
3-
mon initial members = {{ .deis_store_monSetupLock }}
4-
mon host = {{ range $index, $mon := .deis_store_hosts }}{{ if $index }}, {{ end }}{{ $mon.Value }}{{ end }}
5-
mon addr = {{ range $index, $mon := .deis_store_hosts }}{{ if $index }}, {{ end }}{{ Base $mon.Key }}:6789{{ end }}
2+
fsid = {{ getv "/deis/store/fsid" }}
3+
mon initial members = {{ getv "/deis/store/monSetupLock" }}
4+
mon host = {{ join (getvs "/deis/store/hosts/*") "," }}
5+
mon addr = {{ join (ls "/deis/store/hosts/*") ":6789 ," }}:6789
66
auth cluster required = cephx
77
auth service required = cephx
88
auth client required = cephx
9-
osd pool default size = {{ .deis_store_size }}
10-
osd pool default min_size = {{ .deis_store_minSize }}
11-
osd pool default pg_num = {{ .deis_store_pgNum }}
12-
osd pool default pgp_num = {{ .deis_store_pgNum }}
13-
osd recovery delay start = {{ .deis_store_delayStart }}
9+
osd pool default size = {{ getv "/deis/store/size" }}
10+
osd pool default min_size = {{ getv "/deis/store/minSize" }}
11+
osd pool default pg_num = {{ getv "/deis/store/pgNum" }}
12+
osd pool default pgp_num = {{ getv "/deis/store/pgNum" }}
13+
osd recovery delay start = {{ getv "/deis/store/delayStart" }}
1414
log file = /dev/stdout
1515
rgw_frontends = "civetweb port=8888"
1616
rgw_thread_pool_size = 512

store/base/templates/etc_hosts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{ range $key := .deis_store_hosts }}{{ Base $key.Key }} {{ $key.Value }}
1+
{{ range gets "/deis/store/hosts/*" }}{{ base .Key }} {{ .Value }}
22
{{ end }}
33

44
ff00::0 ip6-mcastprefix

store/base/templates/mon_keyring

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{ .deis_store_monKeyring }}
1+
{{ getv "/deis/store/monKeyring" }}

store/daemon/bin/boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ until etcdctl --no-sync -C $ETCD get /deis/store/monSetupComplete >/dev/null 2>&
1212
sleep 5
1313
done
1414

15-
until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>&1 ; do
15+
until confd -onetime -node $ETCD --confdir /app --interval 5 --quiet >/dev/null 2>&1 ; do
1616
echo "store-daemon: waiting for confd to write initial templates..."
1717
sleep 5
1818
done

store/gateway/bin/boot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ done
2626
sleep $(($ETCD_TTL+1))
2727

2828
# wait for confd to run once and install initial templates
29-
until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>/dev/null; do
29+
until confd -onetime -node $ETCD --confdir /app --interval 5 --quiet >/dev/null 2>/dev/null; do
3030
echo "store-gateway: waiting for confd to write initial templates..."
3131
sleep $(($ETCD_TTL/2)) # sleep for half the TTL
3232
done
@@ -106,7 +106,7 @@ function on_exit() {
106106
trap on_exit INT TERM
107107

108108
# spawn confd in the background to update services based on etcd changes
109-
confd -node $ETCD -config-file /app/confd.toml &
109+
confd -node $ETCD --confdir /app --interval 5 --quiet &
110110
CONFD_PID=$!
111111

112112
echo deis-store-gateway running...

store/metadata/bin/boot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ETCD_PATH=${ETCD_PATH:-/deis/store}
88
HOSTNAME=`hostname`
99
MDS_NAME=$HOSTNAME
1010

11-
until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>&1 ; do
11+
until confd -onetime -node $ETCD --confdir /app --interval 5 --quiet >/dev/null 2>&1 ; do
1212
echo "store-metadata: waiting for confd to write initial templates..."
1313
sleep 5
1414
done

0 commit comments

Comments
 (0)