|
1 | 1 | # Diode NetBox Plugin
|
2 | 2 |
|
3 |
| -Diode NetBox plugin is a [NetBox](https://netboxlabs.com/oss/netbox/) plugin for the Diode ingestion service. |
| 3 | +The Diode NetBox plugin is a [NetBox](https://netboxlabs.com/oss/netbox/) plugin and a required component of the [Diode](https://github.com/netboxlabs/diode) ingestion service. |
4 | 4 |
|
5 |
| -Diode is a new NetBox ingestion service that greatly simplifies and enhances the |
6 |
| -process to add and update network data |
| 5 | +Diode is a NetBox ingestion service that greatly simplifies and enhances the process to add and update network data |
7 | 6 | in NetBox, ensuring your network source of truth is always accurate and can be trusted to power your network automation
|
8 | 7 | pipelines.
|
9 | 8 |
|
@@ -34,17 +33,35 @@ See [NetBox Documentation](https://netboxlabs.com/docs/netbox/en/stable/plugins/
|
34 | 33 |
|
35 | 34 | ## Configuration
|
36 | 35 |
|
37 |
| -Set following environment variables for your NetBox: |
| 36 | +Source the NetBox Python virtual environment: |
38 | 37 |
|
39 |
| -* `DIODE_TO_NETBOX_API_KEY=<API_KEY_1>` - API key for the Diode service to interact with NetBox |
40 |
| -* `NETBOX_TO_DIODE_API_KEY=<API_KEY_2>` - API key for the NetBox service to interact with Diode |
41 |
| -* `INGESTION_API_KEY=<API_KEY_3>` - API key for Diode SDKs to ingest data into Diode |
| 38 | +```shell |
| 39 | +cd /opt/netbox |
| 40 | +source venv/bin/activate |
| 41 | +``` |
| 42 | + |
| 43 | +Generate 3 API keys as random 40 character long alphanumeric strings: |
| 44 | + |
| 45 | +```shell |
| 46 | +echo "export DIODE_TO_NETBOX_API_KEY=$(head -c20 </dev/urandom|xxd -p)" |
| 47 | +echo "export NETBOX_TO_DIODE_API_KEY=$(head -c20 </dev/urandom|xxd -p)" |
| 48 | +echo "export INGESTION_API_KEY=$(head -c20 </dev/urandom|xxd -p)" |
| 49 | +``` |
| 50 | + |
| 51 | +**Note:** store these API key strings in a safe place as they will be needed later to configure the Diode server |
| 52 | + |
| 53 | +Set the environment variables based on the random generated strings: |
42 | 54 |
|
43 |
| -Note: values of these environment variables should be 40 character long alphanumeric strings. |
| 55 | +```shell |
| 56 | +export DIODE_TO_NETBOX_API_KEY={random_string_1} # API key for the Diode service to interact with NetBox |
| 57 | +export NETBOX_TO_DIODE_API_KEY={random_string_2} # API key for the NetBox service to interact with Diode |
| 58 | +export INGESTION_API_KEY={random_string_3} # API key for Diode SDKs to ingest data into Diode |
| 59 | +``` |
44 | 60 |
|
45 |
| -Configure the plugin by running the following command in your NetBox instance: |
| 61 | +Configure the plugin: |
46 | 62 |
|
47 | 63 | ```shell
|
| 64 | +cd /opt/netbox/netbox |
48 | 65 | ./manage.py configurediodeplugin
|
49 | 66 | ```
|
50 | 67 |
|
|
0 commit comments