ScoDoc 9 install manager
Go to file
2022-03-19 14:58:40 +01:00
app re-implemented last_stable_version (use our repository) 2022-03-19 14:58:40 +01:00
etc doc install 2021-10-14 10:51:13 +02:00
.flaskenv Portage for ScoDoc 9 2021-09-18 17:38:52 +02:00
.gitignore Portage for ScoDoc 9 2021-09-18 17:38:52 +02:00
installmgr.py Portage for ScoDoc 9 2021-09-18 17:38:52 +02:00
README.md doc install 2021-10-14 10:51:13 +02:00
requirements.txt ajout gunicorn 2021-10-14 10:52:46 +02:00

InstallMgr

Mini-app Flask remplaçant les CGI scripts de scodoc.iutv.

API

  • last_stable_version : numéro de la dernière release "officielle"

  • upload_dump : réception (POST) d'un fichier de dump

  • version?mode=${mode}&release=${SCODOC_RELEASE}&sn=${SN}" mode = install | upgrade release = current client release sn = client serial number returns: serial number

Installation

  1. Créer un utilisateur

adduser installmgr

  1. Cloner le dépot

cd /opt git clone https://scodoc.org/git/viennet/installmgr.git chown -R installmgr installmgr

  1. Créer l'environnement

su - installmgr cd /opt/installmgr python3 -m venv venv source venv/bin/activate pip install wheel pip install -r requirements.txt

  1. Créer les répertoires

mkdir incoming_dumps

et éventuellement:

echo 1000 > counter

  1. Configurer nginx

location /scodoc-installmgr { # forward application requests to the gunicorn server proxy_pass http://localhost:8010; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; proxy_connect_timeout 120; client_max_body_size 100m; }

  1. Installer le service

cp etc/installmgr.service /etc/systemd/system/ systemctl daemon-reload systemctl start installmgr

  1. Tester

Depuis un client extérieur,

http https://scodoc.org/scodoc-installmgr/last_stable_version