Create Testing with cEOS authored by Andre Sterba's avatar Andre Sterba
1. Install [containerlab](https://containerlab.srlinux.dev/install/) on your machine.
***containerlab and cEOS do not work with cgroupsv2 enabled!***
This is tracked in this [upstream issue](https://github.com/srl-labs/containerlab/issues/467).
Switch back to cgroupsv1 with the following kernel paramenter `systemd.unified_cgroup_hierarchy=0`.
2. Use the following config to get two cEOS containers running.
```yaml
name: gosdn-arista-base-topo
mgmt:
network: gosdn-dev-net
topology:
kinds:
ceos:
image: registry.code.fbi.h-da.de/danet/gosdn/ceos:latest
nodes:
ceos0:
kind: ceos
ceos1a:
kind: ceos
links:
- endpoints: ["ceos0:eth1", "ceos1a:eth1"]
```
3. Run `containerlab deploy --topo development.clab.yaml` to deploy and `containerlab destroy --topo development.clab.yaml` to destroy the stack.
4. You should now start the controller and init the gosdn-cli with `gosdnc --controller 127.0.0.1:55055 init`.
5. Add a new device with `./gosdnc dev create -a 172.20.20.2:6030 -u admin -p admin --name='test-ceos-1'` and remember the UUID of the device.
```sh
➜ gosdnc dev list
INFO[0000] OND 1: name: dev1, uuid: 5fb6e872-220d-492d-bf92-0d63a84d9841
```
6. Test if you can get the hostname of the device via gNMI.
```sh
➜ gosdnc dev get 5fb6e872-220d-492d-bf92-0d63a84d9841 /system/config/hostname
INFO[0000] timestamp:1643195928009506201 ond:{id:"5fb6e872-220d-492d-bf92-0d63a84d9841" name:"dev1" device:{timestamp:1643195928009490650 update:{path:{element:"system" element:"config" element:"hostname"} val:{string_val:"ceos1a"}}}} <nil>
```
7. You can also use [gnmic](https://gnmic.kmrd.dev/) to debug issues with cEOS.
```sh
gnmic -a 172.20.20.2:6030 -u admin -p admin --insecure capabilities
```