Skip to content

ContainerLab yaml file with absolute paths can be problematic #187

@italovalcy

Description

@italovalcy

The CLab yaml file with absolute directory paths can be very problematic, resulting on the message below while trying to create a new CLab:

Image

Example:

> tree .
.
├── README.md
├── configs
│   ├── client.sh
│   ├── default.yml
│   ├── nodes.yml
│   ├── single-tag-10.yml
│   ├── single-tag-range-10-15.yml
│   ├── srl.cfg
│   └── untagged.yml
├── ping.sh
├── set-iface.sh
└── vlan.clab.yml

2 directories, 11 files
> cat vlan.clab.yml
name: vlan

topology:
  nodes:
    srl1:
      kind: nokia_srlinux
      image: ghcr.io/nokia/srlinux:24.10.1
      startup-config: /home/users/fulano/srlinux-vlan-handling-lab/configs/srl.cfg

    srl2:
      kind: nokia_srlinux
      image: ghcr.io/nokia/srlinux:24.10.1
      startup-config: /home/users/fulano/srlinux-vlan-handling-lab/configs/srl.cfg

    client1:
      kind: linux
      image: ghcr.io/srl-labs/alpine
      binds:
        - /home/users/fulano/srlinux-vlan-handling-lab/configs/client.sh:/config.sh
      exec:
        - "ash -c '/config.sh 1'"

    client2:
      kind: linux
      image: ghcr.io/srl-labs/alpine
      binds:
        - /home/users/fulano/srlinux-vlan-handling-lab/configs/client.sh:/config.sh
      exec:
        - "ash -c '/config.sh 2'"

  links:
    # links between client1 and srl1
    - endpoints: [client1:eth1, srl1:e1-1]

    # inter-switch link
    - endpoints: [srl1:e1-10, srl2:e1-10]

    # links between client2 and srl2
    - endpoints: [srl2:e1-1, client2:eth1]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions