2023-04-05 11:40:58 +02:00
2023-04-05 11:40:58 +02:00
2023-04-05 11:40:58 +02:00
2023-03-31 17:19:33 +02:00
2023-04-05 11:40:58 +02:00
2023-04-05 11:40:58 +02:00
2023-04-03 17:21:11 +02:00

Updates Dashboard

Summary

This is a tool to 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 located in this repo (infrastructure/updates-dashboard-ansible).

Install

Run with docker

docker-compose up

On-premise

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
    mkdir results results-packages
    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.py with correct values
  • Set gunicorn.service with correct values
  • Set updates-dashboard.conf with 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'
Description
No description provided
Readme 907 KiB
Languages
JavaScript 76.7%
Python 11.5%
HTML 9.9%
CSS 1.4%
Dockerfile 0.3%
Other 0.2%