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
16 ZEBRA_CONFIG_LOCATION="/etc/quagga/zebra.conf"
17 DAEMONS_FILE_LOCATION="/etc/quagga/daemons"
18 BGPD_CONFIG_LOCATION="/etc/quagga/daemons"
19 BGPD_LOG_FILE="/var/log/bgpd.log"
21 DEBIAN_FRONTEND=noninteractive apt-get update
22 DEBIAN_FRONTEND=noninteractive apt-get install quagga -y
25 chown quagga:quagga $BGPD_LOG_FILE
27 chown quagga:quagga $DAEMONS_FILE_LOCATION
28 cat <<CATEOF > $DAEMONS_FILE_LOCATION
39 touch $ZEBRA_CONFIG_LOCATION
40 chown quagga:quagga $ZEBRA_CONFIG_LOCATION
42 cat <<CATEOF > $BGPD_CONFIG_LOCATION
49 bgp router-id ${OWN_IP}
50 neighbor ${NEIGHBOR_IP} remote-as 100
51 no neighbor ${NEIGHBOR_IP} activate
53 address-family vpnv4 unicast
54 neighbor ${NEIGHBOR_IP} activate
62 log file ${BGPD_LOG_FILE}
65 chown quagga:quagga $BGPD_CONFIG_LOCATION