Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 2.22 KB

bgp-labs-github-codespaces.md

File metadata and controls

26 lines (18 loc) · 2.22 KB
title date tags netlab_tag
Running BGP Labs in GitHub Codespaces
2024-06-25 07:45:00 +0200
BGP
netlab
codespace

I love open-source tools (and their GitHub repositories). Someone launches a cool idea, and you can dig through their source code to figure out how it works. It beats reading documentation or fixing AI hallucinations every day of the week ;)

Not too long ago, the containerlab team launched the ability to run containerlab within a free1 container2 running on GitHub, and that seemed like a perfect solution to run the BGP labs (Jeroen van Bemmel pointing me in the right direction was another significant step forward).

Alas, nothing is as simple as it looks. Building a dev container is a bit more complex than docker build, so I decided to reuse GitHub's work and do it in a GitHub action. I also had to tweak the netlab installation scripts a bit (they have to install containerlab but not Docker/Moby), but after a few hours, I had a running proof-of-concept. Unfortunately, the initial configuration crashed every time I started the lab due to yet another Ansible glitch.

Anyway, after a lengthy yak-shaving exercise, I pushed out netlab release 1.8.4, a GitHub action built the container and pushed it to GitHub container registry, and I could use it in BGP labs.

The results were well worth the effort. Running BGP labs in a GitHub codespaces container is as easy as it gets:

  • Open the Run BGP with GitHub Codespaces document in your browser
  • Click the "create a new codespace" link and create a codespace.
  • Follow the rest of the instructions and enjoy the free labs ;)

{{}}Start with GitHub Codespaces{{}}

Footnotes

  1. Within limits

  2. Yes, Docker-in-Docker is a thing. Maybe it's time we start watching how tops spin around us ;)