Move from Quagga to FRRouting

Recently the Quagga image that we use for the multi_nodes_gate was
pulled from docker hub and a replacement needs to be used. According
to the Cumulus Networks website [0] they are moving to FRRouting.

This change aims to replace all instances of Quagga with FRR to
accomplish this.

[0] https://cumulusnetworks.com/learn/frrouting/

Change-Id: I66d5b0d719f46303b2c0f342e00b642ce03e8051
This commit is contained in:
Michael Beaver 2019-08-06 16:45:14 -05:00 committed by Alexander Noskov
parent e4e862b7d1
commit 4932e05257
6 changed files with 27 additions and 27 deletions

View File

@ -1,37 +1,37 @@
#!/bin/bash
QUAGGA_DAEMONS="${TEMP_DIR}/daemons"
QUAGGA_DEBIAN_CONF="${TEMP_DIR}/debian.conf"
QUAGGA_BGPD_CONF="${TEMP_DIR}/bgpd.conf"
FRR_DAEMONS="${TEMP_DIR}/daemons"
FRR_DEBIAN_CONF="${TEMP_DIR}/debian.conf"
FRR_BGPD_CONF="${TEMP_DIR}/bgpd.conf"
bgp_router_config() {
quagga_as_number="$(config_bgp_as "quagga_as")"
frr_as_number="$(config_bgp_as "frr_as")"
calico_as_number="$(config_bgp_as "calico_as")"
bgp_net="$(config_netspec_for_role "bgp")"
quagga_ip="$(config_vm_net_ip "build" "$bgp_net")"
frr_ip="$(config_vm_net_ip "build" "$bgp_net")"
# shellcheck disable=SC2016
QUAGGA_AS=${quagga_as_number} CALICO_AS=${calico_as_number} QUAGGA_IP=${quagga_ip} envsubst '${QUAGGA_AS} ${CALICO_AS} ${QUAGGA_IP}' < "${TEMPLATE_DIR}/bgpd_conf.sub" > "${QUAGGA_BGPD_CONF}"
FRR_AS=${frr_as_number} CALICO_AS=${calico_as_number} FRR_IP=${frr_ip} envsubst '${FRR_AS} ${CALICO_AS} ${FRR_IP}' < "${TEMPLATE_DIR}/bgpd_conf.sub" > "${FRR_BGPD_CONF}"
cp "${TEMPLATE_DIR}/daemons.sub" "${QUAGGA_DAEMONS}"
cp "${TEMPLATE_DIR}/debian_conf.sub" "${QUAGGA_DEBIAN_CONF}"
cp "${TEMPLATE_DIR}/daemons.sub" "${FRR_DAEMONS}"
cp "${TEMPLATE_DIR}/debian_conf.sub" "${FRR_DEBIAN_CONF}"
}
bgp_router_start() {
# nodename where BGP router should run
nodename=$1
remote_work_dir="/var/tmp/quagga"
remote_work_dir="/var/tmp/frr"
remote_daemons_file="${remote_work_dir}/$(basename "$QUAGGA_DAEMONS")"
remote_debian_conf_file="${remote_work_dir}/$(basename "$QUAGGA_DEBIAN_CONF")"
remote_bgpd_conf_file="${remote_work_dir}/$(basename "$QUAGGA_BGPD_CONF")"
remote_daemons_file="${remote_work_dir}/$(basename "$FRR_DAEMONS")"
remote_debian_conf_file="${remote_work_dir}/$(basename "$FRR_DEBIAN_CONF")"
remote_bgpd_conf_file="${remote_work_dir}/$(basename "$FRR_BGPD_CONF")"
ssh_cmd "${nodename}" mkdir -p "${remote_work_dir}"
rsync_cmd "$QUAGGA_DAEMONS" "${nodename}:${remote_daemons_file}"
rsync_cmd "$QUAGGA_DEBIAN_CONF" "${nodename}:${remote_debian_conf_file}"
rsync_cmd "$QUAGGA_BGPD_CONF" "${nodename}:${remote_bgpd_conf_file}"
rsync_cmd "$FRR_DAEMONS" "${nodename}:${remote_daemons_file}"
rsync_cmd "$FRR_DEBIAN_CONF" "${nodename}:${remote_debian_conf_file}"
rsync_cmd "$FRR_BGPD_CONF" "${nodename}:${remote_bgpd_conf_file}"
ssh_cmd "${nodename}" docker run -ti -d --net=host --privileged -v /var/tmp/quagga:/etc/quagga --restart always --name Quagga "$IMAGE_QUAGGA"
ssh_cmd "${nodename}" docker run -ti -d --net=host --privileged -v /var/tmp/frr:/etc/frr --restart always --name FRRouting "$IMAGE_BGP"
}

View File

@ -13,7 +13,7 @@ export IMAGE_PROMENADE_CLI=${IMAGE_PROMENADE_CLI:-quay.io/airshipit/promenade:cf
export IMAGE_PEGLEG_CLI=${IMAGE_PEGLEG_CLI:-quay.io/airshipit/pegleg:50ce7a02e08a0a5277c2fbda96ece6eb5782407a}
export IMAGE_SHIPYARD_CLI=${IMAGE_SHIPYARD_CLI:-quay.io/airshipit/shipyard:4dd6b484d11e86ad51da733841b9ef137421d461}
export IMAGE_COREDNS=${IMAGE_COREDNS:-docker.io/coredns/coredns:1.2.2}
export IMAGE_QUAGGA=${IMAGE_QUAGGA:-docker.io/cumulusnetworks/quagga:CL3.3.2}
export IMAGE_BGP=${IMAGE_BGP:-docker.io/frrouting/frr@sha256:8046c06a59741fdb2ff0f23fb0e1be2c6e7e23f17ea7a8f21116e708d89f7cd6}
export IMAGE_DRYDOCK_CLI=${IMAGE_DRYDOCK_CLI:-quay.io/airshipit/drydock:d93d6d5a0a370ced536180612d1ade708e29cd47}
export IMAGE_DOCKER_REGISTRY=${IMAGE_DOCKER_REGISTRY:-"docker.io/registry:2"}
export IMAGE_HYPERKUBE=${IMAGE_HYPERKUBE:-gcr.io/google_containers/hyperkube-amd64:v1.12.9}

View File

@ -231,7 +231,7 @@
},
"bgp" : {
"quagga_as": 64688,
"frr_as": 64688,
"calico_as": 64671
}
}

View File

@ -99,7 +99,7 @@
}
},
"bgp" : {
"quagga_as": 64688,
"frr_as": 64688,
"calico_as": 64671
}
}

View File

@ -1,8 +1,8 @@
log file /var/log/quagga/bgpd.log
log file /var/log/frr/bgpd.log
!
!
router bgp ${QUAGGA_AS}
bgp router-id ${QUAGGA_IP}
router bgp ${FRR_AS}
bgp router-id ${FRR_IP}
neighbor calico peer-group
neighbor calico remote-as ${CALICO_AS}
bgp listen range 0.0.0.0/0 peer-group calico
@ -13,7 +13,7 @@ router bgp ${QUAGGA_AS}
!
route-map calico-node-fix-same-as permit 100
set as-path exclude ${CALICO_AS}
set as-path prepend ${QUAGGA_AS}
set as-path prepend ${FRR_AS}
!
line vty
!

View File

@ -1,7 +1,7 @@
#
# If this option is set the quagga script automatically loads
# If this option is set the frr script automatically loads
# the config via "vtysh -b" when the servers are started.
# Check /etc/pam.d/quagga if you intend to use "vtysh"!
# Check /etc/pam.d/frr if you intend to use "vtysh"!
#
vtysh_enable=yes
zebra_options=" -s 90000000 --daemon -A 0.0.0.0"
@ -15,5 +15,5 @@ pimd_options=" --daemon -A 127.0.0.1"
ldpd_options=" --daemon -A 127.0.0.1"
# The list of daemons to watch is automatically generated by the init script.
watchquagga_enable=yes
watchquagga_options=(-adz -r /usr/sbin/servicebBquaggabBrestartbB%s -s /usr/sbin/servicebBquaggabBstartbB%s -k /usr/sbin/servicebBquaggabBstopbB%s -b bB -t 90)
watchfrr_enable=yes
watchfrr_options=(-adz -r /usr/sbin/servicebBfrrbBrestartbB%s -s /usr/sbin/servicebBfrrbBstartbB%s -k /usr/sbin/servicebBfrrbBstopbB%s -b bB -t 90)