Skip to main content

Your first build

This tutorial takes you from zero to a customized image running. No hardware is required to complete the basic workflow.

1. Requirements

Docker and Python 3.10 or newer.

2. Pull the base images

docker pull ghcr.io/abelperezr/olt-ls:0.0.1
docker pull ghcr.io/abelperezr/olt-proxy:0.0.1

3. Clone and verify

git clone https://github.com/abelperezr/olt-light
cd olt-light
./build.sh check

check compiles the overlay's Python code and runs the unit tests. As a guardrail, it also fails if directories that belong to the base images (yang, device-ext, proxy/cap_allow) show up in the tree — those must never exist in this repo. The synthetic ONU inventories under seeds/ are an intentional part of the example.

4. Build your image

./build.sh

The result is light-olt:dev. The build takes seconds: it only copies the editable layer on top of the base, which already carries everything heavy. You can change the base and the tag without editing files:

BASE_IMAGE=ghcr.io/abelperezr/olt-ls:0.0.1 \
IMAGE_TAG=ghcr.io/my-user/my-olt:dev \
./build.sh

5. Start the example environment

The reference lab uses containerlab: OLT + NETCONF proxy + a Nokia SR OS BNG (the BNG needs your own image and license; drop that node if you only want the OLT + proxy pair).

cd examples
containerlab deploy -t lab.clab.yml

Try the eCLI:

ssh admin@172.30.30.10          # admin/admin

Altiplano points at the proxy IP (172.30.30.11 in the example), ports 831 and up. The topology details are in Deploying a lab.

6. Your first change

Edit anything under src/ (say, the eCLI welcome banner), then repeat:

./build.sh check && ./build.sh
containerlab deploy -t examples/lab.clab.yml --reconfigure

That's the whole loop: edit, verify, rebuild, redeploy.