Skip to content

Commit

Permalink
Remove unused machine and align sonic and cumulus ports (#193)
Browse files Browse the repository at this point in the history
  • Loading branch information
iljarotar committed Sep 19, 2024
1 parent a9e8c77 commit 7e9270c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 47 deletions.
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,6 @@ password-machine01:
password-machine02:
@$(MAKE) --no-print-directory _password MACHINE_UUID=2294c949-88f6-5390-8154-fa53d93a3313

.PHONY: password-machine03
password-machine03:
@$(MAKE) --no-print-directory _password MACHINE_UUID=2a92f14d-d3b1-4d46-b813-5d058103743e

.PHONY: _free-machine
_free-machine: env
docker compose run $(DOCKER_COMPOSE_TTY_ARG) metalctl machine rm $(MACHINE_UUID)
Expand All @@ -202,10 +198,6 @@ free-machine01:
free-machine02:
@$(MAKE) --no-print-directory _free-machine MACHINE_NAME=machine02 MACHINE_UUID=2294c949-88f6-5390-8154-fa53d93a3313

.PHONY: free-machine03
free-machine03:
@$(MAKE) --no-print-directory _free-machine MACHINE_NAME=machine03 MACHINE_UUID=2a92f14d-d3b1-4d46-b813-5d058103743e

.PHONY: _console-machine
_console-machine:
@echo "exit console with CTRL+5 and then quit telnet through q + ENTER"
Expand All @@ -219,10 +211,6 @@ console-machine01:
console-machine02:
@$(MAKE) --no-print-directory _console-machine CONSOLE_PORT=4001

.PHONY: console-machine03
console-machine03:
@$(MAKE) --no-print-directory _console-machine CONSOLE_PORT=4002

## SSH TARGETS FOR MACHINES ##
# Python code could be replaced by jq, but it is not preinstalled on Cumulus
.PHONY: ssh-firewall
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,14 @@ docker compose run --rm metalctl machine rm e0ab02d2-27cd-5a5e-8efc-080ba80cf258

## Flavors

There's few versions of mini-lab environment that you can run. We call them flavors. There's 2 flavors at the moment:
There are three versions, or flavors, of the mini-lab environment which differ in regards to the NOS running on the leaves:

- `default` -- runs 2 machines.
- `cluster-api` -- runs 3 machines. Useful for testing Control plane and worker node deployment with [Cluster API provider](https://github.com/metal-stack/cluster-api-provider-metalstack).
- `sonic` -- use SONiC as network operating system for the leaves
- `cumulus` -- runs 2 Cumulus switches.
- `sonic` -- runs 2 SONiC switches

In order to start specific flavor, you can define the flavor as follows:

```bash
export MINI_LAB_FLAVOR=cluster-api
export MINI_LAB_FLAVOR=sonic
make
```
12 changes: 2 additions & 10 deletions images/sonic/config_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,18 @@
"admin_status": "up",
"mtu": "9100"
},
"Ethernet8": {
"Ethernet120": {
"lanes": "33,34,35,36",
"alias": "fortyGigE0/8",
"index": "2",
"speed": "40000",
"admin_status": "up",
"mtu": "9100"
},
"Ethernet12": {
"lanes": "37,38,39,40",
"alias": "fortyGigE0/12",
"index": "3",
"speed": "40000",
"admin_status": "up",
"mtu": "9100"
}
},
"VERSIONS": {
"DATABASE": {
"VERSION": "version_202311_03"
}
}
}
}
2 changes: 1 addition & 1 deletion inventories/group_vars/sonic/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dhcp_listening_interfaces:
- Vlan4000

metal_core_spine_uplinks:
- Ethernet0
- Ethernet120

sonic_docker_routing_config_mode: split-unified
sonic_frr_mgmt_framework_config: false
Expand Down
2 changes: 0 additions & 2 deletions mini-lab.cumulus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,5 @@ topology:
- endpoints: ["leaf02:swp1", "vms:lan1"]
- endpoints: ["leaf01:swp2", "vms:lan2"]
- endpoints: ["leaf02:swp2", "vms:lan3"]
- endpoints: ["leaf01:swp3", "vms:lan4"]
- endpoints: ["leaf02:swp3", "vms:lan5"]
- endpoints: ["leaf01:swp31", "inet:eth1"]
- endpoints: ["leaf02:swp31", "inet:eth2"]
14 changes: 6 additions & 8 deletions mini-lab.sonic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,9 @@ topology:
- endpoints: ["inet:ext", "mini_lab_ext:inet"]
mtu: 9000
- endpoints: ["www:ext", "mini_lab_ext:www"]
- endpoints: ["leaf01:eth1", "inet:eth1"]
- endpoints: ["leaf02:eth1", "inet:eth2"]
- endpoints: ["leaf01:eth2", "vms:lan0"]
- endpoints: ["leaf02:eth2", "vms:lan1"]
- endpoints: ["leaf01:eth3", "vms:lan2"]
- endpoints: ["leaf02:eth3", "vms:lan3"]
- endpoints: ["leaf01:eth4", "vms:lan4"]
- endpoints: ["leaf02:eth4", "vms:lan5"]
- endpoints: ["leaf01:eth1", "vms:lan0"]
- endpoints: ["leaf02:eth1", "vms:lan1"]
- endpoints: ["leaf01:eth2", "vms:lan2"]
- endpoints: ["leaf02:eth2", "vms:lan3"]
- endpoints: ["leaf01:eth3", "inet:eth1"]
- endpoints: ["leaf02:eth3", "inet:eth2"]
9 changes: 0 additions & 9 deletions scripts/manage_vms.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@
"lan_indices": [2, 3],
"serial-port": 4001,
},
"machine03": {
"name": "machine03",
"uuid": "2a92f14d-d3b1-4d46-b813-5d058103743e",
"disk-path": "/machine03.img",
"disk-size": "5G",
"memory": "2G",
"lan_indices": [4, 5],
"serial-port": 4002,
},
}


Expand Down

0 comments on commit 7e9270c

Please sign in to comment.