deployment: integrate ngcp-network for adjusting network.yml

Seems to work, at least for sp1 hosts in PRO installs. Let's see
whether PRO deployments work again with new templates,
network.yml and ngcp-network being in place now.

Happy PRO deploying dear Jenkins while I'm switching office->home. :)

From: Michael Prokop <mprokop@sipwise.com>
ksolomko/vlan
Michael Prokop 13 years ago
parent 1ea8908e38
commit 40b45bd5c5

@ -1172,6 +1172,31 @@ cat > $TARGET/etc/hostname << EOF
${TARGET_HOSTNAME}
EOF
# adjust network.yml
if "$PRO_EDITION" ; then
# set variable to have the *other* node from the PRO setup available for ngcp-network
case $ROLE in
sp1) PEER=sp2 ;;
sp2) PEER=sp1 ;;
esac
cat << EOT | grml-chroot $TARGET /bin/bash
if ! [ -r /etc/ngcp-config/network.yml ] ; then
echo '/etc/ngcp-config/network.yml does not exist'
exit 0
fi
ngcp-network --set-interface=lo --set-interface=$DEFAULT_INSTALL_DEV --set-interface=$INTERNAL_DEV
ngcp-network --peer=$PEER
ngcp-network --host=$PEER --peer=$ROLE --set-interface=lo
ngcp-network --set-interface=$INTERNAL_DEV
ngcp-network --move-from=lo --move-to=$INTERNAL_DEV --type=ha_int
ngcp-network --set-interface=eth1 --host=$PEER --ip=$DEFAULT_IP2 --netmask=$DEFAULT_INTERNAL_NETMASK --type=ha_int
ngcpcfg build
EOT
fi
if "$RETRIEVE_MGMT_CONFIG" ; then
echo "Nothing to do, /etc/network/interfaces was already set up."
elif "$DHCP" ; then

Loading…
Cancel
Save