Skip to content

Commit

Permalink
Merge pull request #79 from nautobot/u/whitej6-renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
whitej6 authored Jan 4, 2024
2 parents 1b93fa1 + df5fc15 commit d3d7038
Show file tree
Hide file tree
Showing 28 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
- [ ] Attached Screenshots, Payload Example
- [ ] Unit, Integration Tests
- [ ] Documentation Updates (when adding/changing features)
- [ ] Example Plugin Updates (when adding/changing features)
- [ ] Example App Updates (when adding/changing features)
- [ ] Outline Remaining Work, Constraints from Design
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on: # yamllint disable-line rule:truthy rule:comments
pull_request: ~

env:
PLUGIN_NAME: "nautobot-plugin-capacity-metrics"
PLUGIN_NAME: "nautobot-app-capacity-metrics"

jobs:
black:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upstream_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ jobs:
uses: "nautobot/nautobot/.github/workflows/plugin_upstream_testing_base.yml@develop"
with: # Below could potentially be collapsed into a single argument if a concrete relationship between both is enforced
invoke_context_name: "NAUTOBOT_CAPACITY_METRICS"
plugin_name: "nautobot-plugin-capacity-metrics"
plugin_name: "nautobot-app-capacity-metrics"
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Metrics & Monitoring Extension App

<p align="center">
<img src="https://raw.githubusercontent.com/nautobot/nautobot-plugin-capacity-metrics/develop/docs/images/icon-nautobot-capacity-metrics.svg" class="logo" height="200px">
<img src="https://raw.githubusercontent.com/nautobot/nautobot-app-capacity-metrics/develop/docs/images/icon-nautobot-capacity-metrics.svg" class="logo" height="200px">
<br>
<a href="https://github.com/nautobot/nautobot-plugin-capacity-metrics/actions"><img src="https://github.com/nautobot/nautobot-plugin-capacity-metrics/actions/workflows/ci.yml/badge.svg?branch=main"></a>
<a href="https://github.com/nautobot/nautobot-app-capacity-metrics/actions"><img src="https://github.com/nautobot/nautobot-app-capacity-metrics/actions/workflows/ci.yml/badge.svg?branch=main"></a>
<a href="https://docs.nautobot.com/projects/capacity-metrics/en/latest/"><img src="https://readthedocs.org/projects/nautobot-plugin-capacity-metrics/badge/"></a>
<a href="https://pypi.org/project/nautobot-capacity-metrics/"><img src="https://img.shields.io/pypi/v/nautobot-capacity-metrics"></a>
<a href="https://pypi.org/project/nautobot-capacity-metrics/"><img src="https://img.shields.io/pypi/dm/nautobot-capacity-metrics"></a>
Expand All @@ -23,7 +23,7 @@ Currently the app exposes these simple metrics by default:
- Jobs stats
- Models count (configurable via nautobot_config.py)

In addition, it is possible to use the app configuration to expose metrics about the versions of Python, Django, Nautobot and the installed Nautobot apps/plugins.
In addition, it is possible to use the app configuration to expose metrics about the versions of Python, Django, Nautobot and the installed Nautobot apps/apps.

## Try it out!

Expand All @@ -43,7 +43,7 @@ Full documentation for this App can be found over on the [Nautobot Docs](https:/

### Contributing to the Documentation

You can find all the Markdown source for the App documentation under the [`docs`](https://github.com/nautobot/nautobot-plugin-capacity-metrics/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-app-capacity-metrics/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/capacity-metrics/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 Down
2 changes: 1 addition & 1 deletion docs/admin/compatibility_matrix.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Compatibility Matrix

| Metrics & Monitoring Extension Plugin Version | Nautobot First Support Version | Nautobot Last Support Version |
| Metrics & Monitoring Extension App Version | Nautobot First Support Version | Nautobot Last Support Version |
| ------------- | -------------------- | -------------- |
| 1.0.X | 1.0.0 | 1.99.99 |
| 1.1.X | 1.0.0 | 1.99.99 |
Expand Down
16 changes: 8 additions & 8 deletions docs/admin/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Here you will find detailed instructions on how to **install** and **configure**

## Prerequisites

- The plugin is compatible with Nautobot 2.0.0 and higher.
- The app is compatible with Nautobot 2.0.0 and higher.
- Databases supported: PostgreSQL, MySQL

!!! note
Expand All @@ -13,21 +13,21 @@ Here you will find detailed instructions on how to **install** and **configure**
## Install Guide

!!! note
Plugins can be installed manually or using Python's `pip`. See the [nautobot documentation](https://nautobot.readthedocs.io/en/latest/plugins/#install-the-package) for more details. The pip package name for this plugin is [`nautobot-capacity-metrics`](https://pypi.org/project/nautobot-capacity-metrics/).
Apps can be installed manually or using Python's `pip`. See the [nautobot documentation](https://nautobot.readthedocs.io/en/latest/plugins/#install-the-package) for more details. The pip package name for this app is [`nautobot-capacity-metrics`](https://pypi.org/project/nautobot-capacity-metrics/).

The plugin is available as a Python package via PyPI and can be installed with `pip`:
The app is available as a Python package via PyPI and can be installed with `pip`:

```shell
pip install nautobot-capacity-metrics
```

To ensure Metrics & Monitoring Extension Plugin is automatically re-installed during future upgrades, create a file named `local_requirements.txt` (if not already existing) in the Nautobot root directory (alongside `requirements.txt`) and list the `nautobot-capacity-metrics` package:
To ensure Metrics & Monitoring Extension App is automatically re-installed during future upgrades, create a file named `local_requirements.txt` (if not already existing) in the Nautobot root directory (alongside `requirements.txt`) and list the `nautobot-capacity-metrics` package:

```shell
echo nautobot-capacity-metrics >> local_requirements.txt
```

Once installed, the plugin needs to be enabled in your Nautobot configuration. The following block of code below shows the additional configuration required to be added to your `nautobot_config.py` file:
Once installed, the app needs to be enabled in your Nautobot configuration. The following block of code below shows the additional configuration required to be added to your `nautobot_config.py` file:

- Append `"nautobot_capacity_metrics"` to the `PLUGINS` list.
- Append the `"nautobot_capacity_metrics"` dictionary to the `PLUGINS_CONFIG` dictionary and override any defaults.
Expand Down Expand Up @@ -85,7 +85,7 @@ sudo systemctl restart nautobot nautobot-worker nautobot-scheduler

## App Configuration

The plugin behavior can be controlled with the following list of settings:
The app behavior can be controlled with the following list of settings:

| Key | Example | Default | Description |
| ------- | ------ | -------- | ------------------------------------- |
Expand All @@ -94,6 +94,6 @@ The plugin behavior can be controlled with the following list of settings:

## Included Grafana Dashboard

Included within this plugin is a Grafana dashboard which will work with the example configuration above. To install this dashboard import the JSON from [Grafana Dashboard](https://raw.githubusercontent.com/nautobot/nautobot-plugin-capacity-metrics/develop/docs/nautobot_grafana_dashboard.json) into Grafana.
Included within this app is a Grafana dashboard which will work with the example configuration above. To install this dashboard import the JSON from [Grafana Dashboard](https://raw.githubusercontent.com/nautobot/nautobot-app-capacity-metrics/develop/docs/nautobot_grafana_dashboard.json) into Grafana.

![Nautobot Grafana Dashboard](https://raw.githubusercontent.com/nautobot/nautobot-plugin-capacity-metrics/develop/docs/images/nautobot_grafana_dashboard.png)
![Nautobot Grafana Dashboard](https://raw.githubusercontent.com/nautobot/nautobot-app-capacity-metrics/develop/docs/images/nautobot_grafana_dashboard.png)
2 changes: 1 addition & 1 deletion docs/admin/release_notes/version_1.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ This document describes all new features and changes in the release `1.1`. The f

### Added

- [#24](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/24) Added support for GitRepository sync metrics.
- [#24](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/24) Added support for GitRepository sync metrics.
6 changes: 3 additions & 3 deletions docs/admin/release_notes/version_2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This document describes all new features and changes in the release `2.0`. The f

### Changed

- [#27](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/27) Migrated to GitHub Actions from Travis-CI
- [#30](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/30) Updates to mkdocs version from 1.1.2 to 1.3.0
- [#27](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/27) Migrated to GitHub Actions from Travis-CI
- [#30](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/30) Updates to mkdocs version from 1.1.2 to 1.3.0

### Removed

- [#29](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/29) Removed `nautobot_job_task_stats` metric
- [#29](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/29) Removed `nautobot_job_task_stats` metric
12 changes: 6 additions & 6 deletions docs/admin/release_notes/version_2.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ This document describes all new features and changes in the release `2.1`. The f

### Fixed

- [#123](https://github.com/nautobot/nautobot-plugin-capacity-metrics/issues/123) Fixed Tag filtering not working in job launch form
- [#123](https://github.com/nautobot/nautobot-app-capacity-metrics/issues/123) Fixed Tag filtering not working in job launch form

## [v2.1.0] - 2023-09-29

### Added

- [#36](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/36) Added a metric for software version
- [#36](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/36) Added a metric for software version

### Changed

- Updated minimum version of Nautobot to 1.6
- Deprecates support for Python 3.7
- [#45](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/45) Updated app description in app config
- [#51](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/51) Added screenshots to README
- [#45](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/45) Updated app description in app config
- [#51](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/51) Added screenshots to README

### Housekeeping

- [#41](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/41) Introduced testing against upstream Nautobot
- [#43](https://github.com/nautobot/nautobot-plugin-capacity-metrics/pull/43) Changed CODEOWNERS to a group instead of individual people
- [#41](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/41) Introduced testing against upstream Nautobot
- [#43](https://github.com/nautobot/nautobot-app-capacity-metrics/pull/43) Changed CODEOWNERS to a group instead of individual people
4 changes: 2 additions & 2 deletions docs/admin/release_notes/version_3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ This document describes all new features and changes in the release `3.0`. The f

- Major features or milestones
- Achieved in this `x.y` release
- Changes to compatibility with Nautobot and/or other plugins, libraries etc.
- Changes to compatibility with Nautobot and/or other apps, libraries etc.

## [v3.0.1] - 2023-09-29

### Fixed

- [#65](https://github.com/nautobot/nautobot-plugin-capacity-metrics/issues/65) Fixes incorrect self-reporting of version number
- [#65](https://github.com/nautobot/nautobot-app-capacity-metrics/issues/65) Fixes incorrect self-reporting of version number

## [v3.0.0] - 2023-09-29

Expand Down
4 changes: 2 additions & 2 deletions docs/admin/uninstall.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Here you will find any steps necessary to cleanly remove the App from your Nauto

## Database Cleanup

Prior to removing the plugin from the `nautobot_config.py`, run the following command to roll back any migration specific to this plugin.
Prior to removing the app from the `nautobot_config.py`, run the following command to roll back any migration specific to this app.

```shell
nautobot-server migrate nautobot_plugin_capacity_metrics zero
nautobot-server migrate nautobot_capacity_metrics zero
```

## Remove App configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/admin/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Here you will find any steps necessary to upgrade the App in your Nautobot envir

## Upgrade Guide

When a new release comes out it may be necessary to run a migration of the database to account for any changes in the data models used by this plugin. Execute the command `nautobot-server post-upgrade` within the runtime environment of your Nautobot installation after updating the `nautobot-capacity-metrics` package via `pip`.
When a new release comes out it may be necessary to run a migration of the database to account for any changes in the data models used by this app. Execute the command `nautobot-server post-upgrade` within the runtime environment of your Nautobot installation after updating the `nautobot-capacity-metrics` package via `pip`.
2 changes: 1 addition & 1 deletion docs/dev/code_reference/api.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Metrics & Monitoring Extension Plugin API Package
# Metrics & Monitoring Extension App API Package

::: nautobot_capacity_metrics.api
options:
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The project is following Network to Code software development guidelines and is

- Python linting and formatting: `black`, `pylint`, `bandit`, `flake8`, and `pydocstyle`.
- YAML linting is done with `yamllint`.
- Django unit test to ensure the plugin is working properly.
- Django unit test to ensure the app is working properly.

Documentation is built using [mkdocs](https://www.mkdocs.org/). The [Docker based development environment](dev_environment.md#docker-development-environment) automatically starts a container hosting a live version of the documentation website on [http://localhost:8001](http://localhost:8001) that auto-refreshes when you make any changes to your local files.

Expand Down
22 changes: 11 additions & 11 deletions docs/dev/dev_environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ Each command can be executed with `invoke <command>`. All commands support the a
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.
tests Run all tests for this app.
unittest Run Django unit tests for the app.
```

## Project Overview
Expand Down Expand Up @@ -291,9 +291,9 @@ This will safely shut down all of your running Docker containers for this projec

Your environment should now be fully setup, all necessary Docker containers are created and running, and you're logged into Nautobot in your web browser. Now what?

Now you can start developing your plugin in the project folder!
Now you can start developing your app in the project folder!

The magic here is the root directory is mounted inside your Docker containers when built and ran, so **any** changes made to the files in here are directly updated to the Nautobot plugin code running in Docker. This means that as you modify the code in your plugin folder, the changes will be instantly updated in Nautobot.
The magic here is the root directory is mounted inside your Docker containers when built and ran, so **any** changes made to the files in here are directly updated to the Nautobot app code running in Docker. This means that as you modify the code in your app folder, the changes will be instantly updated in Nautobot.

!!! warning
There are a few exceptions to this, as outlined in the section [To Rebuild or Not To Rebuild](#to-rebuild-or-not-to-rebuild).
Expand All @@ -317,7 +317,7 @@ When trying to debug an issue, one helpful thing you can look at are the logs wi
!!! info
Want to limit the log output even further? Use the `--tail <#>` command line argument in conjunction with `-f`.

So for example, our plugin is named `nautobot-capacity-metrics`, the command would most likely be `docker logs nautobot_capacity_metrics_nautobot_1 -f`. You can find the name of all running containers via `docker ps`.
So for example, our app is named `nautobot-capacity-metrics`, the command would most likely be `docker logs nautobot_capacity_metrics_nautobot_1 -f`. You can find the name of all running containers via `docker ps`.

If you want to view the logs specific to the worker container, simply use the name of that container instead.

Expand All @@ -343,7 +343,7 @@ Once completed, the new/updated environment variables should now be live.

### Installing Additional Python Packages

If you want your plugin to leverage another available Nautobot plugin or another Python package, you can easily add them into your Docker environment.
If you want your app to leverage another available Nautobot app or another Python package, you can easily add them into your Docker environment.

```bash
➜ poetry shell
Expand All @@ -358,26 +358,26 @@ Once the dependencies are resolved, stop the existing containers, rebuild the Do
➜ invoke start
```

### Installing Additional Nautobot Plugins
### Installing Additional Nautobot Apps

Let's say for example you want the new plugin you're creating to integrate into Slack. To do this, you will want to integrate into the existing Nautobot ChatOps Plugin.
Let's say for example you want the new app you're creating to integrate into Slack. To do this, you will want to integrate into the existing Nautobot ChatOps App.

```bash
➜ poetry shell
➜ poetry add nautobot-chatops
```

Once you activate the virtual environment via Poetry, you then tell Poetry to install the new plugin.
Once you activate the virtual environment via Poetry, you then tell Poetry to install the new app.

Before you continue, you'll need to update the file `development/nautobot_config.py` accordingly with the name of the new plugin under `PLUGINS` and any relevant settings as necessary for the plugin under `PLUGINS_CONFIG`. Since you're modifying the underlying OS (not just Django files), you need to rebuild the image. This is a similar process to updating environment variables, which was explained earlier.
Before you continue, you'll need to update the file `development/nautobot_config.py` accordingly with the name of the new app under `PLUGINS` and any relevant settings as necessary for the app under `PLUGINS_CONFIG`. Since you're modifying the underlying OS (not just Django files), you need to rebuild the image. This is a similar process to updating environment variables, which was explained earlier.

```bash
➜ invoke stop
➜ invoke build
➜ invoke start
```

Once the containers are up and running, you should now see the new plugin installed in your Nautobot instance.
Once the containers are up and running, you should now see the new app installed in your Nautobot instance.

!!! note
You can even launch an `ngrok` service locally on your laptop, pointing to port 8080 (such as for chatops development), and it will point traffic directly to your Docker images.
Expand Down
Loading

0 comments on commit d3d7038

Please sign in to comment.