Integrate your Containerlab topology seamlessly with EDA (Event-Driven Automation) to streamline network automation and management.
There are two primary methods to create and experiment with network functions provided by EDA:
- Real Hardware: Offers robust and reliable performance but can be challenging to acquire and maintain, especially for large-scale setups.
- Sandbox System: Highly flexible and cost-effective but limited in adding secondary containers like authentication servers or establishing external connectivity.
Containerlab bridges these gaps by providing an elegant solution for network emulation using container-based topologies. This tool enhances your Containerlab experience by automating the onboarding process into EDA, ensuring a smooth and efficient integration.
Important
EDA Installation Mode: This tool requires EDA to be installed with Simulate=False
. Ensure that your EDA deployment is configured accordingly.
Hardware License: A valid hardware license
for EDA version 24.12.1 is mandatory for using this connector tool.
Containerlab Topologies: Your Containerlab nodes should NOT have startup-configs defined. Nodes with startup-configs are not EDA-ready and will not integrate properly.
Before running the Containerlab EDA Connector tool, ensure the following prerequisites are met:
- EDA Setup:
- Installed without simulation (
Simulate=False
). - Contains a valid
hardware license
for version 24.12.1.
- Installed without simulation (
- Network Connectivity:
- EDA nodes can ping the Containerlab's management IP.
- Containerlab:
- Minimum required version -
v0.62.2
- Nodes should not have startup-configs defined
- Minimum required version -
- kubectl:
- You must have
kubectl
installed and configured to connect to the same Kubernetes cluster that is running EDA. The connector will usekubectl apply
in the background to create the necessaryArtifact
resources.
- You must have
Note
Proxy Settings: This tool does utilize the system's proxy ($HTTP_PROXY
and $HTTPS_PROXY
) variables.
Follow these steps to set up the Containerlab EDA Connector tool:
Tip
Why uv?
uv is a single, ultra-fast tool that can replace pip
, pipx
, virtualenv
, pip-tools
, poetry
, and more. It automatically manages Python versions, handles ephemeral or persistent virtual environments (uv venv
), lockfiles, and often runs 10–100× faster than pip installs.
-
Install uv (no Python needed):
# On Linux and macOS curl -LsSf https://astral.sh/uv/install.sh | sh
-
Install clab-connector
uv tool install git+https://github.com/eda-labs/clab-connector.git
-
Run the Connector
clab-connector --help
Tip
Upgrade clab-connector to the latest version using uv tool upgrade clab-connector
.
To check the currently installed version of clab-connector:
uv tool list
To upgrade clab-connector to the latest version:
uv tool upgrade clab-connector
If you'd rather use pip or can't install uv:
-
Create & Activate a Virtual Environment after cloning:
python -m venv venv source venv/bin/activate
-
Install Your Project (which reads
pyproject.toml
for dependencies):pip install .
-
Run the Connector:
clab-connector --help
The tool offers two primary subcommands: integrate
and remove
.
To integrate your Containerlab topology with EDA you need the path to the
topology-data.json
file created by Containerlab when it deploys the lab. This
file resides in the Containerlab Lab Directory as described in the
documentation. Once you have
the path, run the following command:
clab-connector integrate \
--topology-data path/to/topology-data.json \
--eda-url https://eda.example.com \
--eda-user youruser \
--eda-password yourpassword
Option | Required | Default | Description |
---|---|---|---|
--topology-data , -t |
Yes | None | Path to the Containerlab topology data JSON file |
--eda-url , -e |
Yes | None | EDA deployment hostname or IP address |
--eda-user |
No | admin | EDA username |
--eda-password |
No | admin | EDA password |
--kc-user |
No | admin | Keycloak master realm admin user |
--kc-password |
No | admin | Keycloak master realm admin password |
--kc-secret |
No | None | Use given EDA client secret and skip Keycloak flow |
--log-level , -l |
No | INFO | Logging level (DEBUG/INFO/WARNING/ERROR/CRITICAL) |
--log-file , -f |
No | None | Optional log file path |
--verify |
No | False | Enable certificate verification for EDA |
--skip-edge-intfs |
No | False | Skip creation of edge links and their interfaces |
Note
When SR Linux and SR OS nodes are onboarded, the connector creates the admin
user with default passwords of NokiaSrl1!
for SR Linux and NokiaSros1!
for SROS.
Remove the previously integrated Containerlab topology from EDA:
clab-connector remove \
--topology-data path/to/topology-data.json \
--eda-url https://eda.example.com \
--eda-user youruser \
--eda-password yourpassword
Option | Required | Default | Description |
---|---|---|---|
--topology-data , -t |
Yes | None | Path to the Containerlab topology data JSON file |
--eda-url , -e |
Yes | None | EDA deployment hostname or IP address |
--eda-user |
No | admin | EDA username |
--eda-password |
No | admin | EDA password |
--kc-user |
No | admin | Keycloak master realm admin user |
--kc-password |
No | admin | Keycloak master realm admin password |
--kc-secret |
No | None | Use given EDA client secret and skip Keycloak flow |
--log-level , -l |
No | INFO | Logging level (DEBUG/INFO/WARNING/ERROR/CRITICAL) |
--log-file , -f |
No | None | Optional log file path |
--verify |
No | False | Enable certificate verification for EDA |
clab-connector export-lab \
--namespace eda
Option | Required | Default | Description |
---|---|---|---|
--namespace , -n |
Yes | None | Namespace in which the lab is deployed in EDA |
--output , -o |
No | None | Output .clab.yaml file path |
--log-level , -l |
No | INFO | Logging level (DEBUG/INFO/WARNING/ERROR/CRITICAL) |
--log-file |
No | None | Optional log file path |
The generate-crs
command allows you to generate all the CR YAML manifests that would be applied to EDA—grouped by category. By default all manifests are concatenated into a single file. If you use the --separate flag, the manifests are written into separate files per category (e.g. artifacts.yaml
, init.yaml
, node-security-profile.yaml
, etc.).
You can also use --skip-edge-intfs
to omit edge link resources and their interfaces.
clab-connector generate-crs \
--topology-data path/to/topology-data.json \
--output all-crs.yaml
clab-connector generate-crs \
--topology-data path/to/topology-data.json \
--separate \
--output manifests
Option | Required | Default | Description |
---|---|---|---|
--topology-data , -t |
Yes | None | Path to the Containerlab topology data JSON file |
--output , -o |
No | None | Output file path or directory |
--separate |
No | False | Generate separate YAML files for each CR |
--log-level , -l |
No | INFO | Logging level (DEBUG/INFO/WARNING/ERROR/CRITICAL) |
--log-file , -f |
No | None | Optional log file path |
--skip-edge-intfs |
No | False | Skip creation of edge links and their interfaces |
clab-connector -l INFO integrate -t topology-data.json -e https://eda.example.com
Explore the example-topologies directory for sample Containerlab topology files to get started quickly.
If you encounter issues or have questions, please reach out through the following channels:
- GitHub Issues: Create an issue on GitHub.
- Discord: Join our Discord community
Tip
Running the script with -l INFO
or -l DEBUG
flags can provide additional insights into any failures or issues.
Contributions are welcome! Please fork the repository and submit a pull request with your enhancements.
- Containerlab for providing an excellent network emulation platform.
- EDA (Event-Driven Automation) for the robust automation capabilities.