Skip to main content

Nautobot Auto Provisioner

Project description

Nautobot Auto Provisioner


An App for Nautobot.

Overview

Auto Provisioner is a Nautobot Plugin that enables you to push configurations to both new and existing devices. You can select a Git repository from Nautobot Git Repositories—currently supported with the backup or intended config repository managed by Golden Config—as the source for your configurations.

This project was inspired after the successful completion of #100DaysOfNautobot.

Auto Provisioner provides three core Nautobot Jobs, each tailored to a specific operational use case.

Auto Provisioner Jobs


Use Cases

[!IMPORTANT] For all use cases, it is assumed that Nautobot has IP connectivity with the target device being provisioned. Ensure devices are reachable before running any jobs.

[!TIP] When provisioning new devices, consider using technologies such as DMVPN, DHCP reservations, or similar solutions to establish initial connectivity with minimal configuration. Once basic reachability is in place, Auto Provisioner can handle the rest.

This plugin addresses the following use cases:

Use Case 1: Baseline Existing Device (from Backup)

Baseline Existing Device Job lets users push an entire configuration to a selected device to restore it to a known-good state. In dynamic environments where changes are made to support temporary operational needs, this job helps eliminate configuration drift by reverting the device to its last-known-good backup stored in the repo.

Baseline Existing Device

Use Case 2: Baseline Existing Device (from Intended)

The same job can also be used to push newly generated intended configurations. For example, if your organization rolls out a new security standard or feature update, you can use this job to apply those changes to the device using your intent-based templates from the intended config repository.

Use Case 3: Replace Existing Device

The Replace Existing Device Job is designed for situations where hardware must be replaced—whether due to failure, upgrade, or lifecycle refresh. This job retains all existing metadata in Nautobot (like role, location, IP, etc.) and applies it to the new device. It also allows for updates to attributes like device type and serial number, ensuring that your source of truth remains accurate.

Replace Existing Device

Use Case 4: Provision New Device

Provision New Device Job enables users to create and provision a completely new device in Nautobot. The job prompts for required metadata (like hostname, IP address, and interface), creates the device object, and then pushes the appropriate configuration from the selected repository.

Provision New Device


Installing the App in Nautobot

Prerequisites

  1. The app relies on nautobot-golden-config and its associated dependencies.
  2. It uses Golden Config's backup configs and intended configs as Git Repositories in Nautobot.
  3. For help configuring Git Repositories, refer to the Golden Config Documentation.

Install Guide

Auto Provisioner is Python package published in pypi.org/project/nautobot-auto-provisioner.

Standard Install (non-Docker)

Install using pip:

pip install nautobot-auto-provisioner

After installation, add the plugin to the PLUGINS list in your nautobot_config.py:

PLUGINS = ["nautobot_auto_provisioner"]

Restart the Nautobot service.

To ensure Nautobot Auto Provisioner is automatically reinstalled during upgrades, append nautobot-auto-provisioner to your instance's requirements.txt.

Docker Compose Install

Add the plugin to the project dependencies in pyproject.toml

poetry add nautobot-auto-provisioner

Regenerate and lock dependencies:

poetry lock
poetry install

Update the Docker image:

invoke build

Start Nautobot:

invoke start

Or if you prefer debug mode:

invoke debug

Be sure to update the PLUGINS list in your nautobot_config.py:

PLUGINS = ["nautobot_auto_provisioner"]

Future Updates

  1. Future versions will support user defined Git Repos to decouple from Golden Config's backup and intended configs for greater fexibility. This will allow users who already have a different proces for backups or generating intended configs.

  2. Wider support for credentials used to connect to devices. Currently, credentials are based on Nautobot's Secret Group but future iterations may support other methods.

Feedback

All feedbacks are welcome! This project began as part of a Nautobot learning journey and demonstrates key concepts like Nautobot Job creation, class-based approach, and plugin development. Open a topic under Discussion to share your ideas or ask questions.

Let's learn Nautobot together!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nautobot_auto_provisioner-1.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nautobot_auto_provisioner-1.1.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file nautobot_auto_provisioner-1.1.0.tar.gz.

File metadata

File hashes

Hashes for nautobot_auto_provisioner-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d7a02dc139ca33c40b499aa808e316a2fa13bdc39e9682053b137c8ce40ca2b4
MD5 5d2e34c79544d3ec9e3a105c116e013b
BLAKE2b-256 a415d801bd9a546ab2ec6449c6b264e18a13cb1138800232cfcd535d5868ed6a

See more details on using hashes here.

File details

Details for the file nautobot_auto_provisioner-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nautobot_auto_provisioner-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ddac2e4acac462edca866d7d8ab279b6b90a1d651440d14fbeaec4d25650b35f
MD5 a6289dfe0a3e2c4f98c0191d2dba7c34
BLAKE2b-256 ae847b95ac70c6b5676ca87ec699d51116300742431bbab3f02b748e51f34f49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page