| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | |
| 3 | . /etc/sysconfig/heat-paramsscip-shell source . . `/etc/sysconfig/heat-params`. |
| 4 | |
| 5 | if [scip-shell system . . `[`. "$NETWORK_DRIVER" != "flannel" ]; then |
| 6 | exit 0 |
| 7 | fi |
| 8 | |
| 9 | sedscip-shell system . . sed. -i ' |
| 10 | /^FLANNEL_ETCD_ENDPOINTS=/ s|=.*|="http://'"$ETCD_SERVER_IP"':2379"| |
| 11 | /^#FLANNEL_OPTIONS=/ s//FLANNEL_OPTIONS="-iface eth0 --ip-masq"/ |
| 12 | ' /etc/sysconfig/flanneldscip-shell filesystem . . `/etc/sysconfig/flanneld`. |
| 13 | |
| 14 | catscip-shell system . . cat. >> /etc/sysconfig/flanneldscip-shell filesystem . . `/etc/sysconfig/flanneld`. <<EOF |
| 15 | |
| 16 | # etcd config key. This is the configuration key that flannel queries |
| 17 | # For address range assignment |
| 18 | FLANNEL_ETCD_KEY="/flannel/network" |
| 19 | EOF |
| 20 | |
| 21 | echoscip-shell system . . echo. "activating flanneld service" |
| 22 | systemctl enable flanneld |
| 23 | |
| 24 | echoscip-shell system . . echo. "starting flanneld service" |
| 25 | systemctl --no-block start flanneld |