Getting Started with the App¶
This document provides a step-by-step tutorial on how to get the App going and how to use it.
The tutorial starts from a Nautobot with no data. It deploys, inspects, and destroys a lab of two Nokia SR Linux nodes
and one linux node. Use a superuser account for each step.
First steps with the App¶
Step 1: Install the app¶
Install the app. Add it to PLUGINS. See Install Guide. The default
App Configuration is correct for this tutorial.
Step 2: Add a containerlab host¶
- Set up a Linux server with Docker as a containerlab host. See Set up a containerlab host.
-
On the host, pull the two images of the tutorial. The Deploy Lab job does not pull images.
-
Add the host in Nautobot with the name
local-clab. See Add a host in Nautobot. - Do the login check from each worker server.
Step 3: Make a node mapping¶
- Go to Devices > Manufacturers. Add the manufacturer
Nokia. - Go to Devices > Platforms. Add the platform
Nokia SR Linuxwith the manufacturerNokia. - Go to Containerlab > Node Mappings. Add a node mapping with the values of the table below. See Add a node mapping and Nokia SR Linux.
- Put the two interface rows in "Interface Mappings". Click "Add another interface" for the second row.
- Click Create.
| Field or physical name | Value or container name |
|---|---|
| Platform | Nokia SR Linux |
| Kind | nokia_srlinux |
| Image | ghcr.io/nokia/srlinux:24.10.1 |
ethernet-1/1 |
ethernet-1/1 |
ethernet-1/2 |
ethernet-1/2 |
Step 4: Make the devices and the cables¶
- Make the objects that a device needs: a Location Type for devices, a Location, and a Role for devices.
- Add the manufacturer
Generic. - Add the Device Type
7220 IXR-D2Lwith the manufacturerNokia. - Add the Device Type
Linux serverwith the manufacturerGeneric. -
Make these three devices, each with the status Active and with the interfaces of the table.
Device Device Type Platform Interfaces srl17220 IXR-D2LNokia SR Linuxethernet-1/1,ethernet-1/2srl27220 IXR-D2LNokia SR Linuxethernet-1/1,ethernet-1/2linux1Linux server(none) eth1 -
Connect
srl1ethernet-1/1tosrl2ethernet-1/1with a cable. - Connect
srl1ethernet-1/2tolinux1eth1with a cable.
linux1 has no platform, so no node mapping matches it. The builder uses the
default mapping, the kind linux with the image alpine:latest.
Step 5: Make the lab¶
- Go to Containerlab > Labs. Add a lab.
- Enter the name
nbdocs-demo. Select the hostlocal-clab. - In "Devices", select
srl1,srl2, andlinux1. - Enter the management subnet
10.250.250.0/24. Use a subnet that no network on the host uses. - Click Create.
The lab page shows you as the owner, and the status Planned. See Make a lab.
Step 6: Find the job buttons¶
The app turns on each of its jobs when you install the app. So the lab page shows the buttons Build, Deploy, Destroy, and Inspect. See Start a lab job from the lab page.
If a button is not there, an administrator turned its job off, or you cannot run the job. See Who sees a button.
Step 7: Build the lab¶
- On the lab page, click Build. The run form of the job opens with the lab selected.
- Click Run Job Now.
- Wait until the job result shows that the job completed.
- The job log has a warning for
linux1eth1, because the default mapping has no interface table. The node useseth1. See Fallback names. - Open the lab page. The status is Built.
- Open the "Topology YAML" tab. It shows the three nodes, their management addresses from
10.250.250.2, and the two links. See Review and download the YAML. - Open the "Topology" tab. Each node is grey, "Not inspected". See View the topology graph.
A device of the lab can have a cable to a device that is not in the lab. The build then adds a stub node for that device. See Stub nodes.
Step 8: Deploy and inspect the lab¶
- On the lab page, click Deploy. Keep "Replace a lab that exists on the host" off.
- Click Run Job Now.
- Wait until the job completes. The lab status is Deployed.
- Open the lab page. Click Inspect. Then click Run Job Now.
- Open the lab page again. In the Nodes table, each node has the state
running. - Open the "Topology" tab. Each node is green, "Running".
See Deploy a lab and Inspect a lab.
Step 9: Destroy the lab¶
- On the lab page, click Destroy. Read the WARNING. Then confirm it.
- Click Run Job Now.
- Wait until the job completes.
- Open the lab page. The status is Destroyed, and the nodes have no state.
See Destroy a lab.
What are the next steps?¶
- Add a node mapping for each other device model. See Examples.
- Select the devices of a lab with a Dynamic Group or a device filter. See Select the devices.
- Give each node a startup config. See Startup configs.
- Schedule the Sync Labs job, so that each lab page shows the current node state. See Sync all labs.
You can check out the Use Cases section for more examples.