You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Change Netbox '**[configuration.py](https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py)**' to add PLUGIN parameters
4
+
The plugin's configuration is also located in **/opt/netbox/netbox/netbox/configuration.py**:
5
+
6
+
Replace the values with your own following the [Configuration Parameters](#2-configuration-parameters) section.
7
+
8
+
**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.
9
+
10
+
```python
11
+
PLUGINS_CONFIG= {
12
+
'netbox_proxbox': {
13
+
'proxmox': [
14
+
{
15
+
'domain': 'proxbox.example.com', # May also be IP address
16
+
'http_port': 8006,
17
+
'user': 'root@pam', # always required
18
+
'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication
19
+
'token': {
20
+
'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format
21
+
'value': '039az154-23b2-4be0-8d20-b66abc8c4686'
22
+
},
23
+
'ssl': False
24
+
},
25
+
# The following json is optional and applies only for multi-cluster use
26
+
{
27
+
'domain': 'proxbox2.example.com', # May also be IP address
28
+
'http_port': 8006,
29
+
'user': 'root@pam', # always required
30
+
'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication
31
+
'token': {
32
+
'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format
33
+
'value': '039az154-23b2-4be0-8d20-b66abc8c4686'
34
+
},
35
+
'ssl': False
36
+
}
37
+
],
38
+
'netbox': {
39
+
'domain': 'localhost', # Ensure localhost is added to ALLOWED_HOSTS
[7. Get Help from Community!](#7-get-help-from-community)
81
+
[5. Get Help from Community!](#7-get-help-from-community)
88
82
89
83
---
90
84
@@ -150,84 +144,18 @@ Enable the plugin in **/opt/netbox/netbox/netbox/configuration.py**:
150
144
PLUGINS= ['netbox_proxbox']
151
145
```
152
146
153
-
---
154
147
155
148
### 1.3. Configure Plugin
156
149
157
-
#### 1.3.1. Change Netbox '**[configuration.py](https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/configuration.example.py)**' to add PLUGIN parameters
158
-
The plugin's configuration is also located in **/opt/netbox/netbox/netbox/configuration.py**:
159
-
160
-
Replace the values with your own following the [Configuration Parameters](#2-configuration-parameters) section.
161
-
162
-
**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.
163
-
164
-
```python
165
-
PLUGINS_CONFIG= {
166
-
'netbox_proxbox': {
167
-
'proxmox': [
168
-
{
169
-
'domain': 'proxbox.example.com', # May also be IP address
170
-
'http_port': 8006,
171
-
'user': 'root@pam', # always required
172
-
'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication
173
-
'token': {
174
-
'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format
175
-
'value': '039az154-23b2-4be0-8d20-b66abc8c4686'
176
-
},
177
-
'ssl': False
178
-
},
179
-
# The following json is optional and applies only for multi-cluster use
180
-
{
181
-
'domain': 'proxbox2.example.com', # May also be IP address
182
-
'http_port': 8006,
183
-
'user': 'root@pam', # always required
184
-
'password': 'Strong@P4ssword', # only required, if you don't want to use token based authentication
185
-
'token': {
186
-
'name': 'tokenID', # Only type the token name and not the 'user@pam:tokenID' format
187
-
'value': '039az154-23b2-4be0-8d20-b66abc8c4686'
188
-
},
189
-
'ssl': False
190
-
}
191
-
],
192
-
'netbox': {
193
-
'domain': 'localhost', # Ensure localhost is added to ALLOWED_HOSTS
# Uvicorn Host is (most of the time) the same as Netbox (as both servers run on the same machine)
204
-
'uvicorn_host': 'localhost',
205
-
'uvicorn_port': 8800, # Default Proxbox FastAPI port
206
-
# Although it seems weird, the sudo-user is necessary so that Proxbox automatically starts Proxbox Backend.
207
-
# It makes it more "plug-in", without the need to user input manual commands.
208
-
'sudo': {
209
-
'user': "sudo_enabled_user",
210
-
'password': 'Strong@P4ssword',
211
-
}
212
-
}
213
-
}
214
-
}
215
-
```
216
-
217
-
218
-
#### 1.3.2. Change Netbox '**[settings.py](https://github.com/netbox-community/netbox/blob/develop/netbox/netbox/settings.py)**' to include Proxbox Template directory
219
-
220
-
> Probably on the next release of Netbox, it will not be necessary to make the configuration below! As the [Pull Request #8733](https://github.com/netbox-community/netbox/pull/8734) got merged to develop branch
221
-
222
-
**It is no longer necessary to modify the templates section in `settings.py` and you may revert any changes.**
150
+
All plugin configuration is now done using NetBox GUI or its API. You can check the old configuration way [here](./PAST_CONFIG.md).
*`proxmox.ssl`: (Bool) Defines the use of SSL (default: False).
305
-
306
-
*`netbox`: (Dict) Netbox related configuration to use pynetbox.
307
-
*`netbox.domain`: (String) Domain or IP address of Netbox. Ensure name or ip is added to `ALLOWED_HOSTS`
308
-
*`netbox.http_port`: (Integer) Netbox HTTP PORT (default: 8001). If you are not targeting gunicorn directly make sure the HTTP port is not redirected to HTTPS by your HTTP server.
309
-
*`netbox.token`: (String) Netbox Token Value.
310
-
*`netbox.settings`: (Dict) Default items of Netbox to be used by Proxbox.
311
-
- If not configured, Proxbox will automatically create a basic configuration to make it work.
312
-
- The ID of each item can be easily found on the URL of the item you want to use.
313
-
*`netbox.settings.virtualmachine_role_id`: (Integer) Role ID to be used by Proxbox when creating Virtual Machines
314
-
*`netbox.settings.node_role_id`: (Integer) Role ID to be used by Proxbox when creating Nodes (Devices)
315
-
*`netbox.settings.site_id` (Integer) Site ID to be used by Proxbox when creating Nodes (Devices)
316
-
317
-
## 3. Usage
220
+
## 2. Usage
318
221
319
222
If everything is working correctly, you should see in Netbox's navigation the **Proxmox VM/CT** button in **Plugins** dropdown list.
320
223
@@ -326,7 +229,7 @@ It will redirect you to a new page and you just have to wait until the plugin ru
326
229
327
230
---
328
231
329
-
## 4. Enable Logs
232
+
## 3. Enable Logs
330
233
331
234
So that Proxbox plugin logs what is happening to the terminal, copy the following code and paste to `configuration.py` Netbox configuration file:
332
235
@@ -351,24 +254,17 @@ Although the above standard configuration should do the trick to things work.
351
254
352
255
---
353
256
354
-
## 5. Contributing
355
-
Developing tools for this project based on [ntc-netbox-plugin-onboarding](https://github.com/networktocode/ntc-netbox-plugin-onboarding) repo.
356
-
357
-
Issues and pull requests are welcomed.
358
-
359
-
---
360
-
361
-
## 6. Roadmap
362
-
- Start using custom models to optimize the use of the Plugin and stop using 'Custom Fields'
363
-
- Automatically remove Nodes on Netbox when removed on Promox (as it already happens with Virtual Machines and Containers)
364
-
- Add individual update of VM/CT's and Nodes (currently is only possible to update all at once)
365
-
- Add periodic update of the whole environment so that the user does not need to manually click the update button.
366
-
- Create virtual machines and containers directly on Netbox, having no need to access Proxmox.
367
-
- Add 'Console' button to enable console access to virtual machines
257
+
## 4. Roadmap
258
+
-[X] Start using custom models to optimize the use of the Plugin and stop using 'Custom Fields'
259
+
-[ ] Automatically remove Nodes on Netbox when removed on Promox (as it already happens with Virtual Machines and Containers)
260
+
-[ ] Add individual update of VM/CT's and Nodes (currently is only possible to update all at once)
261
+
-[ ] Add periodic update of the whole environment so that the user does not need to manually click the update button.
262
+
-[ ] Create virtual machines and containers directly on Netbox, having no need to access Proxmox.
263
+
-[ ] Add 'Console' button to enable console access to virtual machines
368
264
369
265
---
370
266
371
-
## 7. Get Help from Community!
267
+
## 5. Get Help from Community!
372
268
If you are struggling to get Proxbox working, feel free to contact someone from community (including me) to help you.
373
269
Below some of the communities available:
374
270
-**[Official - Slack Community (english)](https://netdev.chat/)**
0 commit comments