Skip to content

How to setup virtual testbed for network tests with mix of VM and container images

License

Notifications You must be signed in to change notification settings

mbakalarski/vLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vLab

The idea is to set up virtual testbed with mix of VM and container images,
e.g. Cisco csr1000v and Juniper cRPD or Nokia SR Linux.
I've used KubeVirt for unified control plane and Multus to have more interfaces in virtual routers.

Install docker at first.
Then install kubectl and kind tool, e.g.

curl -LO "https://dl.k8s.io/release/$(curl -sL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
version=$(basename $(curl -s -w %{redirect_url} https://github.com/kubernetes-sigs/kind/releases/latest))
curl -Lo ./kind https://kind.sigs.k8s.io/dl/${version}/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind



Run vLab installation script:

bash <(curl -Ls "https://raw.githubusercontent.com/mbakalarski/vLab/main/vlab_install.sh") kubevirt

or

bash <(curl -Ls "https://raw.githubusercontent.com/mbakalarski/vLab/main/vlab_install.sh") nokubevirt

Expose VM images via http access, e.g.:

docker run --name www -dt --mount type=bind,source=$HOME/images,target=/usr/share/nginx/html -p 8080:80 nginx:latest

To create topology:

cd <Lab folder>
kubectl apply -f ./manifests/

and use CNI accept-bridge for each secondary network.

Then connect to console:

virtctl console <router name>

*) virtctl - in KubeVirt project; easy installation

and/or for containerized router:

kubectl exec -ti <router name> -- bash

About

How to setup virtual testbed for network tests with mix of VM and container images

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages