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

Commit

Permalink
Merge pull request #3366 from bacongobbler/bump-confd-0.8-store
Browse files Browse the repository at this point in the history
chore(store): bump confd to v0.8
  • Loading branch information
Matthew Fisher committed Mar 26, 2015
2 parents 778a0e1 + ed4a5e9 commit 4094b81
Show file tree
Hide file tree
Showing 11 changed files with 20 additions and 25 deletions.
2 changes: 1 addition & 1 deletion store/admin/bin/boot
Expand Up @@ -6,7 +6,7 @@
ETCD_PORT=${ETCD_PORT:-4001}
ETCD="$HOST:$ETCD_PORT"

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

# loop forever until the container is stopped
while true; do
Expand Down
4 changes: 2 additions & 2 deletions store/base/build.sh
Expand Up @@ -20,8 +20,8 @@ curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/
&& chmod +x /usr/local/bin/etcdctl

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

curl -sSL 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' | apt-key add -
echo "deb http://ceph.com/debian-giant trusty main" > /etc/apt/sources.list.d/ceph.list
Expand Down
5 changes: 0 additions & 5 deletions store/base/confd.toml

This file was deleted.

2 changes: 1 addition & 1 deletion store/base/templates/admin_keyring
@@ -1 +1 @@
{{ .deis_store_adminKeyring }}
{{ getv "/deis/store/adminKeyring" }}
18 changes: 9 additions & 9 deletions store/base/templates/ceph.conf
@@ -1,16 +1,16 @@
[global]
fsid = {{ .deis_store_fsid }}
mon initial members = {{ .deis_store_monSetupLock }}
mon host = {{ range $index, $mon := .deis_store_hosts }}{{ if $index }}, {{ end }}{{ $mon.Value }}{{ end }}
mon addr = {{ range $index, $mon := .deis_store_hosts }}{{ if $index }}, {{ end }}{{ Base $mon.Key }}:6789{{ end }}
fsid = {{ getv "/deis/store/fsid" }}
mon initial members = {{ getv "/deis/store/monSetupLock" }}
mon host = {{ join (getvs "/deis/store/hosts/*") "," }}
mon addr = {{ join (ls "/deis/store/hosts/*") ":6789 ," }}:6789
auth cluster required = cephx
auth service required = cephx
auth client required = cephx
osd pool default size = {{ .deis_store_size }}
osd pool default min_size = {{ .deis_store_minSize }}
osd pool default pg_num = {{ .deis_store_pgNum }}
osd pool default pgp_num = {{ .deis_store_pgNum }}
osd recovery delay start = {{ .deis_store_delayStart }}
osd pool default size = {{ getv "/deis/store/size" }}
osd pool default min_size = {{ getv "/deis/store/minSize" }}
osd pool default pg_num = {{ getv "/deis/store/pgNum" }}
osd pool default pgp_num = {{ getv "/deis/store/pgNum" }}
osd recovery delay start = {{ getv "/deis/store/delayStart" }}
log file = /dev/stdout
rgw_frontends = "civetweb port=8888"
rgw_thread_pool_size = 512
Expand Down
2 changes: 1 addition & 1 deletion store/base/templates/etc_hosts
@@ -1,4 +1,4 @@
{{ range $key := .deis_store_hosts }}{{ Base $key.Key }} {{ $key.Value }}
{{ range gets "/deis/store/hosts/*" }}{{ base .Key }} {{ .Value }}
{{ end }}

ff00::0 ip6-mcastprefix
Expand Down
2 changes: 1 addition & 1 deletion store/base/templates/mon_keyring
@@ -1 +1 @@
{{ .deis_store_monKeyring }}
{{ getv "/deis/store/monKeyring" }}
2 changes: 1 addition & 1 deletion store/daemon/bin/boot
Expand Up @@ -12,7 +12,7 @@ until etcdctl --no-sync -C $ETCD get /deis/store/monSetupComplete >/dev/null 2>&
sleep 5
done

until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>&1 ; do
until confd -onetime -node $ETCD --confdir /app --interval 5 --quiet >/dev/null 2>&1 ; do
echo "store-daemon: waiting for confd to write initial templates..."
sleep 5
done
Expand Down
4 changes: 2 additions & 2 deletions store/gateway/bin/boot
Expand Up @@ -26,7 +26,7 @@ done
sleep $(($ETCD_TTL+1))

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

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

echo deis-store-gateway running...
Expand Down
2 changes: 1 addition & 1 deletion store/metadata/bin/boot
Expand Up @@ -8,7 +8,7 @@ ETCD_PATH=${ETCD_PATH:-/deis/store}
HOSTNAME=`hostname`
MDS_NAME=$HOSTNAME

until confd -onetime -node $ETCD -config-file /app/confd.toml >/dev/null 2>&1 ; do
until confd -onetime -node $ETCD --confdir /app --interval 5 --quiet >/dev/null 2>&1 ; do
echo "store-metadata: waiting for confd to write initial templates..."
sleep 5
done
Expand Down
2 changes: 1 addition & 1 deletion store/monitor/bin/boot
Expand Up @@ -60,7 +60,7 @@ if ! etcdctl --no-sync -C $ETCD get ${ETCD_PATH}/monSetupComplete >/dev/null 2>&
fi
fi

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

0 comments on commit 4094b81

Please sign in to comment.