A plugin for configuration on nautobot
Project description
nautobot-golden-config
A plugin for Nautobot that intends to provide context around golden configuration.
Introduction
What is the Golden Configuration Plugin?
The golden configuration plugin is a Nautobot plugin that aims to solve common configuration management challenges.
Key Use Cases
This plugin enable four (4) key use cases.
- Configuration Backups - Is a Nornir process to connect to devices, optionally parse out lines/secrets, backup the configuration, and save to a Git repository.
- Intended Configuration - Is a Nornir process to generate configuration based on a Git repo of Jinja files to combine with a GraphQL generated data and a Git repo to store the intended configuration.
- Source of Truth Aggregation - Is a GraphQL query per device that creates a data structure used in the generation of configuration.
- Configuration Compliance - Is a process to run comparison of the actual (via backups) and intended (via Jinja file creation) CLI configurations upon saving the actual and intended configuration. This is started by either a Nornir process for cli-like configurations or calling the API for json-like configurations
Notice: The operator's of their own Nautobot instance are welcome to use any combination of these features. Though the appearance may seem like they are tightly coupled, this isn't actually the case. For example, one can obtain backup configurations from their current RANCID/Oxidized process and simply provide a Git Repo of the location of the backup configurations, and the compliance process would work the same way. Also, another user may only want to generate configurations, but not want to use other features, which is perfectly fine to do so.
Documentation
- Installation
- Quick Start Guide
- Navigating Overview
- Navigating Backup
- Navigating Intended
- Navigating SoTAgg
- Navigating Compliance
- Navigating JSON Compliance
- Navigating Custom Compliance
- FAQ
- Upgrade Notes
Screenshots
There are many features and capabilities the plugin provides into the Nautobot ecosystem. The following screenshots are intended to provide a quick visual overview of some of these features.
The golden configuration is driven by jobs that run a series of tasks and the result is captured in this overview.
The compliance report provides a high-level overview on the compliance of your network.
The compliance overview will provide a per device and feature overview on the compliance of your network devices.
Drilling into a specific device and feature, you can get an immediate detailed understanding of your device.
Contributing
Pull requests are welcomed and automatically built and tested against multiple versions of Python and Nautobot through TravisCI.
The project is packaged with a light development environment based on docker-compose
to help with the local development of the project and to run tests within TravisCI.
The project is following Network to Code software development guidelines and are leveraging the following:
- Black, Pylint, Bandit, flake8, and pydocstyle for Python linting and formatting.
- Django unit test to ensure the plugin is working properly.
Branching Policy
The branching policy includes the following tenets:
- The develop branch is the branch of the next major and minor paired version planned.
- The
stable-<major>.<minor>
branch is the branch of the latest version within that major/minor version. - The
stable-<major>.<minor>
branch will have all of the latest bug fixes and security patches, and may or may not represent the released version. - PRs intended to add new features should be sourced from the develop branch.
- PRs intended to add new features that break backward compatability should be discussed before a PR is created.
- PRs intended to address bug fixes and security patches should be sourced from
stable-<major>.<minor>
.
Nautobot Golden Config will observe semantic versioning, as of 1.0. This may result in an quick turn around in minor versions to keep pace with an ever growing feature set.
Release Policy
Nautobot Golden Config has currently no intended scheduled release schedule, and will release new feature in minor versions.
When a new release of any kind (e.g. from develop to main, or a release of a stable-<major>.<minor>
) is created the following should happen.
- A release PR is created with:
- Update to the CHANGELOG.md file to reflect the changes.
- Change the version from
<major>.<minor>.<patch>-beta
to<major>.<minor>.<patch>
in both pyproject.toml andnautobot.__init__.__version__
. - Set the PR to the proper branch, e.g. either
main
orstable-<major>.<minor>
.
- Ensure the tests for the PR pass.
- Merge the PR.
- Create a new tag:
- The tag should be in the form of
v<major>.<minor>.<patch>
. - The title should be in the form of
v<major>.<minor>.<patch>
. - The description should be the changes that were added to the CHANGELOG.md document.
- The tag should be in the form of
- If merged into main, then push from main to develop, in order to retain the merge commit created when the PR was merged
- If the is a new
<major>.<minor>
, create astable-<major>.<minor>
branch and push that to the repo. - A post release PR is created with.
- Change the version from
<major>.<minor>.<patch>
to<major>.<minor>.<patch + 1>-beta
in both pyproject.toml andnautobot.__init__.__version__
. - Set the PR to the proper branch, e.g. either
develop
orstable-<major>.<minor>
. - Once tests pass, merge.
- Change the version from
Deprecation Policy
Support of upstream Nautobot will be announced 1 minor or major version ahead. Deprecation policy will be announced within the
CHANGELOG.md file, and updated in the table below. There will be a stable-<major>.<minor>
branch that will be minimally maintained,
for any security enhancements or major bugs will be supported for a limited time.
Golden Config Version | Nautobot First Support Version | Nautobot Last Support Version |
---|---|---|
0.9.X | 1.0.0 | 1.2.99 [Official] |
0.10.X | 1.0.0 | 1.2.99 [Official] |
1.0.X | 1.2.0 | 1.3.99 [Official] |
CLI Helper Commands
The project features a CLI helper based on invoke to help setup the development environment. The commands are listed below in 3 categories:
dev environment
utility
testing
.
Each command can be executed with invoke <command>
. All commands support the arguments --nautobot-ver
and --python-ver
if you want to manually define the version of Python and Nautobot to use. Each command also has its own help invoke <command> --help
Note: to run the mysql (mariadb) development environment, set the environment variable as such
export NAUTOBOT_USE_MYSQL=1
.
Local Development Environment
build Build all docker images.
debug Start Nautobot and its dependencies in debug mode.
destroy Destroy all containers and volumes.
restart Restart Nautobot and its dependencies in detached mode.
start Start Nautobot and its dependencies in detached mode.
stop Stop Nautobot and its dependencies.
Utility
cli Launch a bash shell inside the running Nautobot container.
create-user Create a new user in django (default: admin), will prompt for password.
makemigrations Run Make Migration in Django.
nbshell Launch a nbshell session.
Testing
bandit Run bandit to validate basic static code security analysis.
black Run black to check that Python files adhere to its style standards.
flake8 Run flake8 to check that Python files adhere to its style standards.
pydocstyle Run pydocstyle to validate docstring formatting adheres to NTC defined standards.
pylint Run pylint code analysis.
tests Run all tests for this plugin.
unittest Run Django unit tests for the plugin.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for nautobot-golden-config-1.0.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0aacb6bb687ccf3618cba1a625458a8b285c498b11aba4e30231520f81a9336 |
|
MD5 | 5d072861d041985a2dc127d6b3c617a4 |
|
BLAKE2b-256 | d0568a054a492694bdff318dfc49683ba5c637f70b61e28a8500ba9f5484ea0e |
Hashes for nautobot_golden_config-1.0.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed3fbc5865954bd852a0bd369a5a3fd7d3b3e6f4357348513697ea61d7757734 |
|
MD5 | 04a6c590254b42dd841ce6126798b24c |
|
BLAKE2b-256 | c344eb60185422401eda1e8293a7e68cd696cdb876dd7f9b1111817231aa2332 |