2.1 KiB
2.1 KiB
Updates Dashboard
Summary
This is a tool have a clear view of the which servers are outdated, and keep trace of the updates.
Technical information
It runs with Django. The information are daily generated by an ansible playbook, which is located in ../ansible in this repo.
Install
Dependencies in case of Debian 10.
apt install python3-venv libmariadb-dev-compat libmariadb-dev mariadb-client python3-dev gcc
Following procedure to install the apps.
useradd -d /var/www/updates-dashboard/ -g www-data -M -s /bin/false www-updash
cd /var/www/
git clone git@gitlab.infolegale.net:infrastructure/updates-dashboard.git updates-dashboard
chown -R www-updash:www-data updates-dashboard
touch /var/log/gunicorn.log
chown www-updash:www-data /var/log/gunicorn.log
cd updates-dashboard
python3 -m venv updash-venv
source updash-venv/bin/activate
(updash-venv) pip install -r requirements.txt
cp defaults/settings_local.py updatesdashboard/
cp defaults/gunicorn.service /etc/systemd/system/
cp defaults/updates-dashboard.conf /etc/nginx/sites-available
cd /etc/nginx/sites-enabled
ln -s /etc/nginx/sites-avaiable/updates-dashboard.conf .
- Set
settings_local.pywith correct values - Set
gunicorn.servicewith correct values - Set
updates-dashboard.confwith correct values
systemctl daemon-reload
systemctl enable gunicorn.service
nginx -t
systemctl reload nginx
To initialize the project:
(updash-venv) ./manage.py makemigrations
(updash-venv) ./manage.py makemigrations dashboard
(updash-venv) ./manage.py collectstatic
(updash-venv) ./manage.py migrate
(updash-venv) ./manage.py loaddata dashboard/fixtures/os.yaml
(updash-venv) ./manage.py loaddata dashboard/fixtures/teams.yaml
Vérifier les flux de mise à jour des données. Ansible->Dashboard Vérifier le sql mode de la base de données
set @@global.sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
TODO
- playbook to install via ansible ?
- playbook to update via ansible ?
- buttons should be 'previous / next results' instead of 'previous / next day'