Welcome!
Here you will find a bunch of ready to go labs based on a wide variety of network topologies and automation concepts using Containerlab as the orchestration engine.
This is mostly just for my own personal learning and mentoring, but I have made it public in case it helps anyone else who may be in the same situation!
If working locally, clone this repo to an area of your choosing. Most labs should work with 8Gb of free Memory to align with the default codespaces specs but it will be called out if more is required.
Next, install Containerlab following the steps at https://containerlab.dev/install/
Verify you're all good to go with containerlab version
Click the button below to launch this repo in a new codespace with Containerlab already installed
We use the 4-core / 16Gb memory Machine Type by default. You can change this to the 2-core one if you like but some of the bigger labs may not work.
To download and build all the Docker containers used in our labs at once, simply run the setup.sh
script. Note that this will take quite a while. If you would prefer not to wait each lab example has a script that you can run to only build that particulars labs Docker containers (manage.sh build
)
At this time, Juniper and Arista do not have publicly available images on the container registry, so these will need to be manually loaded and then tagged with "latest" so that they can be used in this repos provided examples. This also allows us to easily upgrade (or downgrade) to a new image version without having to modify all the Containerlab .clab files.
To download these images, you will need to register an account (free) on the Arista and Juniper websites and then download the NOS container images (URLs below):
- https://support.juniper.net/support/downloads/?p=crpdtrial (23.2R1 was used in this example)
- https://www.arista.com/en/support/software-download (cEOS64-lab-4.32.5.1M.tar.xz was used in this example)
From here, copy the images into the ./images
folder and load them, and pull the Nokia SRL image from the registry. Commands are below:
❯ sudo docker image pull ghcr.io/nokia/srlinux
Using default tag: latest
--snip--
❯ sudo docker import images/cEOS64-lab-4.32.5.1M.tar.xz ceos:latest
sha256:70314310c219009aa903f9ce57f1eef4a72337f21dc3b778179724203c8a31f1
❯ sudo docker image load -i images/junos-routing-crpd-docker-amd64-23.2R1.13.tgz
Loaded image: crpd:23.2R1.13
❯ sudo docker image tag crpd:23.2R1.13 crpd:latest
When you have loaded/imported/pulled all the NOS images and tagged the Juniper CRPD image with latest, you should see something similar to the below when executing sudo docker image list
❯ sudo docker image list
REPOSITORY TAG IMAGE ID CREATED SIZE
ceos latest 70314310c219 3 minutes ago 2.45GB
ghcr.io/nokia/srlinux latest afd4d4a4aee0 6 weeks ago 2.2GB
crpd 23.2R1.13 0cf5adbda509 22 months ago 498MB
crpd latest 0cf5adbda509 22 months ago 498MB
❯
Note: The Evaluation Juniper cRPD image only has limited functionality (OSPF, ISIS & Static Routing). Full functionality requires a license.
To upload a NOS image into your codespaces from your local machine, simply right click the images folder and select upload:
The a brief overview of this repos folder structure below. Each of these folders has its own README.md file with more information if required.
- .devcontainer: The Dev Container details used in a codespaces deployment
- composers: Products that require Docker Compose to run (i.e. Netbox)
- containers: Ready to go container Dockerfiles for a variety of products (Nornir, Ansible, GoBGP, etc.)
- examples: The Main area of this repo. Contains our NPA showcases
- images: A place to store images that are not publicly available (i.e. Arista cEOS)
- learning: My personal scrap area while I'm learning and tinkering with things. Will eventually delete
- tools: Some basic scripts that are not lab specific (i.e. doing traffic captures)
TBD