Changes between Version 9 and Version 10 of Nmm2022/Agenda/Netbox


Ignore:
Timestamp:
Jun 2, 2022, 3:54:15 AM (2 years ago)
Author:
geethike
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Nmm2022/Agenda/Netbox

    v9 v10  
    226226
    227227Type ''' Ctrl+c ''' to stop the development server.
     228
     229=== Gunicorn ===
     230Like most Django applications, NetBox runs as a WSGI application behind an HTTP server. This documentation shows how to install and configure gunicorn (which is automatically installed with NetBox) for this role, however other WSGI servers are available and should work similarly well. uWSGI is a popular alternative.
     231
     232''' Configuration '''
     233
     234NetBox ships with a default configuration file for gunicorn. To use it, copy ''' /opt/netbox/contrib/gunicorn.py to /opt/netbox/gunicorn.py. '''(We make a copy of this file rather than pointing to it directly to ensure that any local changes to it do not get overwritten by a future upgrade.)
     235
     236{{{
     237# sudo cp /opt/netbox/contrib/gunicorn.py /opt/netbox/gunicorn.py
     238}}}
     239
     240''' systemd Setup '''
     241We'll use systemd to control both gunicorn and NetBox's background worker process. First, copy ''' contrib/netbox.service ''' and ''' contrib/netbox-rq.service ''' to the ''' /etc/systemd/system/ '''directory and reload the ''' systemd ''' daemon:
     242{{{
     243# sudo cp -v /opt/netbox/contrib/*.service /etc/systemd/system/
     244# sudo systemctl daemon-reload
     245}}}
     246Then, start the ''' netbox ''' and ''' netbox-rq ''' services and enable them to initiate at boot time:
     247{{{
     248# sudo systemctl start netbox netbox-rq
     249# sudo systemctl enable netbox netbox-rq
     250}}}
     251You can use the command ''' systemctl ''' status netbox to verify that the WSGI service is running:
     252{{{
     253systemctl status netbox.service
     254}}}