Metadata-Version: 2.4
Name: netbox-orchestrator
Version: 26.10.1
Summary: Workflow orchestration plugin for NetBox, inspired by SURF's workflow-orchestrator.
Author-email: Lorenzo Karel <r2unit@proton.me>
License-Expression: GPL-2.0-or-later
Project-URL: Homepage, https://codeberg.org/r2unit/netbox-orchestrator
Project-URL: Source, https://codeberg.org/r2unit/netbox-orchestrator
Project-URL: Documentation, https://codeberg.org/r2unit/netbox-orchestrator/src/branch/devel/docs
Project-URL: Issues, https://codeberg.org/r2unit/netbox-orchestrator/issues
Project-URL: Release Notes, https://codeberg.org/r2unit/netbox-orchestrator/releases
Project-URL: Workflow Library, https://codeberg.org/r2unit/netbox-orchestrator_workflows
Keywords: netbox,netbox-plugin,orchestrator,workflow,network-automation
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Plugins
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: System :: Networking
Classifier: Topic :: System :: Systems Administration
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cryptography>=41.0
Requires-Dist: requests>=2.31
Requires-Dist: PyYAML>=6.0
Provides-Extra: netmiko
Requires-Dist: netmiko>=4.3; extra == "netmiko"
Provides-Extra: napalm
Requires-Dist: napalm>=4.1; extra == "napalm"
Provides-Extra: ncclient
Requires-Dist: ncclient>=0.6.15; extra == "ncclient"
Provides-Extra: gnmi
Requires-Dist: pygnmi>=0.8.12; extra == "gnmi"
Provides-Extra: scrapli
Requires-Dist: scrapli>=2024.1.30; extra == "scrapli"
Provides-Extra: snmp
Requires-Dist: pysnmp>=6.2.6; extra == "snmp"
Provides-Extra: libvirt
Requires-Dist: libvirt-python>=10.0.0; extra == "libvirt"
Provides-Extra: proxmox
Requires-Dist: proxmoxer>=2.0.1; extra == "proxmox"
Provides-Extra: vmware
Requires-Dist: pyvmomi>=8.0.3.0; extra == "vmware"
Provides-Extra: hcloud
Requires-Dist: hcloud<3,>=2.24.0; extra == "hcloud"
Provides-Extra: all
Requires-Dist: netmiko>=4.3; extra == "all"
Requires-Dist: napalm>=4.1; extra == "all"
Requires-Dist: ncclient>=0.6.15; extra == "all"
Requires-Dist: pygnmi>=0.8.12; extra == "all"
Requires-Dist: scrapli>=2024.1.30; extra == "all"
Requires-Dist: pysnmp>=6.2.6; extra == "all"
Requires-Dist: libvirt-python>=10.0.0; extra == "all"
Requires-Dist: proxmoxer>=2.0.1; extra == "all"
Requires-Dist: pyvmomi>=8.0.3.0; extra == "all"
Requires-Dist: hcloud<3,>=2.24.0; extra == "all"
Dynamic: license-file

<div align="center">

![Netbox Orchestrator](docs/static/netbox-orchestrator.png)

# Netbox Orchestrator

[![CI](https://ci.nerdpitch.cloud/api/badges/1/status.svg?branch=devel)](https://ci.nerdpitch.cloud/repos/1)
![PyPI](https://img.shields.io/pypi/v/netbox-orchestrator)
![Python](https://img.shields.io/badge/python-3.10%20to%203.14-blue)
![NetBox](https://img.shields.io/badge/netbox-4.3%20to%204.6-blue)
![License](https://img.shields.io/badge/license-GPLv2%2B-blue)

</div>

I've started this plugin to make my life easier to get things from my souce-of-thruth to my infrastructure. 
There are allot of other tools that will make this kinda work but they don't have a great intergration with Netbox. 
And normaly this is to the user or developer self to make the intergration better or write it yourself

> [!WARNING]
> This is still under heavy development and will break one way or another, so do not use it in production! 
> 

## Compatibility

| NetBox Version | Plugin Version |
|----------------|:--------------:|
| 4.3            | 26.10.1        |
| 4.4            | 26.10.1        |
| 4.5            | 26.10.1        |
| 4.6            | 26.10.1        |

Under the hood we lean on a few dependencies to make the magic happen for our workflows. See [DEPENDENCIES.md](DEPENDENCIES.md) for the full list.
Cloud providers the orchestrator can manage, and what is supported for each, are listed in [PROVIDERS.md](PROVIDERS.md).

## Installation

Official releases are published to [PyPI](https://pypi.org/project/netbox-orchestrator/) and on the [releases page](https://codeberg.org/r2unit/netbox-orchestrator/releases). Pick the release that matches your NetBox version from the table above.

You can follow the [official plugins installation instructions](https://netboxlabs.com/docs/netbox/plugins/installation/).

If needed, source your NetBox's virtual environment and install the plugin like a package. We assume you have already installed NetBox and its source code is in `/opt/netbox`:

```bash
source /opt/netbox/venv/bin/activate
pip install netbox-orchestrator
```

To keep the plugin installed when you upgrade NetBox, add it to `local_requirements.txt`:

```bash
sudo sh -c "echo 'netbox-orchestrator' >> /opt/netbox/local_requirements.txt"
```

Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`:

```python
PLUGINS = ["netbox_orchestrator"]

PLUGINS_CONFIG = {
    "netbox_orchestrator": {
        "CREDENTIAL_ENCRYPTION_KEY": "replace-with-a-long-random-string",
    },
}
```

Run the migrations and restart NetBox:

```bash
cd /opt/netbox/netbox
python manage.py migrate
sudo systemctl restart netbox netbox-rq
```

Workflows run on their own queue, `netbox_orchestrator.workflows`, which the default NetBox worker does not listen on. Start a worker for it:

```bash
python manage.py rqworker netbox_orchestrator.workflows
```

See [INSTALLATION.md](INSTALLATION.md) for netbox-docker, optional connection drivers, a systemd unit for the worker, and every setting you can change.

## Getting Started
Okay before you get started make sure you have the following tools installed on your system

- [Docker](https://docs.docker.com/engine/install/)
- [Python](https://www.python.org/downloads/)

Then if you have the tools installed, you can do the following to get started

#### Clone the repository
```bash
# HTTPS
git clone https://codeberg.org/r2unit/netbox-orchestrator.git

# SSH
git clone ssh://git@codeberg.org/r2unit/netbox-orchestrator.git
```

#### Running the development setup
Then when you moved to the repository dir you can do an 'docker compose -f .devcontainer/docker-compose.yml up -d'
to get the development setup running, this setup will hot-relead the code in the codebase so its easier to work on.


## Want to contribute?
Yes please!

## Dependencies

See [DEPENDENCIES.md](DEPENDENCIES.md) for the full list of core and optional packages.

## Providers

See [PROVIDERS.md](PROVIDERS.md) for the supported cloud providers and features.

## License
This project is licensed under the GNU General Public License v2.0 or later - see the [LICENSE](LICENSE) file for details.
