Updates Dashboard - Smile Outsourcing Lyon
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 not present in this repo.
Install
Dependencies in case of Debian 8.
apt-get install python3-venv libmysqlclient-dev mysql-client python3-dev
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-sol/ -g www-data -M -s /bin/false www-updash
cd /var/www/
git clone git@git.smile.fr:smile-outsourcing/updates-dashboard-sol.git updates-dashboard-sol
chown -R www-updash:www-data updates-dashboard-sol
touch /var/log/gunicorn.log
chown www-updash:www-data /var/log/gunicorn.log
cd updates-dashboard-sol
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'