Skip to content

Commit

Permalink
chore: Manual fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
snaselj committed Oct 20, 2023
1 parent 059b911 commit 8ce6d6f
Show file tree
Hide file tree
Showing 33 changed files with 897 additions and 246 deletions.
2 changes: 1 addition & 1 deletion .bandit.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
skips: []
skips: ["B113"]
# No need to check for security issues in the test scripts!
exclude_dirs:
- "./tests/"
Expand Down
2 changes: 1 addition & 1 deletion .cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"template_ref": "develop",
"cookie_dir": "",
"branch_prefix": "drift-manager",
"pull_request_strategy": "update-or-create",
"pull_request_strategy": "create",
"post_actions": [
"black"
],
Expand Down
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ exclude =
manage.py,
settings.py,
.venv
nautobot_ssot/integrations/servicenow/third_party
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Default owner(s) of all files in this repository
* @smith-ntc
* @nautobot/plugin-ssot
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ jobs:
- name: "Upload binaries to release"
uses: "svenstaro/upload-release-action@v2"
with:
repo_token: "${{ secrets.NTC_GITHUB_TOKEN }}" # use GH_NAUTOBOT_BOT_TOKEN for Nautobot Org repos.
repo_token: "${{ secrets.GH_NAUTOBOT_BOT_TOKEN }}"
file: "dist/*"
tag: "${{ github.ref }}"
overwrite: true
Expand Down
1 change: 1 addition & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ rules:
quote-type: "double"
ignore: |
.venv/
nautobot_ssot/integrations/aci/diffsync/device-types/
compose.yaml
130 changes: 104 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,4 @@
# Single Source of Truth

<!--
Developer Note - Remove Me!
The README will have certain links/images broken until the PR is merged into `develop`. Update the GitHub links with whichever branch you're using (main etc.) if different.
The logo of the project is a placeholder (docs/images/icon-nautobot-ssot.png) - please replace it with your app icon, making sure it's at least 200x200px and has a transparent background!
To avoid extra work and temporary links, make sure that publishing docs (or merging a PR) is done at the same time as setting up the docs site on RTD, then test everything.
-->
# Nautobot Single Source of Truth (SSoT)

<p align="center">
<img src="https://raw.githubusercontent.com/nautobot/nautobot-plugin-ssot/develop/docs/images/icon-nautobot-ssot.png" class="logo" height="200px">
Expand All @@ -21,41 +11,81 @@ To avoid extra work and temporary links, make sure that publishing docs (or merg
An <a href="https://www.networktocode.com/nautobot/apps/">App</a> for <a href="https://nautobot.com/">Nautobot</a>.
</p>


## Overview

> Developer Note: Add a long (2-3 paragraphs) description of what the App does, what problems it solves, what functionality it adds to Nautobot, what external systems it works with etc.
An app for [Nautobot](https://github.com/nautobot/nautobot). This Nautobot app facilitates integration and data synchronization between various "source of truth" (SoT) systems, with Nautobot acting as a central clearinghouse for data - a Single Source of Truth, if you will.

The Nautobot SSoT app builds atop the [DiffSync](https://github.com/networktocode/diffsync) Python library and Nautobot's Jobs feature. This enables the rapid development and integration of Jobs that can be run within Nautobot to pull data from other systems ("Data Sources") into Nautobot and/or push data from Nautobot into other systems ("Data Targets") as desired. Key features include the following:

* A dashboard UI lists all registered Data Sources and Data Targets and provides a summary of the synchronization history.
* The outcome of executing of a data synchronization Job is automatically saved to Nautobot's database for later review.
* Detailed logging output generated by DiffSync is automatically captured and saved to the database as well.

### Integrations

This Nautobot application framework includes the following integrations:

- Cisco ACI
- Arista CloudVision
- Device42
- Infoblox
- IPFabric
- ServiceNow

Read more about integrations [here](https://docs.nautobot.com/projects/ssot/en/latest/user/integrations). To enable and configure integrations follow the instructions from [the install guide](https://docs.nautobot.com/projects/ssot/en/latest/admin/install/#integrations-configuration).

### Screenshots

> Developer Note: Add any representative screenshots of the App in action. These images should also be added to the `docs/user/app_use_cases.md` section.
---

> Developer Note: Place the files in the `docs/images/` folder and link them using only full URLs from GitHub, for example: `![Overview](https://raw.githubusercontent.com/nautobot/nautobot-plugin-ssot/develop/docs/images/plugin-overview.png)`. This absolute static linking is required to ensure the README renders properly in GitHub, the docs site, and any other external sites like PyPI.
The dashboard view of the app.
![Dashboard View](https://raw.githubusercontent.com/nautobot/nautobot-plugin-ssot/develop/docs/images/dashboard_initial.png)

More screenshots can be found in the [Using the App](https://docs.nautobot.com/projects/ssot/en/latest/user/app_use_cases/) page in the documentation. Here's a quick overview of some of the plugin's added functionality:
---

![](https://raw.githubusercontent.com/nautobot/nautobot-plugin-ssot/develop/docs/images/placeholder.png)
The detailed view of the example data source that is prepackaged within this app.
![Data Source Detail View](https://raw.githubusercontent.com/nautobot/nautobot-plugin-ssot/develop/docs/images/data_source_detail.png)

## Try it out!
---

The detailed view of an executed sync.
![Sync Detail View](https://raw.githubusercontent.com/nautobot/nautobot-plugin-ssot/develop/docs/images/sync_detail.png)

---

> Developer Note: Only keep this section if appropriate. Update link to correct sandbox.
More screenshots can be found in the [Using the App](https://docs.nautobot.com/projects/ssot/en/latest/user/app_use_cases/) page in the documentation.

## Try it out!

This App is installed in the Nautobot Community Sandbox found over at [demo.nautobot.com](https://demo.nautobot.com/)!
This Nautobot app is installed in the Nautobot Community Sandbox found over at [demo.nautobot.com](https://demo.nautobot.com/)!

> For a full list of all the available always-on sandbox environments, head over to the main page on [networktocode.com](https://www.networktocode.com/nautobot/sandbox-environments/).
## Documentation

Full documentation for this App can be found over on the [Nautobot Docs](https://docs.nautobot.com) website:
Full documentation for this app can be found over on the [Nautobot Docs](https://docs.nautobot.com) website:

- [User Guide](https://docs.nautobot.com/projects/ssot/en/latest/user/app_overview/) - Overview, Using the App, Getting Started.
- [Administrator Guide](https://docs.nautobot.com/projects/ssot/en/latest/admin/install/) - How to Install, Configure, Upgrade, or Uninstall the App.
- [Developer Guide](https://docs.nautobot.com/projects/ssot/en/latest/dev/contributing/) - Extending the App, Code Reference, Contribution Guide.
- [Release Notes / Changelog](https://docs.nautobot.com/projects/ssot/en/latest/admin/release_notes/).
- [Frequently Asked Questions](https://docs.nautobot.com/projects/ssot/en/latest/user/faq/).
* [User Guide](https://docs.nautobot.com/projects/ssot/en/latest/user/app_overview/) - Overview, Using the App, Getting Started, Developing Jobs.
* [Administrator Guide](https://docs.nautobot.com/projects/ssot/en/latest/admin/install/) - How to Install, Configure, Upgrade, or Uninstall the App.
* [Developer Guide](https://docs.nautobot.com/projects/ssot/en/latest/dev/contributing/) - Extending the App, Code Reference, Contribution Guide.
* [Release Notes / Changelog](https://docs.nautobot.com/projects/ssot/en/latest/admin/release_notes/).

## Note On Integration Compatability

The SSoT framework includes a number of integrations with external Systems of Record:

* Cisco ACI
* Arista CloudVision
* Device42
* Infoblox
* ServiceNow

> Note that the Arista CloudVision integration is currently incompatible with the [Arista Labs](https://labs.arista.com/) environment due to a TLS issue. It has been confirmed to work in on-prem environments previously.
### Contributing to the Documentation

You can find all the Markdown source for the App documentation under the [`docs`](https://github.com/nautobot/nautobot-plugin-ssot//tree/develop/docs) folder in this repository. For simple edits, a Markdown capable editor is sufficient: clone the repository and edit away.
You can find all the Markdown source for the app documentation under the [`docs`](https://github.com/nautobot/nautobot-plugin-ssot/tree/develop/docs) folder in this repository. For simple edits, a Markdown capable editor is sufficient: clone the repository and edit away.

If you need to view the fully-generated documentation site, you can build it with [MkDocs](https://www.mkdocs.org/). A container hosting the documentation can be started using the `invoke` commands (details in the [Development Environment Guide](https://docs.nautobot.com/projects/ssot/en/latest/dev/dev_environment/#docker-development-environment)) on [http://localhost:8001](http://localhost:8001). Using this container, as your changes to the documentation are saved, they will be automatically rebuilt and any pages currently being viewed will be reloaded in your browser.

Expand All @@ -64,3 +94,51 @@ Any PRs with fixes or improvements are very welcome!
## Questions

For any questions or comments, please check the [FAQ](https://docs.nautobot.com/projects/ssot/en/latest/user/faq/) first. Feel free to also swing by the [Network to Code Slack](https://networktocode.slack.com/) (channel `#nautobot`), sign up [here](http://slack.networktocode.com/) if you don't have an account.

## Acknowledgements

This project includes code originally written in separate Nautobot apps, which have been merged into this project:

- [nautobot-plugin-ssot-aci](https://github.com/nautobot/nautobot-plugin-ssot-aci):
Thanks
[@chadell](https://github.com/chadell),
[@dnewood](https://github.com/dnewood),
[@progala](https://github.com/progala),
[@ubajze](https://github.com/ubajze)
- [nautobot-plugin-ssot-arista-cloudvision](https://github.com/nautobot/nautobot-plugin-ssot-arista-cloudvision):
Thanks
[@burnyd](https://github.com/burnyd),
[@chipn](https://github.com/chipn),
[@jdrew82](https://github.com/jdrew82),
[@jvanderaa](https://github.com/jvanderaa),
[@nniehoff](https://github.com/nniehoff),
[@qduk](https://github.com/qduk),
[@ubajze](https://github.com/ubajze)
- [nautobot-plugin-ssot-infoblox](https://github.com/nautobot/nautobot-plugin-ssot-infoblox):
Thanks
[@FragmentedPacket](https://github.com/FragmentedPacket),
[@chadell](https://github.com/chadell),
[@jdrew82](https://github.com/jdrew82),
[@jtdub](https://github.com/jtdub),
[@pke11y](https://github.com/pke11y),
[@smk4664](https://github.com/smk4664),
[@ubajze](https://github.com/ubajze)
[@whitej6](https://github.com/whitej6),
- [nautobot-plugin-ssot-ipfabric](https://github.com/nautobot/nautobot-plugin-ssot-ipfabric):
Thanks
[@FragmentedPacket](https://github.com/FragmentedPacket),
[@armartirosyan](https://github.com/armartirosyan),
[@chadell](https://github.com/chadell),
[@grelleum](https://github.com/grelleum),
[@h4ndzdatm0ld](https://github.com/h4ndzdatm0ld),
[@jdrew82](https://github.com/jdrew82),
[@justinjeffery-ipf](https://github.com/justinjeffery-ipf),
[@pke11y](https://github.com/pke11y),
[@ubajze](https://github.com/ubajze)
[@whitej6](https://github.com/whitej6),
- [nautobot-plugin-ssot-servicenow](https://github.com/nautobot/nautobot-plugin-ssot-servicenow):
Thanks
[@chadell](https://github.com/chadell),
[@glennmatthews](https://github.com/glennmatthews),
[@qduk](https://github.com/qduk),
[@ubajze](https://github.com/ubajze)
4 changes: 2 additions & 2 deletions development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ RUN pip show nautobot | grep "^Version: " | sed -e 's/Version: /nautobot==/' > c
#
# We can't use the entire freeze as it takes forever to resolve with rigidly fixed non-direct dependencies,
# especially those that are only direct to Nautobot but the container included versions slightly mismatch
RUN poetry export -f requirements.txt --without-hashes --output poetry_freeze_base.txt
RUN poetry export -f requirements.txt --with dev --without-hashes --output poetry_freeze_all.txt
RUN poetry export -f requirements.txt --without-hashes --extras all --output poetry_freeze_base.txt
RUN poetry export -f requirements.txt --without-hashes --extras all --with dev --output poetry_freeze_all.txt
RUN sort poetry_freeze_base.txt poetry_freeze_all.txt | uniq -u > poetry_freeze_dev.txt

# Install all local project as editable, constrained on Nautobot version, to get any additional
Expand Down
21 changes: 21 additions & 0 deletions development/creds.example.env
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,24 @@ MYSQL_PASSWORD=${NAUTOBOT_DB_PASSWORD}
# NAUTOBOT_DB_HOST=localhost
# NAUTOBOT_REDIS_HOST=localhost
# NAUTOBOT_CONFIG=development/nautobot_config.py

NAUTOBOT_ARISTACV_CVP_PASSWORD="changeme"
NAUTOBOT_ARISTACV_CVP_TOKEN="changeme"

NAUTOBOT_SSOT_INFOBLOX_PASSWORD="changeme"

# ACI Credentials. Append friendly name to the end to identify each APIC.
NAUTOBOT_APIC_BASE_URI_NTC=https://aci.cloud.networktocode.com
NAUTOBOT_APIC_USERNAME_NTC=admin
NAUTOBOT_APIC_PASSWORD_NTC=super_secret_password
NAUTOBOT_APIC_VERIFY_NTC=False
# NAUTOBOT_APIC_SITE_NTC="NTC ACI"
NAUTOBOT_APIC_BASE_URI_DEVNET=https://sandboxapicdc.cisco.com
NAUTOBOT_APIC_USERNAME_DEVNET=admin
NAUTOBOT_APIC_PASSWORD_DEVNET=super_secret_password
NAUTOBOT_APIC_VERIFY_DEVNET=False
# NAUTOBOT_APIC_SITE_DEVNET="DevNet Sandbox"

SERVICENOW_PASSWORD="changeme"

IPFABRIC_API_TOKEN=secrettoken
59 changes: 59 additions & 0 deletions development/development.env
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,62 @@ POSTGRES_DB=${NAUTOBOT_DB_NAME}
MYSQL_USER=${NAUTOBOT_DB_USER}
MYSQL_DATABASE=${NAUTOBOT_DB_NAME}
MYSQL_ROOT_HOST=%

NAUTOBOT_HOST="http://nautobot:8080"

NAUTOBOT_CELERY_TASK_SOFT_TIME_LIMIT=7200
NAUTOBOT_CELERY_TASK_TIME_LIMIT=7200

NAUTOBOT_SSOT_HIDE_EXAMPLE_JOBS="False"
NAUTOBOT_SSOT_ALLOW_CONFLICTING_APPS="False"

NAUTOBOT_SSOT_ENABLE_ACI="True"
NAUTOBOT_SSOT_ACI_TAG="ACI"
NAUTOBOT_SSOT_ACI_TAG_COLOR="0047AB"
NAUTOBOT_SSOT_ACI_TAG_UP="UP"
NAUTOBOT_SSOT_ACI_TAG_UP_COLOR="008000"
NAUTOBOT_SSOT_ACI_TAG_DOWN="DOWN"
NAUTOBOT_SSOT_ACI_TAG_DOWN_COLOR="FF3333"
NAUTOBOT_SSOT_ACI_MANUFACTURER_NAME="Cisco"
NAUTOBOT_SSOT_ACI_IGNORE_TENANTS="[mgmt,infra]"
NAUTOBOT_SSOT_ACI_COMMENTS="Created by ACI SSoT Integration"
NAUTOBOT_SSOT_ACI_SITE="Data Center"

NAUTOBOT_SSOT_ENABLE_ARISTACV="True"
NAUTOBOT_ARISTACV_CONTROLLER_SITE=""
NAUTOBOT_ARISTACV_CREATE_CONTROLLER="True"
NAUTOBOT_ARISTACV_CVAAS_URL="www.arista.io:443"
NAUTOBOT_ARISTACV_CVP_HOST=""
NAUTOBOT_ARISTACV_CVP_PORT="443"
NAUTOBOT_ARISTACV_CVP_USERNAME="changeme"
NAUTOBOT_ARISTACV_DELETE_ON_SYNC="False"
NAUTOBOT_ARISTACV_IMPORT_ACTIVE="False"
NAUTOBOT_ARISTACV_IMPORT_TAG="False"
NAUTOBOT_ARISTACV_VERIFY=True

NAUTOBOT_SSOT_ENABLE_DEVICE42="True"
NAUTOBOT_SSOT_DEVICE42_HOST=""
NAUTOBOT_SSOT_DEVICE42_USERNAME=""
NAUTOBOT_SSOT_DEVICE42_PASSWORD=""

NAUTOBOT_SSOT_ENABLE_INFOBLOX="True"
NAUTOBOT_SSOT_INFOBLOX_DEFAULT_STATUS="Active"
NAUTOBOT_SSOT_INFOBLOX_ENABLE_SYNC_TO_INFOBLOX="True"
NAUTOBOT_SSOT_INFOBLOX_IMPORT_OBJECTS_IP_ADDRESSES="True"
NAUTOBOT_SSOT_INFOBLOX_IMPORT_OBJECTS_SUBNETS="True"
NAUTOBOT_SSOT_INFOBLOX_IMPORT_OBJECTS_VLANS="True"
NAUTOBOT_SSOT_INFOBLOX_IMPORT_OBJECTS_VLAN_VIEWS="True"
NAUTOBOT_SSOT_INFOBLOX_IMPORT_SUBNETS="10.46.128.0/18,192.168.1.0/24"
NAUTOBOT_SSOT_INFOBLOX_URL="https://infoblox.example.com"
NAUTOBOT_SSOT_INFOBLOX_USERNAME="changeme"
NAUTOBOT_SSOT_INFOBLOX_VERIFY_SSL="True"
# NAUTOBOT_SSOT_INFOBLOX_WAPI_VERSION=""

NAUTOBOT_SSOT_ENABLE_SERVICENOW="True"
SERVICENOW_INSTANCE=""
SERVICENOW_USERNAME=""

NAUTOBOT_SSOT_ENABLE_IPFABRIC="True"
IPFABRIC_HOST="https://ipfabric.example.com"
IPFABRIC_SSL_VERIFY="True"
IPFABRIC_TIMEOUT=15
Loading

0 comments on commit 8ce6d6f

Please sign in to comment.