Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed flavor #166

Draft
wants to merge 27 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ LAB_TOPOLOGY=mini-lab.cumulus.yaml
else ifeq ($(MINI_LAB_FLAVOR),sonic)
LAB_MACHINES=machine01,machine02
LAB_TOPOLOGY=mini-lab.sonic.yaml
else ifeq ($(MINI_LAB_FLAVOR),mixed)
LAB_MACHINES=machine01,machine02
LAB_TOPOLOGY=mini-lab.mixed.yaml
else
$(error Unknown flavor $(MINI_LAB_FLAVOR))
endif
Expand Down Expand Up @@ -112,9 +115,9 @@ cleanup-control-plane:

.PHONY: cleanup-partition
cleanup-partition:
mkdir -p clab-mini-lab
sudo $(CONTAINERLAB) destroy --topo mini-lab.cumulus.yaml
sudo $(CONTAINERLAB) destroy --topo mini-lab.sonic.yaml
sudo $(CONTAINERLAB) destroy --topo mini-lab.mixed.yaml

.PHONY: _privatenet
_privatenet: env
Expand Down
51 changes: 51 additions & 0 deletions mini-lab.mixed.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: mini-lab
prefix: ""

mgmt:
network: bridge

topology:
nodes:
leaf01:
kind: cvx
image: networkop/cx:3.7.0
kernel: docker.io/grigoriymikh/kernel:4.1.0
sandbox: grigoriymikh/sandbox:latest
labels:
ansible-group: cumulus
binds:
- apt-transport-https.tar.gz:/root/jessie-apt-transport-fix.tar.gz
- files/ssh/id_rsa.pub:/root/.ssh/authorized_keys
leaf02:
kind: linux
image: ${MINI_LAB_SONIC_IMAGE}
labels:
ansible-group: sonic
binds:
- /dev:/dev
- files/ssh/id_rsa.pub:/authorized_keys
inet:
kind: linux
image: quay.io/frrouting/frr:9.1.0
binds:
- files/inet/daemons:/etc/frr/daemons
- files/inet/frr.conf:/etc/frr/frr.conf
- files/inet/vtysh.conf:/etc/frr/vtysh.conf
- files/inet/network.sh:/root/network.sh
exec:
- sh /root/network.sh
vms:
kind: linux
image: ${MINI_LAB_VM_IMAGE}
binds:
- /dev:/dev
- scripts:/mini-lab
links:
- endpoints: ["leaf01:swp31", "inet:eth1"]
- endpoints: ["leaf02:eth1", "inet:eth2"]
- endpoints: ["leaf01:swp1", "vms:lan0"]
- endpoints: ["leaf02:eth2", "vms:lan1"]
- endpoints: ["leaf01:swp2", "vms:lan2"]
- endpoints: ["leaf02:eth3", "vms:lan3"]
- endpoints: ["leaf01:swp3", "vms:lan4"]
- endpoints: ["leaf02:eth4", "vms:lan5"]