cff4823168
Scripts are the core of Magnum for COE deployment. To be more clear and consistent, two changes proposed in this patch: 1. Rename network related script to xxx-flannel-xxx given they are all for flannel and now we have calico driver. 2. Adding .sh for some scripts to be consistent with others. Change-Id: I97f3e53b4b43648a4896193fb4ce469dbf42c611
29 lines
579 B
Bash
29 lines
579 B
Bash
#!/bin/sh
|
|
|
|
. /etc/sysconfig/heat-params
|
|
|
|
if [ "$NETWORK_DRIVER" != "flannel" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
FLANNEL_JSON=/etc/sysconfig/flannel-network.json
|
|
FLANNELD_CONFIG=/etc/sysconfig/flanneld
|
|
|
|
cat > /etc/sysconfig/flanneld <<EOF
|
|
FLANNEL_ETCD_ENDPOINTS="http://127.0.0.1:2379"
|
|
FLANNEL_ETCD_PREFIX="/atomic.io/network"
|
|
FLANNEL_OPTIONS=
|
|
EOF
|
|
|
|
# Generate a flannel configuration that we will
|
|
# store into etcd using curl.
|
|
cat > $FLANNEL_JSON <<EOF
|
|
{
|
|
"Network": "$FLANNEL_NETWORK_CIDR",
|
|
"Subnetlen": $FLANNEL_NETWORK_SUBNETLEN,
|
|
"Backend": {
|
|
"Type": "$FLANNEL_BACKEND"
|
|
}
|
|
}
|
|
EOF
|