Git Product home page Git Product logo

srv6-calico-vpp-tests's Introduction

srv6-calico-vpp-tests

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

Requirements

  • vagrant
  • mininet
  • frr
  • goBGP

Installation

Start by cloning this repository with all the submodules:

    git clone --recurse-submodules [email protected]: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

Installation of Mininet

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

Installation of FRRouting suite (FRR)

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):

  1. wget https://deb.frrouting.org/frr/keys.asc

  2. sudo apt-key add keys.asc

  3. rm keys.asc

  4. run lsb_release -s -c

  5. 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

  1. sudo apt update

  2. sudo apt -y install frr frr-pythontools

Building vagrant base image

$ # build vagrant image 
$ make build-base-box

Scenario1

image info

Requirements

Install all the python packages required for the scenario1:

$ make create-python-venv
$ make install-python-dependencies

Deploy Scenario1 with TE-ConfigMap

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 [email protected] # 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

Check the SRv6 configuration inside vpp

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

SR-TE with congifmap

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

Deploy Scenario1 with TE-BGP

.....

Entering the mininet node (unamed namespace)

For instance, want to enter into the mininet node called r3:

$ make enter-in name=r3

Cleanup the deployment

The following commands can be used to cleanup the deployment:

    $ make destroy-scenario1

srv6-calico-vpp-tests's People

Contributors

zvfvrv avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kepaest

srv6-calico-vpp-tests's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.