heat-coe-templates/fragments/configure-flannel.sh
Lars Kellogg-Stedman b1c36cdd31 refactor config using software config support
this splits the giant user-data script into smaller modules.  this
makes things easier to manage and also permits us to use cloud-config
scripts in addition to shell scripts.
2014-12-30 22:47:10 -05:00

19 lines
472 B
Bash

#!/bin/sh
. /etc/sysconfig/heat-params
# wait for etcd to become active (we will need it to push the flanneld config)
while ! curl -sf http://localhost:4001/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 \
-X PUT -d value='{
"Network": "'"$FLANNEL_NETWORK_CIDR"'",
"Subnetlen": '"$FLANNEL_NETWORK_SUBNETLEN"'}'