feat: migration vers cosma-vm (.83) — dispatcher+dashboard, OpenVPN, docs infra mis à jour

This commit is contained in:
Flag
2026-04-24 00:16:21 +00:00
parent c765e8cc40
commit 4eb9f22813
8 changed files with 235 additions and 274 deletions

View File

@@ -6,49 +6,68 @@ Réseau LAN — 192.168.0.0/24
.. code-block:: text
┌─────────────────────────────────────────────────────────┐
│ LAN 192.168.0.0/24 │
│ │
│ .82 CORE Dispatcher (systemd) + FastAPI :3849
Gitea + Grafana + InfluxDB + Caddy
│ │
│ .84 ml-stack GPU worker RTX 3090 24GB
.87 gpu GPU worker RTX 3060 12GB
.168 z620 Proxmox host HP Z620
SSD → /mnt/portablessd (MP4 bruts)
└─────────────────────────────────────────────────────────┘
┌───────────────────────────────────────────────────────────────
LAN 192.168.0.0/24
│ .82 CORE Gitea + Grafana + InfluxDB + Caddy
Reverse-proxy → cosma-vm pour /cosma-qc
│ .83 cosma-vm Dispatcher cosma-qc (systemd)
Dashboard FastAPI :3849
OpenVPN server :1194 UDP
.84 ml-stack GPU worker RTX 3090 24GB
│ .87 gpu GPU worker RTX 3060 12GB │
│ │
│ .168 z620 Proxmox host HP Z620 — SSD MP4 bruts │
│ .101 poxML Proxmox hyperviseur — héberge cosma-vm (VM 202)│
└───────────────────────────────────────────────────────────────┘
Nœud core (.82)
----------------
Nœud cosma-vm (.83) — serveur principal cosma-qc
--------------------------------------------------
**Rôle :** orchestrateur central du pipeline.
VM #202 sur Proxmox poxML (.101). 4 vCPU, 4 GB RAM, 40 GB SSD.
User : ``cosma`` (avec docker group et sudo).
Services actifs :
Services :
- **Dispatcher**service systemd cosma-qc-dispatcher.
Boucle principale qui dispatch les jobs aux workers GPU.
- **Dispatcher**``cosma-qc-dispatcher.service`` (systemd)
Lance les extractions ffmpeg sur les workers GPU.
- **Dashboard FastAPI** — conteneur Docker exposé sur le port **3849**.
Interface web de monitoring des jobs.
- **Dashboard FastAPI** — conteneur Docker ``cosma-qc-app``, port **3849**.
Accès via Caddy sur core : ``http://192.168.0.82/cosma-qc``
- **Gitea** — dépôt source floppyrj45/cosma-qc.
- **Grafana / InfluxDB** — monitoring infrastructure.
- **OpenVPN**``openvpn-server@cosma.service``, port 1194 UDP.
Permet aux collègues daccéder au LAN depuis lextérieur.
Commandes utiles :
.. code-block:: bash
# SSH vers cosma-vm
ssh cosma@192.168.0.83
# Statut dispatcher
sudo systemctl status cosma-qc-dispatcher
# Logs dispatcher temps réel
sudo journalctl -u cosma-qc-dispatcher -f
# Logs dispatcher
tail -f /home/cosma/cosma-qc-data/dispatcher.log
# Dashboard
http://192.168.0.82:3849
# Dashboard local
http://192.168.0.83:3849
Nœud core (.82)
----------------
**Rôle :** routeur et services communs.
Services actifs :
- **Caddy** — reverse proxy HTTPS, route ``/cosma-qc`` vers .83:3849.
- **Gitea** — dépôt source ``floppyrj45/cosma-qc``.
- **Grafana / InfluxDB** — monitoring infrastructure.
Nœuds GPU workers (.84 et .87)
@@ -59,7 +78,7 @@ Nœuds GPU workers (.84 et .87)
:widths: 15 25 20 40
* - IP
- Nom
- Nom SSH
- GPU
- VRAM
* - .84
@@ -71,83 +90,46 @@ Nœuds GPU workers (.84 et .87)
- RTX 3060
- 12 GB
**Rôle :** exécution de ffmpeg (extraction frames) et lingbot-map (reconstruction 3D).
Répertoire de travail sur chaque worker :
**Rôle :** exécution de ffmpeg et lingbot-map.
.. code-block:: text
/cosma-qc-frames/
── job_1/
├── frame_000001.jpg … frame_NNNNNN.jpg
├── .video_0.done
├── reconstruction.ply
└── reconstruction.glb (généré à la demande)
├── job_2/
│ └── …
└── stitch_1.ply
── job_N/
├── frame_NNNNNN.jpg
├── .video_V.done
├── reconstruction.ply
└── reconstruction.glb
Nœud z620 (.168)
-----------------
Nœud z620 (.168) — stockage MP4
----------------------------------
**Rôle :** stockage des MP4 bruts GoPro.
HP Z620 (Proxmox). SSD /mnt/portablessd avec les MP4 GoPro bruts.
Les MP4 **ne quittent jamais** z620 — ffmpeg sy exécute via SSH-relay.
- Proxmox host HP Z620.
- SSD monté sur /mnt/portablessd.
- Les MP4 **ne quittent jamais** z620 — ffmpeg s'y exécute via SSH.
Accès SSH depuis core :
SSH relay (depuis cosma-vm ou core) :
.. code-block:: bash
ssh floppyrj45@192.168.0.168
ssh ml-stack "ssh z620 \\"commande\\""
Service systemd dispatcher
---------------------------
OpenVPN — accès collègues
--------------------------
Fichier de service : /etc/systemd/system/cosma-qc-dispatcher.service
Serveur OpenVPN sur cosma-vm (.83:1194 UDP).
Adresse externe : ``laboratoire.freeboxos.fr:1194``
.. code-block:: ini
Profil client : ``cosma-qc-collegue1.ovpn`` (Nextcloud sync).
[Unit]
Description=COSMA QC Dispatcher
After=network.target
[Service]
User=floppyrj45
WorkingDirectory=/home/floppyrj45/docker/cosma-qc
ExecStart=/usr/bin/python3 app/dispatcher.py
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Commandes de gestion :
Génération dun nouveau client :
.. code-block:: bash
sudo systemctl start cosma-qc-dispatcher
sudo systemctl stop cosma-qc-dispatcher
sudo systemctl restart cosma-qc-dispatcher
sudo systemctl enable cosma-qc-dispatcher # démarrage auto
Conteneur Docker dashboard
---------------------------
Le dashboard FastAPI tourne dans un conteneur Docker.
.. code-block:: bash
cd /home/floppyrj45/docker/cosma-qc
docker compose up -d # démarrer
docker compose down # arrêter
docker compose logs -f # logs
Accès : http://192.168.0.82:3849
cd /home/cosma/openvpn-ca/easyrsa3
./easyrsa gen-req NOMCLIENT nopass
./easyrsa sign-req client NOMCLIENT
Ports réseau récapitulatifs
@@ -160,12 +142,16 @@ Ports réseau récapitulatifs
* - Host
- Port
- Service
* - .82
* - .83
- 3849
- Dashboard FastAPI cosma-qc
* - .83
- 1194/udp
- OpenVPN server
* - .84 / .87
- 8100+N
- Viser viewer (reconstruction job N)
- Viser viewer (job N)
* - .84 / .87
- 8300
- HTTP server GLB export
- HTTP server GLB/PLY export