Update Netbox » History » Version 2
Ahmed Bilal, 05/08/2020 09:08 AM
| 1 | 1 | Ahmed Bilal | h1. Update Netbox |
|---|---|---|---|
| 2 | |||
| 3 | |||
| 4 | @/etc/supervisor.d/netbox.ini@ |
||
| 5 | |||
| 6 | <pre> |
||
| 7 | [program:netbox] |
||
| 8 | command = /home/app/netbox/venv/bin/gunicorn -c /home/app/netbox/gunicorn_config.py netbox.wsgi |
||
| 9 | directory = /home/app/netbox/netbox/ |
||
| 10 | user = app |
||
| 11 | |||
| 12 | [program:netbox-rqworker] |
||
| 13 | command = /home/app/netbox/venv/bin/python3 /home/app/netbox/netbox/manage.py rqworker |
||
| 14 | directory = /home/app/netbox/netbox/ |
||
| 15 | user = app |
||
| 16 | </pre> |
||
| 17 | |||
| 18 | |||
| 19 | REDIS configuration in @/home/app/netbox/netbox/netbox/configuration.py@ should be like below |
||
| 20 | |||
| 21 | <pre> |
||
| 22 | REDIS = { |
||
| 23 | 'tasks': { |
||
| 24 | 'HOST': 'localhost', |
||
| 25 | 'PORT': 6379, |
||
| 26 | 'PASSWORD': '', |
||
| 27 | 'DATABASE': 0, |
||
| 28 | 'DEFAULT_TIMEOUT': 300, |
||
| 29 | 'SSL': False, |
||
| 30 | }, |
||
| 31 | 'caching': { |
||
| 32 | 'HOST': 'localhost', |
||
| 33 | 'PORT': 6379, |
||
| 34 | 'PASSWORD': '', |
||
| 35 | 'DATABASE': 1, |
||
| 36 | 'DEFAULT_TIMEOUT': 300, |
||
| 37 | 'SSL': False, |
||
| 38 | } |
||
| 39 | } |
||
| 40 | </pre> |
||
| 41 | |||
| 42 | <pre><code class="shell"> |
||
| 43 | cd /home/app/netbox |
||
| 44 | 2 | Ahmed Bilal | |
| 45 | 1 | Ahmed Bilal | git checkout master |
| 46 | git reset --hard |
||
| 47 | git pull origin master |
||
| 48 | 2 | Ahmed Bilal | |
| 49 | 1 | Ahmed Bilal | chown -R app:app . |
| 50 | 2 | Ahmed Bilal | |
| 51 | 1 | Ahmed Bilal | echo django-auth-ldap >> requirements.txt |
| 52 | echo python-decouple >> requirements.txt |
||
| 53 | 2 | Ahmed Bilal | |
| 54 | 1 | Ahmed Bilal | ./upgrade.sh |
| 55 | 2 | Ahmed Bilal | |
| 56 | 1 | Ahmed Bilal | supervisorctl reread |
| 57 | supervisorctl reload |
||
| 58 | supervisorctl restart all |
||
| 59 | </code></pre> |