use flanneld sysconfig for etcd url

This commit is contained in:
Lars Kellogg-Stedman 2015-01-02 14:48:59 -05:00
parent 6cf8b904b5
commit cb51ae97b7
1 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,7 @@
#!/bin/sh
. /etc/sysconfig/heat-params
. /etc/sysconfig/flanneld
if [ "$FLANNEL_USE_VXLAN" == "true" ]; then
use_vxlan=1
@ -19,15 +20,14 @@ cat > /etc/sysconfig/flannel-network.json <<EOF
EOF
# wait for etcd to become active (we will need it to push the flanneld config)
while ! curl -sf http://localhost:4001/v2/keys/; do
while ! curl -sf -o /dev/null $FLANNEL_ETCD/v2/keys/; do
echo "waiting for etcd"
sleep 1
done
# put the flannel config in etcd
echo "creating flanneld config in etcd"
curl -sf -L http://localhost:4001/v2/keys/coreos.com/network/config \
curl -sf -L $FLANNEL_ETCD/v2/keys/coreos.com/network/config \
-X PUT \
--data-urlencode value@/etc/sysconfig/flannel-network.json