From b11a538316d79ce7339c1a0ef30a99ea7368f3de Mon Sep 17 00:00:00 2001 From: Dan Ankers Date: Thu, 2 Nov 2023 19:57:04 +0000 Subject: [PATCH] Initial 1.6.2 with Golden Config plugin --- Dockerfile | 3 +++ nautobot_config.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 Dockerfile create mode 100644 nautobot_config.py diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f9ec1cf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM networktocode/nautobot:1.6.2 +RUN pip install nautobot-golden-config==1.5.0 --progress-bar off +COPY nautobot_config.py /opt/nautobot/nautobot_config.py diff --git a/nautobot_config.py b/nautobot_config.py new file mode 100644 index 0000000..48b02b5 --- /dev/null +++ b/nautobot_config.py @@ -0,0 +1,48 @@ +mport os +import sys +from nautobot.core.settings_funcs import is_truthy, parse_redis_connection +ALLOWED_HOSTS = ['*'] +DATABASES = { + "default": { + "ENGINE": os.getenv( + "NAUTOBOT_DB_ENGINE", + "django_prometheus.db.backends.postgresql" if METRICS_ENABLED else "django.db.backends.postgresql", + } +} +if DATABASES["default"]["ENGINE"] == "django.db.backends.mysql": + DATABASES["default"]["OPTIONS"] = {"charset": "utf8mb4"} +SECRET_KEY = os.getenv("NAUTOBOT_SECRET_KEY", "s1pzbv&c3_-k74_oa&vu=s55%zup2xd@7*$s!mza31wmj2$m_4") +INSTALLATION_METRICS_ENABLED = is_truthy(os.getenv("NAUTOBOT_INSTALLATION_METRICS_ENABLED", "True")) +PLUGINS = ['nautobot_evpn','nautobot_plugin_nornir', 'nautobot_golden_config'] +PLUGINS_CONFIG = { + "nautobot_plugin_nornir": { + "nornir_settings": { + "credentials": "nautobot_plugin_nornir.plugins.credentials.env_vars.CredentialsEnvVars", + "runner": { + "plugin": "threaded", + "options": { + "num_workers": 20, + }, + }, + }, + }, + "nautobot_golden_config": { + "per_feature_bar_width": 0.15, + "per_feature_width": 13, + "per_feature_height": 4, + "enable_backup": False, + "enable_compliance": False, + "enable_intended": True, + "enable_sotagg": True, + "sot_agg_transposer": None, + "enable_postprocessing": False, + "postprocessing_callables": [], + "postprocessing_subscribed": [], + "platform_slug_map": None, + "jinja_env": { + "trim_blocks": True, + "lstrip_blocks": False, + }, + }, +} +