Skip to content

Week 7 recap

Nautobot Deployment Training

  • Nautobot Components
    • Load Balancer implements the SSL termination (with certificates), serves static content, and implements load balancing.
    • WSGI connects the web application with a web server.
    • Nautobot Web App is a Django based project that offers an entrypoint to a SQL database and some extra features.
    • Relational Database: Persists data.
    • Task Queuing offers a multi tenant system to register tasks to be picked by workers when available. It helps to decouple request and task delivery.
    • Nautobot Worker App is the same Nautobot Django application that is reading from the Task Queuing to pick jobs and executed them asynchronous.
  • Nautobot Worker is provided on Celery
  • Nautobot scheduler is provided by Celery-Beat
  • Celery pulls the task off the "queue", the queue is the redis database
    • Redis can have multiple queues
    • Jobs can be assigned to multiple queues
  • Nautobot Supports the following Relational Databases
    • MySQL
    • Postgres
    • Dolt
  • Dolt is a newer database based on MySQL that provides Git semantics on a relational database.
  • Redis supplies
    • Cache (though it is no longer being used as of 2.0)
    • Job Queuing
    • Key value or in-memory store, used for SSoT jobs and similar
  • Redis HA technologies we support
    • Redis Sentinel
    • Redis Cluster
  • Monitoring and Troubleshooting options
    • Metrics
    • Logging
    • Django Shell
  • Common environments
    • Local development
    • Development
    • Integration / Pre-prod
    • Production

Nautobot Apps Allows you to

  • Create custom Django models
    • Define new database tables
    • Generate and run SQL database migrations
      • Provide custom “pages” within the UI
    • Implement custom business logic
    • Use Django Template Language(DTL) or Jinja2 to render templates
    • Register custom URLs under the /plugins path
  • Inject custom content within certain stock views
    • Embed custom content/buttons in prescribed locations within core object views
      • left_page
      • right_page
      • full_page
    • Add REST API endpoints
    • Provide full CRUD support for your plugin’s models
    • Provide Jobs
    • Leverage the complete Python environment and Django ORM

Nautobot Apps Do not allow you to

  • Modify Core Models
  • Register URLs outside the /plugins URL
  • Override core templates
  • Modify core settings
  • Disable core components

To Enable a Nautobot Application

  • Install package, e.g. pip install nautobot-golden-config
  • Updated `nautobot_config.py
    • Add to PLUGINS
    • Update configs in PLUGINS_CONFIG

Application - Data Validation

  • Supported rule types include:
    • Regular expression
    • Min/max value
    • Required fields
    • Unique values
  • Built on Nautobot Validations

Application - Device Lifecycle

  • Software
    • How many software versions do we have?
    • What software version is currently installed on my devices?
    • What is the recommended/approved OS version for our campus switches?
    • How can we automate software upgrades?
    • How can we generate reporting of the OS version compliance?
  • Hardware
    • Do we have a maintenance contract for our core switches?
    • Is the hardware we use for our edge devices still supported?
    • How do we manage End Of Life and End Of Support notices on a large estate?
    • Can we automate the RMA process for the failed equipment?
    • How can we plan for the hardware refresh?
  • Contracts
    • What contracts, hardware and software, do we have in place?
    • What hardware is covered by contracts?
    • Are any contracts up for renewal?
    • Who owns the contract, what are the points of contact?
    • What vendors provide each of the contracts?
    • How much does it cost?

Application - Chatops

  • Multi-platform chatbot that supports
    • Slack
    • MS Teams
    • Webex Teams
    • Mattermost
  • Comes pre-built with commands to easily fetch data from Nautobot
  • Enable other teams to easily verify interface connections, inventory, racks, circuits, or any other piece of Nautobot of data from chat
  • Easily add new chat commands
  • Reduces the amount of change tickets opened providing self-service to read-only data

Capacity Metrics

  • Exposes key data in Nautobot as Prometheus endpoints to be later consumed and visualized in tools like Grafana
  • Exposes key data stored in Nautobot as a Prometheus HTTP endpoint so the data can be easily scraped, collected, stored, and visualized
  • Exposing this data and visualizing it in a tool like Grafana.

Circuit Maintenance

  • Every network is built on top of myriad of circuits
  • Every circuit will have periodic maintenance during its lifecycle
  • Improperly handled circuit maintenance could impact your operations and, eventually, your business

Program Interface

  • Web UI - Primary interface for human interaction - form based workflows.
    • https://////
    • https:///dcim/sites/lax Nautobot Application Programming Interfaces 98
  • Python SDK, pynautobot: https://pynautobot.readthedocs.io/en/latest/#
  • API clients: Postman, curl, Python requests etc.
    • Interactive REST API documentation built into Nautobot (/api/docs/)
    • Interactive GraphQL client built into Nautobot (/graphql/)
  • Ansible module: nautobot-ansible
    • Modules - e.g. nautobot_device, nautobot_interface, nautobot_prefix
  • Python shell (admin/dev only!)
    • On-box Interactive shell pre-loaded with Nautobot models.
    • Direct and unrestricted access to the database, generally used for development.

Graphql

  • Hierarchical
    • Query is shaped like the response data
  • GraphQL is read-only
  • Client specified queries
    • Declarative data fetching
  • Application-Layer
    • Most commonly uses HTTP
    • Transport independent
    • String interpreted by server
  • Strongly-Typed
    • Tools can validate syntax
  • Introspective
    • Clients can query GraphQL server to understand the available type system

Django ORM

  • Mapping to database
    • Class (model): Database table
    • Attribute (field): Database column
    • Instance: Database row
  • Migrations are based on the Models
  • Migrations are based on Models definitions
  • Django ORM Three components
    • Model (class) - Database table representation
    • Manager - QuerySet generator (typically “objects”)
    • Method(s) - SQL operation wrapper; can be chained
  • Django provides many stock field lookups to tweak filtering
  • Lookups are specified by concatenating the field name with a double underscore (“dunder”) and the lookup name