diff --git a/internal-lab-setup-assets/README.md b/internal-lab-setup-assets/README.md index 603677e..5174205 100644 --- a/internal-lab-setup-assets/README.md +++ b/internal-lab-setup-assets/README.md @@ -1,5 +1,15 @@ NOTE: This folder contains assets that were used to deploy the Containerlab environment that hosts 30 labs used in this workshop. It is included in this repo for any curious minds. +# Prerequisites + +The `internet2/getting_started` is used for the lab Ubuntu hosts and must be locally built via Docker. + +To build locally, use `sudo docker build -t internet2/getting_started -f Containerfile .` + +Images for emulated network devices must also be available. See ./images/README.md for more information. + +# ContainerLab + Tune host settings https://hmntsharma.github.io/cisco-xrd/base_setup/#clone-the-xrd-tools-repository Set mgmt address in the config (instead of automatically assigning) as XRd has a bug and a container keeps its old address if it's been assigned a new address. containerlab is non-deterministic when assigning mgmt IPs. diff --git a/internal-lab-setup-assets/workshop-init.sh b/internal-lab-setup-assets/workshop-init.sh index 8f349a2..b1c8885 100755 --- a/internal-lab-setup-assets/workshop-init.sh +++ b/internal-lab-setup-assets/workshop-init.sh @@ -1,12 +1,18 @@ #!/bin/bash -echo "clab:$CX23_LAB_PASSWORD" | chpasswd +# Set password for the user via environment variable. This allows each +# unix container to have their own password passed in by clab, helping +# to avoid one user from accidentally signing into another's container. +echo "clab:$LONI_LAB_PASSWORD" | chpasswd +# Give users root of their own unix containers because we're nice echo "clab ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/clab chmod 0440 /etc/sudoers.d/clab +# Enable highlighting in vim echo "syntax on" > /home/clab/.vimrc +# Required in some environments, like ours, to make clab happy /sbin/sysctl -w net.ipv6.conf.all.disable_ipv6=1 /sbin/sysctl -w net.ipv6.conf.default.disable_ipv6=1 /sbin/sysctl -w net.ipv6.conf.lo.disable_ipv6=1 diff --git a/internal-lab-setup-assets/workshop.clab.yml.j2 b/internal-lab-setup-assets/workshop.clab.yml.j2 index ab80fe7..c4ff267 100644 --- a/internal-lab-setup-assets/workshop.clab.yml.j2 +++ b/internal-lab-setup-assets/workshop.clab.yml.j2 @@ -39,7 +39,7 @@ topology: image: internet2/getting_started {{- shared_node_settings(x) }} env: - CX23_LAB_PASSWORD: Self-Nose-Reasonable-Dust-{{"%02d" % id}} + LONI_LAB_PASSWORD: Self-Nose-Reasonable-Dust-{{"%02d" % id}} links: - endpoints: ["cisco1:Gi0-0-0-0", "cisco3:Gi0-0-0-0"]