Update Your Ansible Nautobot Environment & Helm Chart

Blog Detail

With the release of Nautobot 2.1.9 and 1.6.16 came new requirements for pynautobot to include an authentication token that for some initial calls that were not previously required. So to make sure that pynautobot (and subsequently Nautobot Ansible) and Nautobot Helm Chart work with the most recent version of Nautobot, new versions have been released.

pynautobot & Nautobot Ansible

First to check what version of pynautobot you have, you can run pip list to get that environment. Here is an example of using grep to only look for pynautobot.

❯ pip list | grep pynautobot
pynautobot         2.0.2

Nautobot 1.6 Environments

If you are continuing on the LTM release train of 1.6, your pynautobot needs to be upgraded to 1.5.2 in order to continue using the Ansible modules (4.5.0). No update to the Ansible modules is required-only the underlying pynautobot version. Complete this with:

pip install pynautobot==1.5.2

Accidental Upgrade to 2.x of pynautobot?

If you accidentally upgrade to the latest version of pynautobot but intended to be on 1.x, just issue the same command as above and you will get the right version. Nothing further would needs to be done-no harm.

pip install pynautobot=-1.5.2

Nautobot 2.1 Environments

For those with the latest Nautobot application version of 2.1.9, please upgrade the pynautobot instance in your Ansible environment to the latest of 2.1.1

pip install --upgrade pynautobot

Nautobot Helm Chart

First to check what version of Nautobot Helm Chart you have configured, you can run helm show chart nautobot/nautobot to get the full information about the configured chart. There will be multiple versions you will see in the output, the chart version that matters is the last line in the output and is a root key in the yaml output.

❯ helm show chart nautobot/nautobot
annotations:

... Truncated for bevity ...

sources:
- https://github.com/nautobot/nautobot
- https://github.com/nautobot/helm-charts
version: 2.0.5

Warning – READ BEFORE PROCEEDING

The latest version of the helm chart has a default version for Nautobot that is set to 2.1.9, if you are NOT providing custom image or statically declaring the version you WILL be upgraded to 2.1.9. For more information on using a custom image please see the documentation here or for using the Network to Code maintained images with a specific version please ensure nautobot.image.tag is set to the tagged version you are expecting to use. Below are some examples for values.yaml provided to a helm release.

If you are on a 1.X.X version of the helm chart please review the upgrade guide here before proceeding.

Custom Image

nautobot:
  image:
    registry: "ghcr.io"
    repository: "my-namespace/nautobot"
    tag: "1.6.16-py3.11"
    pullPolicy: "Always"
    pullSecrets:
      - ghcr-pull-secret

Network to Code Image

nautobot:
  image:
    tag: "1.6.16-py3.11"

Update Helm Repo

Before you can use the new version of the helm chart you must update the helm repo.

❯ helm repo update nautobot
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "nautobot" chart repository
Update Complete. ⎈Happy Helming!⎈

Update Helm Release

Now you can proceed to update your helm release with the latest helm chart version.

❯ helm upgrade <name of helm release> -f values.yml --version 2.1.0
Release "nautobot" has been upgraded. Happy Helming!
NAME: nautobot
LAST DEPLOYED: Wed Mar 27 20:09:47 2024
NAMESPACE: default
STATUS: deployed
REVISION: 3
NOTES:
*********************************************************************
*** PLEASE BE PATIENT: Nautobot may take a few minutes to install ***
*********************************************************************

... Truncated for bevity ...

Conclusion

When issues do arise on playbooks that were previously working fine, it’s best to give your dependency software packages a quick update. Hope that this helps. Happy automating.

-Josh, Jeremy



ntc img
ntc img

Contact Us to Learn More

Share details about yourself & someone from our team will reach out to you ASAP!

Introducing Cookiecutter Project Templates to Support Nautobot App Development for Network Automation

Blog Detail

In June of 2022 Network to Code announced the opensourcing of a Cookiecutter project that contains a project template ChatOps integrations to help in the initial bootstrapping of a Nautobot ChatOps App. The Nautobot ChatOps Cookiecutter announcement post can be found here. This first cookie helped to lower the barrier for entry when it came to developing new ChatOps integrations AND made it possible to have baseline standards on things like local development environments, docs structure (with docs already built for installation), administration, and contributing.

Two New Cookies and a New Home for Another

Today we are announcing that we are doubling down on the benefits of Cookiecutter and are opensourcing a new Cookiecutter repository that contains three separate cookies. Two of the cookies are new to open sourcing and the original ChatOps cookie is getting a new home within this same repository!

Nautobot App

Nautobot App cookie is broadly applicable to most Nautobot Apps you may develop and provides the initial scaffolding for building additional models for your Nautobot App. This cookie provides a question when baking the cookie for a Model Class Name. If provided, a simple model class will be created with name and description fields on the model along with all standard components, to have a fully functioning set of UI and API views.

Nautobot App SSoT

Nautobot App SSoT is a superset of the Nautobot App cookie, as it provides the same capability to automatically generate a model with all required components in order to have a fully functioning set of UI and API views to support a network source of truth. In addition to features provided by Nautobot Apps cookie, this cookie will also build out the Network to Code recommended folder and file structure for developing an SSoT App as well as the required Nautobot SSoT Jobs (creates both Data Source and Data Target Jobs). This includes the initial creation of DiffSync adapters, models, and utils along with their use in the Nautobot SSoT Jobs.

Nautobot App ChatOps

Nautobot App ChatOps cookie is also a superset of the Nautobot App cookie but instead provides a base command and a hello_world subcommand along with the required settings in the pyproject.toml that are used to inform the Nautobot ChatOps App that an additional base command is registered as part of this app. This cookie was previously open sourced as its own Cookiecutter repository but has now been migrated to the new repository, and the old repository has been archived.

Why the New Repository?

As the amount of open source projects Network to Code maintains continues to expand, we are evaluating how to be as effective as possible in the care and feeding that is required for maintaining any open source project. This also is factoring in things like continual maintenance of standards when it comes to docs structure, how to interface with development environments, and CI workflow standards. With the new repository, we are able to provide the same standard for three separate cookies and the use of symbolic links. This allows a change to a single file to immediately be applicable to all cookies in the repository. By providing this functionality we are able to avoid drift between all cookies, as the symbolic links all point back to one overarching standard!

Codified Standards

With the open sourcing of more cookies for Nautobot Apps, Network to Code has also built an internal Drift Management process that is already helping to keep Nautobot Apps maintained by Network to Code all at the same standard, no matter when the cookie was baked.


Conclusion

This helps to improve developer experience across all of our Official Nautobot Apps and ensure consistent standards for testing, basic docs, and CI!

-Jeremy White



ntc img
ntc img

Contact Us to Learn More

Share details about yourself & someone from our team will reach out to you ASAP!

Nautobot Plugins Are Now Called Nautobot Apps

Blog Detail

Nautobot Plugins & Nautobot Apps, both are used to describe the same extensibility feature of Nautobot. For a cohesive experience, Network to Code has decided to update all repos and docs to use Nautobot Apps.

What’s Changing

Today all Nautobot Apps that are maintained by Network to Code have had their repository renamed to replace plugin with ‘app’. Doing so will change the repository URL, and renamed repositories in GitHub will automatically be redirected to the new renamed URL. This ensures a seamless experience during the transition.

Now that all Nautobot Apps have been renamed, each Nautobot App will have its documentation updated to replace plugin with `app’. This will include the latest published docs hosted at docs.nautobot.com and docstrings within the code itself.

Do I Need to Change Anything in My Deployment?

No, Network to Code is not changing how the apps are packaged, installed, or configured.

Will I Need to Update Nautobot or Any App That’s Installed?

No, the renaming is on the repository, not on the Python package.

-Jeremy



ntc img
ntc img

Contact Us to Learn More

Share details about yourself & someone from our team will reach out to you ASAP!