5 # change the password because this script is run on a passwordless cloud-image
6 echo 'ubuntu:opnfv' | chpasswd
8 # Wait for a floating IP
9 # as a workaround to NAT breakage
12 # Variables to be filled in with python
15 # directly access the instance from the external net without NAT
19 ip addr add $OWN_IP/$EXT_NET_MASK dev ens7
21 ZEBRA_CONFIG_LOCATION="/etc/quagga/zebra.conf"
22 DAEMONS_FILE_LOCATION="/etc/quagga/daemons"
23 BGPD_CONFIG_LOCATION="/etc/quagga/bgpd.conf"
24 BGPD_LOG_FILE="/var/log/bgpd.log"
26 DEBIAN_FRONTEND=noninteractive apt-get update
27 DEBIAN_FRONTEND=noninteractive apt-get install quagga -y
30 chown quagga:quagga $BGPD_LOG_FILE
32 chown quagga:quagga $DAEMONS_FILE_LOCATION
33 cat <<CATEOF > $DAEMONS_FILE_LOCATION
44 touch $ZEBRA_CONFIG_LOCATION
45 chown quagga:quagga $ZEBRA_CONFIG_LOCATION
47 cat <<CATEOF > $BGPD_CONFIG_LOCATION
54 bgp router-id ${OWN_IP}
55 neighbor ${NEIGHBOR_IP} remote-as 100
56 no neighbor ${NEIGHBOR_IP} activate
58 address-family vpnv4 unicast
59 neighbor ${NEIGHBOR_IP} activate
67 log file ${BGPD_LOG_FILE}
70 chown quagga:quagga $BGPD_CONFIG_LOCATION