Skip to content

Installing the App in Nautobot

Here you will find detailed instructions on how to install and configure the App within your Nautobot environment.

Prerequisites

  • The app is compatible with Nautobot 3.0.0 and higher.
  • Database backend: PostgreSQL (standard Nautobot production backend).

Note

Please check the dedicated page for a full compatibility matrix and the deprecation policy.

Access Requirements

  • SSH connectivity from Nautobot workers to your containerlab host.
  • Optional access to configured Git repositories when using Golden Config intended config workflows.

Install Guide

Note

Apps can be installed from the Python Package Index or locally. See the Nautobot documentation for more details. The pip package name for this app is nautobot-app-digital-twin.

The app is available as a Python package via PyPI and can be installed with pip:

pip install nautobot-app-digital-twin

To ensure Nautobot Digital Twin is automatically re-installed during future upgrades, create a file named local_requirements.txt (if not already existing) in the Nautobot root directory (alongside requirements.txt) and list the nautobot-app-digital-twin package:

echo nautobot-app-digital-twin >> local_requirements.txt

Once installed, the app needs to be enabled in your Nautobot configuration. The following block of code below shows the additional configuration required to be added to your nautobot_config.py file:

  • Append "nautobot_digital_twin" to the PLUGINS list.
  • Append the "nautobot_digital_twin" dictionary to the PLUGINS_CONFIG dictionary and override any defaults.
# In your nautobot_config.py
PLUGINS = ["nautobot_digital_twin"]

# PLUGINS_CONFIG = {
#   "nautobot_digital_twin": {
#     ADD YOUR SETTINGS HERE
#   }
# }

Once the Nautobot configuration is updated, run the Post Upgrade command (nautobot-server post_upgrade) to run migrations and clear any cache:

nautobot-server post_upgrade

Then restart (if necessary) the Nautobot services which may include:

  • Nautobot
  • Nautobot Workers
  • Nautobot Scheduler
sudo systemctl restart nautobot nautobot-worker nautobot-scheduler

Job Buttons (Start/Stop Digital Twin on Location)

To have Start Digital Twin and Stop Digital Twin buttons appear on Location detail pages (and under Jobs → Job Buttons), run after post_upgrade:

nautobot-server ensure_digital_twin_job_buttons

Then open Jobs → Job Buttons to confirm; enable Start Digital Twin (Job Button) and Stop Digital Twin (Job Button) under Jobs → Jobs if they are not already enabled.

App Configuration

Configure the app under PLUGINS_CONFIG["nautobot_digital_twin"] in nautobot_config.py.

Common settings:

  • BACKEND: containerlab (required; only supported value).
  • LOCATION_TYPE_NAME: Location type for Start/Stop Digital Twin job buttons.
  • CONTAINERLAB_SSH_HOST, CONTAINERLAB_SSH_PORT, CONTAINERLAB_SSH_USER, CONTAINERLAB_SSH_PASSWORD.
  • CONTAINERLAB_SSH_CREDENTIALS_SECRETS_GROUP: optional Secrets Group override for containerlab credentials.
  • CONTAINERLAB_PLATFORM_MAP: map Nautobot platforms to containerlab node definitions.
  • REMOVE_CONFIG_LINES, REPLACE_CONFIG_PATTERNS, and PLATFORM_ADD_CONFIG_LINES: intended config transformation rules.
  • DIGITAL_TWIN_AUTO_DESTROY_MINUTES: lab auto-destroy timeout.

For a complete and current list, see the project README.md and the in-code default settings in nautobot_digital_twin/__init__.py.