Collection of scripts for testbed deployment. k8s environments with Calico-VPP and SRv6 enabled. Tested on Ubuntu 20.04 machine with 8 CPU and 16 GB RAM
- vagrant
- mininet
- frr
- goBGP
Start by cloning this repository with all the submodules:
git clone --recurse-submodules git@github.com:netgroup/srv6-calico-vpp-tests.git
For the tests we are using modified container images since some features are still not part of the official Calico-VPP repository.
Install the required packages:
$ sudo apt-get update
$ sudo apt-get install -y jq nfs-kernel-server qemu-kvm libvirt-daemon-system \
libvirt-clients bridge-utils qemu ebtables dnsmasq-base libxslt-dev \
libxml2-dev libvirt-dev zlib1g-dev ruby-dev build-essential \
libguestfs-tools
$ sudo chmod a+r /boot/vmlinuz* # Required for libguestfs
$ sudo adduser `id -un` libvirt
$ sudo adduser `id -un` kvm
$ wget https://releases.hashicorp.com/vagrant/2.2.14/vagrant_2.2.14_x86_64.deb
$ sudo dpkg -i vagrant_2.2.14_x86_64.deb
$ rm vagrant_2.2.14_x86_64.deb
$ vagrant plugin install vagrant-libvirt
$ newgrp libvirt
Check if Mininet is installed by running:
$ /usr/bin/mn --version
If Mininet is not installed, run the install command (for Ubuntu/Debian):
$ sudo apt-get install mininet
You need to have FRR installed in order to run the mininet labs. Check if FRR is installed by running:
/usr/lib/frr/zebra -v
If FRR is not installed, follow these instructions (for Ubuntu/Debian):
-
sudo apt-key add keys.asc
-
rm keys.asc
-
run lsb_release -s -c
-
Edit the sources.list file in the /etc/apt folder, adding the following line at the end:
deb https://deb.frrouting.org/frr <release> frr-stable
replacing with the output of lsb_release -s -c
-
sudo apt update
-
sudo apt -y install frr frr-pythontools
$ # build vagrant image
$ make build-base-box
Install all the python packages required for the scenario1:
$ make create-python-venv
$ make install-python-dependencies
We first check that the value of CALICOVPP_SRV6_TE is set to “configmap” in yaml/test-srv6.yaml
- name: CALICOVPP_SRV6_TE
value: "configmap"
Deploy the mininet testbed with the node of the k8s cluster:
$ make start-scenario1
After the testbed is started, we need to congigure the k8s cluster with calico-vpp and srv6 enabled.
$ #connect to the master node
$ ssh vagrant@192.168.10.254 # password: vagrant
$ # deploy calico-vpp with srv6 enabled
$ kubectl apply -f yaml/test-srv6.yaml
$ # create ippools
$ kubectl apply -f yaml/test-srv6-res.yaml
$ # create configmap resource with srv6 config
$ kubectl apply -f yaml/configMap.yaml
After that we can check that all the pods are running:
$ kubectl get pods -A -o wide
We can check the SRv6 configuration inside vpp by running the following command:
$ kubectl -n calico-vpp-dataplane exec -it <calico-vpp-node-podname> -c vpp -- vppctl
from the vppctl prompt, we can
show the localsids:
vpp# sh sr localsids
show the SR policies:
vpp# sh sr policies
show the SR steering-policies:
vpp# sh sr steering-policies
edit the configmap file in yaml/configMap.yaml and applay the changes:
$ kubectl apply -f yaml/configMap.yaml
then we can check the SRv6 configuration inside vpp:
vpp# sh sr policies
and
vpp# sh sr steering-policies
.....
For instance, want to enter into the mininet node called r3
:
$ make enter-in name=r3
The following commands can be used to cleanup the deployment:
$ make destroy-scenario1