-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #232 from netdevopsbr/keepalive-status
Closes #202 and #231 - Add keepalive status verification for each Proxbox service (NetBox, Proxmox and FastAPI)
- Loading branch information
Showing
68 changed files
with
1,362 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Configuring plugin in the old way (<=v0.0.5) | ||
|
||
## Change Netbox '**[configuration.py](https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py)**' to add PLUGIN parameters | ||
The plugin's configuration is also located in **/opt/netbox/netbox/netbox/configuration.py**: | ||
|
||
Replace the values with your own following the [Configuration Parameters](#2-configuration-parameters) section. | ||
|
||
**OBS:** You do not need to configure all the parameters, only the one's different from the default values. It means that if you have some value equal to the one below, you can skip its configuration. For netbox you should ensure the domain/port either targets gunicorn or a true http port that is not redirected to https. | ||
|
||
```python | ||
PLUGINS_CONFIG = { | ||
'netbox_proxbox': { | ||
'proxmox': [ | ||
{ | ||
'domain': 'proxbox.example.com', # May also be IP address | ||
'http_port': 8006, | ||
'user': 'root@pam', # always required | ||
'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication | ||
'token': { | ||
'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format | ||
'value': '039az154-23b2-4be0-8d20-b66abc8c4686' | ||
}, | ||
'ssl': False | ||
}, | ||
# The following json is optional and applies only for multi-cluster use | ||
{ | ||
'domain': 'proxbox2.example.com', # May also be IP address | ||
'http_port': 8006, | ||
'user': 'root@pam', # always required | ||
'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication | ||
'token': { | ||
'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format | ||
'value': '039az154-23b2-4be0-8d20-b66abc8c4686' | ||
}, | ||
'ssl': False | ||
} | ||
], | ||
'netbox': { | ||
'domain': 'localhost', # Ensure localhost is added to ALLOWED_HOSTS | ||
'http_port': 8001, # Gunicorn port. | ||
'token': '0dd7cddfaee3b38bbffbd2937d44c4a03f9c9d38', | ||
'settings': { | ||
'virtualmachine_role_id' : 0, | ||
'node_role_id' : 0, | ||
'site_id': 0 | ||
} | ||
}, | ||
'fastapi': { | ||
# Uvicorn Host is (most of the time) the same as Netbox (as both servers run on the same machine) | ||
'uvicorn_host': 'localhost', | ||
'uvicorn_port': 8800, # Default Proxbox FastAPI port | ||
# Although it seems weird, the sudo-user is necessary so that Proxbox automatically starts Proxbox Backend. | ||
# It makes it more "plug-in", without the need to user input manual commands. | ||
'sudo': { | ||
'user': "sudo_enabled_user", | ||
'password': 'Strong@P4ssword', | ||
} | ||
} | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
{% extends 'base/layout.html' %} | ||
{% load static %} | ||
|
||
{% block head %} | ||
<script src="https://unpkg.com/[email protected]"></script> | ||
{% endblock %} | ||
{% block content %} | ||
{% include "netbox_proxbox/home/script.html" %} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{% extends 'base/layout.html' %} | ||
|
||
{% block content %} | ||
{% if status == 'success' %} | ||
<td id="{{ object.ip_address }}"> | ||
<span class='badge text-bg-green' title='Proxmox Cluster Mode'> | ||
</strong>Successful!</strong> | ||
</span> | ||
</td> | ||
{% elif status == 'error' %} | ||
<td id="{{ object.ip_address }}"> | ||
<span class='badge text-bg-red' title='Proxmox Cluster Mode'> | ||
</strong>Error!</strong> | ||
</span> | ||
</td> | ||
{% else %} | ||
<td id="{{ object.ip_address }}"> | ||
<span class='badge text-bg-grey' title='Proxmox Cluster Mode'> | ||
</strong>Undefined</strong> | ||
</span> | ||
</td> | ||
{% endif %} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.