refactor(docker): separate core and optional compose services
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Successful in 13m35s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 6m28s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 8m24s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 3s
Heimdall Gitea / Detect CI scope (pull_request) Successful in 5s
Heimdall Gitea / Build and tests (pull_request) Successful in 13m35s
Heimdall Gitea / Publish versioned release (pull_request) Skipped
Heimdall Gitea / Build and scan agent image (pull_request) Successful in 6m28s
Heimdall Gitea / Build and scan server image (pull_request) Successful in 8m24s
Heimdall Gitea / Publish Docker Hub latest tags (pull_request) Skipped
Heimdall Gitea / CI policy (pull_request) Successful in 3s
This commit is contained in:
1 parent
25dc4869d2
commit
88033e8e26
25 files changed
+507
-714
No files matched your search
+17
-102
@@ -1238,18 +1238,15 @@ Phase 11 — Hangfire Foundation + Jobs Multi-Site
|
||||
│ → C'EST L'OBJECTIF DE L'ÉTAPE 1 │
|
||||
└──────────────────────────────────────────────────────────────────┘
|
||||
|
||||
Phase 12 — Agent Foundation (Docker-only)
|
||||
├── Docker-only : heimdall/agent:latest
|
||||
Phase 12 — Agent Foundation (multi-format installation)
|
||||
├── Images Agent configurées par docker/agent-image.json
|
||||
├── Installation Linux native via install/install-agent.sh et systemd
|
||||
├── Compose Docker généré dans l'IHM depuis le manifeste signé Central
|
||||
├── AgentRegistrationService (register via API au premier démarrage)
|
||||
├── HeartbeatSenderJob (Hangfire InMemory Central, 30s)
|
||||
├── Agent → Central : API Key auth (X-Api-Key header)
|
||||
├── Central → Agent : heartbeat OK renouvelle le statut Online
|
||||
├── docker-compose.yml minimal pour l'Agent :
|
||||
│ docker run -e HEIMDALL_CENTRAL_URL=https://central.example.com \
|
||||
│ -e HEIMDALL_SITE_TOKEN=abc123def456 \
|
||||
│ -e HEIMDALL_API_KEY=heimdall_sk_abc123def456 \
|
||||
│ -e HEIMDALL_AGENT_NAME=agent-paris-01 \
|
||||
│ heimdall/agent:latest
|
||||
├── L'Agent Docker utilise le réseau hôte pour accéder au LAN des caméras
|
||||
├── Verify: Agent démarre → register → heartbeat 30s
|
||||
│
|
||||
✅ Fonctionnel à la fin de cette phase :
|
||||
@@ -2115,104 +2112,22 @@ Plan détaillé : docs/pwa.md
|
||||
|
||||
## PARTIE 11 : Déploiement Docker
|
||||
|
||||
### 11.1 docker-compose.yml (production)
|
||||
### 11.1 Compose de déploiement
|
||||
|
||||
> **L'Agent est distribué EXCLUSIVEMENT via Docker.** Pas de binaire standalone,
|
||||
> pas d'installation manuelle. La commande Docker est générée par l'UI Admin
|
||||
> avec le token et l'API Key pré-remplis : `docker run -e HEIMDALL_SITE_TOKEN=... -e HEIMDALL_API_KEY=... heimdall/agent:latest`.
|
||||
|
||||
```yaml
|
||||
services:
|
||||
heimdall-central:
|
||||
image: heimdall/central:latest
|
||||
ports:
|
||||
- "5000:5000" # HTTPS
|
||||
environment:
|
||||
- ConnectionStrings__PostgreSQL=Server=postgresql;Database=heimdall;...
|
||||
- ConnectionStrings__Hangfire=Server=postgresql;Database=heimdall_hangfire;...
|
||||
- ConnectionStrings__Redis=redis:6379
|
||||
- S3 endpoint: http://rustfs:9000 (même API S3)
|
||||
# L'IA est exécutée par les agents (ONNX Runtime) — plus de service central
|
||||
- Ollama__Endpoint=http://ollama:11434
|
||||
- Coturn__Url=turns:coturn:3478
|
||||
- Coturn__Secret=${COTURN_SECRET}
|
||||
volumes:
|
||||
- dataprotection_keys:/root/.aspnet/DataProtection-Keys
|
||||
secrets:
|
||||
- jwt_signing_key
|
||||
- coturn_secret
|
||||
- smtp_password
|
||||
|
||||
heimdall-agent:
|
||||
image: heimdall/agent:latest
|
||||
environment:
|
||||
- HEIMDALL_CENTRAL_URL=https://heimdall-central:5000
|
||||
- HEIMDALL_SITE_TOKEN=${HEIMDALL_SITE_TOKEN}
|
||||
- HEIMDALL_API_KEY=${HEIMDALL_API_KEY}
|
||||
- HEIMDALL_AGENT_NAME=${HEIMDALL_AGENT_NAME}
|
||||
volumes:
|
||||
- /dev/dri:/dev/dri # GPU Intel/AMD (optionnel)
|
||||
- /tmp/heimdall:/tmp/heimdall # Cache snapshots local
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: all
|
||||
capabilities: [gpu]
|
||||
depends_on:
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
rustfs:
|
||||
condition: service_started
|
||||
|
||||
postgresql:
|
||||
image: postgres:17
|
||||
environment:
|
||||
POSTGRES_USER: heimdall
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: heimdall
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U heimdall"]
|
||||
ports:
|
||||
- "5432:5432"
|
||||
|
||||
rustfs:
|
||||
image: rustfs/rustfs:latest
|
||||
ports:
|
||||
- "9000:9000" # S3 API
|
||||
- "9001:9001" # Console
|
||||
environment:
|
||||
RUSTFS_VOLUMES: /data
|
||||
RUSTFS_ADDRESS: 0.0.0.0:9000
|
||||
RUSTFS_CONSOLE_ADDRESS: 0.0.0.0:9001
|
||||
RUSTFS_CONSOLE_ENABLE: "true"
|
||||
RUSTFS_ACCESS_KEY: ${RUSTFS_ACCESS_KEY}
|
||||
RUSTFS_SECRET_KEY: ${RUSTFS_SECRET_KEY}
|
||||
volumes:
|
||||
- rustfs_data:/data
|
||||
|
||||
coturn:
|
||||
image: coturn/coturn:4.6
|
||||
command: >
|
||||
-n --use-auth-secret
|
||||
--static-auth-secret=${COTURN_SECRET}
|
||||
--realm=heimdall.local
|
||||
--fingerprint
|
||||
--no-tlsv1
|
||||
--no-tlsv1_1
|
||||
network_mode: host # nécessaire pour TURN (ports UDP)
|
||||
```
|
||||
La configuration déployable est maintenue dans `docker/` et décrite dans
|
||||
[docker-compose.md](docker-compose.md). Le noyau obligatoire contient
|
||||
uniquement Central et PostgreSQL (`docker-compose.prod.yml`). Les Agents ont
|
||||
un Compose autonome (`docker-compose.agent.yml`); le parcours recommandé est
|
||||
le Compose généré par l'IHM, épinglé au digest du manifeste signé Central.
|
||||
RustFS, ntfy, Ollama, Coturn, Redis et les sauvegardes disposent chacun d'un
|
||||
Compose facultatif. Les overlays GPU ciblent uniquement les Agents et
|
||||
n'activent pas l'inférence ONNX GPU dans l'image publiée.
|
||||
|
||||
### 11.2 GPU Passthrough
|
||||
|
||||
| Conteneur | GPU | Docker Compose |
|
||||
|---|---|---|
|
||||
| agent GPU | NVIDIA/AMD/Intel | profiles compose GPU (nvidia/rocm/vaapi) — cf. docker |
|
||||
| `heimdall-agent` | NVIDIA/Intel/AMD | `--gpus all` ou `/dev/dri:/dev/dri` |
|
||||
| `ollama` | NVIDIA (optionnel) | `--gpus all` |
|
||||
Les fichiers `docker-compose.gpu-*.yml` exposent le matériel au Compose Agent
|
||||
pour l'inventaire seulement. L'image Agent publiée embarque le fournisseur ONNX
|
||||
CPU; l'inférence GPU nécessite encore une image et un runtime dédiés.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in new issue
Block a user