Containerlab is rapidly emerging as a viable solution on macOS, thanks to the increasing availability of ARM64-based NOS container images. The following Containerlab kinds work excellent with macOS on Apple Silicon:
Prerequisites
- Mac computer with Apple silicon
- macOS 14.0 or later
- Git
- uv
Steps
-
Download OrbStack and open it.
-
Open your favorite terminal emulator.
We will work from the command line for the following steps.
- Change to the
Documentsdirectory.
cd ~/Documents
- Clone the containerlab-orbstack repo from GitHub.
git clone https://github.com/mweisel/containerlab-orbstack.git
- Change to the
containerlab-orbstackdirectory.
cd container-orbstack
- Create a Python virtual environment for Ansible.
uv sync
- Verify Ansible is installed.
uv run ansible --version
- Start OrbStack (if not already started).
orb status || orb start
- Create the
clabLinux machine.
orb create ubuntu:noble clab
- Verify the
clabLinux machine is listed and in arunningstate.
orb list
- Test Ansible connectivity to the
clabLinux machine.
uv run ansible all -m ping
- Deploy the server.
uv run ansible-playbook server.yml
The automated process should take less than a few minutes to complete.
- Verify the installation of the components.
orb -m clab -s 'containerlab version && docker version && gh version && go version'
Lab
- Log in to the
clabLinux machine.
orb -m clab
- Change to the
srl01directory.
cd ~/labs/srl01
- Deploy the lab.
clab deploy
- Test SSH connectivity to the
mgmt0.0interface of theclab-srl01-srlnode.
ssh clab-srl01-srl show version
- Destroy the lab.
clab destroy -c