From 189d80253b05adf8ac358f32b9e71fb6296b40a7 Mon Sep 17 00:00:00 2001 From: Arnaud Dartois Date: Tue, 27 Oct 2026 19:02:58 +0100 Subject: [PATCH] feat(install): support online server setup on Linux and Windows --- docker/docker-compose.backup.yml | 7 +- docs/docker-compose.md | 36 ++++- install/install-server.ps1 | 248 +++++++++++++++++++++++++++++++ install/install-server.sh | 34 ++++- readme.md | 47 ++++-- todo.md | 3 +- 6 files changed, 344 insertions(+), 31 deletions(-) create mode 100644 install/install-server.ps1 diff --git a/docker/docker-compose.backup.yml b/docker/docker-compose.backup.yml index 4972d4c..0de539b 100644 --- a/docker/docker-compose.backup.yml +++ b/docker/docker-compose.backup.yml @@ -33,10 +33,9 @@ services: apk add --no-cache curl bash >/dev/null 2>&1 || true curl -fsSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc || true chmod +x /usr/local/bin/mc 2>/dev/null || true - chmod +x /scripts/*.sh - echo '0 2 * * * /scripts/backup.sh >> /var/log/backup.log 2>&1' > /tmp/crontab.txt - echo '15 2 * * * /scripts/backup-protected-data.sh >> /var/log/backup-protected-data.log 2>&1' >> /tmp/crontab.txt - echo '0 3 * * 0 /scripts/backup-rustfs.sh >> /var/log/backup-rustfs.log 2>&1' >> /tmp/crontab.txt + echo '0 2 * * * bash /scripts/backup.sh >> /var/log/backup.log 2>&1' > /tmp/crontab.txt + echo '15 2 * * * bash /scripts/backup-protected-data.sh >> /var/log/backup-protected-data.log 2>&1' >> /tmp/crontab.txt + echo '0 3 * * 0 bash /scripts/backup-rustfs.sh >> /var/log/backup-rustfs.log 2>&1' >> /tmp/crontab.txt crontab /tmp/crontab.txt exec crond -f -l 2 diff --git a/docs/docker-compose.md b/docs/docker-compose.md index e68600f..56f1add 100644 --- a/docs/docker-compose.md +++ b/docs/docker-compose.md @@ -7,21 +7,41 @@ Redis and scheduled backups have separate Compose files and can be left out. ## Central and database -For a new Linux server, clone this repository and launch the interactive -installer from its root: +For a new Linux server, run the interactive installer directly from the source +repository; cloning the repository is not required: -```sh -git clone https://sources.tordais.cc/arnaud.dartois/Heimdall.git -cd Heimdall -./install/install-server.sh +```bash +curl -fsSL https://sources.tordais.cc/arnaud.dartois/Heimdall/raw/branch/main/install/install-server.sh | bash ``` The installer uses the server image `eltruncho/heimdall:latest` from Docker Hub, creates a minimal Central + PostgreSQL Compose project, generates PostgreSQL and JWT secrets, and writes them to a mode-600 `.env` and secret file in the chosen installation directory. It asks which optional services to prepare and -whether to start each one. Integration URLs and credentials remain configured -in Central's UI. Review the generated files before starting the stack. +whether to start each one. Selected optional Compose files and backup scripts +are fetched individually; no repository checkout is created. Integration URLs +and credentials remain configured in Central's UI. The script requires an +interactive terminal and reads prompts from it even when downloaded with a +pipe. + +On Windows 10/11 with Docker Desktop in Linux-container mode, use PowerShell to +download and run the matching installer without cloning the repository: + +```powershell +$installer = Join-Path $env:TEMP 'heimdall-install-server.ps1' +Invoke-WebRequest -UseBasicParsing -Uri 'https://sources.tordais.cc/arnaud.dartois/Heimdall/raw/branch/main/install/install-server.ps1' -OutFile $installer +Set-ExecutionPolicy -Scope Process Bypass -Force +& $installer +Remove-Item $installer +``` + +The execution-policy bypass applies only to the current PowerShell process; a +Group Policy can still block script execution. Both installers generate secrets +locally and keep them in the selected installation directory. To pin a reviewed +revision, download the installer from that revision and set +`HEIMDALL_SOURCE_BASE_URL` to its `raw/commit/` URL before running it; the +variable also selects the optional Compose and backup files fetched by the +installer. An offline installation must also provide those selected assets. The repository's `docker/docker-compose.prod.yml` is a manual alternative for operators who need a custom layout. It does not use files generated by the diff --git a/install/install-server.ps1 b/install/install-server.ps1 new file mode 100644 index 0000000..aaff38f --- /dev/null +++ b/install/install-server.ps1 @@ -0,0 +1,248 @@ +[CmdletBinding()] +param() + +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$script:SourceBaseUrl = if ($env:HEIMDALL_SOURCE_BASE_URL) { + $env:HEIMDALL_SOURCE_BASE_URL.TrimEnd('/') +} else { + 'https://sources.tordais.cc/arnaud.dartois/Heimdall/raw/branch/main' +} + +function Read-Answer { + param([string]$Prompt, [string]$Default) + $answer = Read-Host "$Prompt [$Default]" + if ([string]::IsNullOrWhiteSpace($answer)) { return $Default } + return $answer.Trim() +} + +function Read-YesNo { + param([string]$Prompt, [string]$Default = 'n') + return (Read-Answer -Prompt $Prompt -Default $Default) -match '^(?i:o|oui|y|yes)$' +} + +function New-RandomHex { + param([int]$ByteCount = 32) + $bytes = [byte[]]::new($ByteCount) + $rng = [System.Security.Cryptography.RandomNumberGenerator]::Create() + try { $rng.GetBytes($bytes) } finally { $rng.Dispose() } + return [BitConverter]::ToString($bytes).Replace('-', '').ToLowerInvariant() +} + +function Set-PrivateAcl { + param([string]$Path, [bool]$IsDirectory = $false) + $identity = [System.Security.Principal.WindowsIdentity]::GetCurrent().Name + $acl = Get-Acl -LiteralPath $Path + $acl.SetAccessRuleProtection($true, $false) + foreach ($rule in @($acl.Access)) { [void]$acl.RemoveAccessRuleAll($rule) } + $inheritance = if ($IsDirectory) { + [System.Security.AccessControl.InheritanceFlags]::ContainerInherit -bor + [System.Security.AccessControl.InheritanceFlags]::ObjectInherit + } else { [System.Security.AccessControl.InheritanceFlags]::None } + $rule = [System.Security.AccessControl.FileSystemAccessRule]::new( + $identity, + [System.Security.AccessControl.FileSystemRights]::FullControl, + $inheritance, + [System.Security.AccessControl.PropagationFlags]::None, + [System.Security.AccessControl.AccessControlType]::Allow) + [void]$acl.AddAccessRule($rule) + Set-Acl -LiteralPath $Path -AclObject $acl +} + +function Get-SourceAsset { + param([string]$RelativePath, [string]$DestinationPath) + $assetUri = "$script:SourceBaseUrl/$RelativePath" + Invoke-WebRequest -UseBasicParsing -Uri $assetUri -OutFile $DestinationPath -TimeoutSec 60 +} + +function Invoke-DockerCompose { + param([string[]]$ComposeArguments) + & docker compose @ComposeArguments + if ($LASTEXITCODE -ne 0) { throw "docker compose a échoué (code $LASTEXITCODE)." } +} + +if ([Environment]::OSVersion.Platform -ne [PlatformID]::Win32NT) { + throw 'Cet installateur est prévu pour Windows PowerShell ou PowerShell sous Windows.' +} +if (-not (Get-Command docker -ErrorAction SilentlyContinue)) { throw 'Docker est requis.' } +& docker compose version | Out-Null +if ($LASTEXITCODE -ne 0) { throw 'Le plugin Docker Compose est requis.' } + +Write-Host 'Installation de Heimdall Central (serveur + PostgreSQL).' +$defaultDestination = Join-Path $HOME 'heimdall' +$destination = [IO.Path]::GetFullPath((Read-Answer "Dossier d’installation" $defaultDestination)) +$webPortText = Read-Answer 'Port HTTP du serveur' '5000' +$corsOrigin = Read-Answer 'Origine(s) autorisée(s) par CORS' '*' +$webPort = 0 +if (-not [int]::TryParse($webPortText, [ref]$webPort) -or $webPort -lt 1 -or $webPort -gt 65535) { + throw 'Port invalide.' +} +if ($corsOrigin -notmatch '^[A-Za-z0-9*.,:/_-]+$') { throw 'Origine CORS invalide.' } +if ((Test-Path -LiteralPath (Join-Path $destination 'docker-compose.yml')) -or + (Test-Path -LiteralPath (Join-Path $destination '.env'))) { + throw "Le dossier contient déjà une installation Heimdall; aucun fichier n’a été remplacé." +} + +$null = New-Item -ItemType Directory -Path $destination -Force +$secretsDirectory = Join-Path $destination 'secrets' +$optionalDirectory = Join-Path $destination 'optional' +$optionalSecretsDirectory = Join-Path $optionalDirectory 'secrets' +$null = New-Item -ItemType Directory -Path $secretsDirectory -Force +$null = New-Item -ItemType Directory -Path $optionalSecretsDirectory -Force +Set-PrivateAcl -Path $destination -IsDirectory $true +Set-PrivateAcl -Path $secretsDirectory -IsDirectory $true +Set-PrivateAcl -Path $optionalDirectory -IsDirectory $true +Set-PrivateAcl -Path $optionalSecretsDirectory -IsDirectory $true + +$dbPassword = New-RandomHex +$jwtKey = New-RandomHex +$jwtRefreshKey = New-RandomHex +$dbPasswordPath = Join-Path $secretsDirectory 'db_password' +[IO.File]::WriteAllText($dbPasswordPath, $dbPassword, [Text.Encoding]::ASCII) +Set-PrivateAcl -Path $dbPasswordPath + +$envContent = @" +POSTGRES_DB=heimdall +POSTGRES_USER=heimdall +DATABASE_URL=Host=postgresql;Port=5432;Database=heimdall;Username=heimdall;Password=$dbPassword +JWT__KEY=$jwtKey +JWT__REFRESHKEY=$jwtRefreshKey +JWT__ISSUER=heimdall +JWT__AUDIENCE=heimdall-api +ASPNETCORE_ENVIRONMENT=Production +WEB_PORT=$webPort +Cors__AllowedOrigins=$corsOrigin +TZ=Europe/Paris +REDIS_PASSWORD=$(New-RandomHex) +HEIMDALL_DATA_VOLUME=heimdall_heimdall_data +"@ +$envPath = Join-Path $destination '.env' +[IO.File]::WriteAllText($envPath, $envContent.TrimStart("`r", "`n"), [Text.Encoding]::ASCII) +Set-PrivateAcl -Path $envPath + +$composeContent = @' +name: heimdall + +services: + postgresql: + image: postgres:17-alpine + environment: + POSTGRES_DB: ${POSTGRES_DB} + POSTGRES_USER: ${POSTGRES_USER} + POSTGRES_PASSWORD_FILE: /run/secrets/db_password + secrets: [db_password] + volumes: [pgdata:/var/lib/postgresql/data] + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + restart: unless-stopped + networks: [heimdall-net] + + heimdall: + image: eltruncho/heimdall:latest + environment: + DATABASE_URL: ${DATABASE_URL:?missing DATABASE_URL} + JWT__Issuer: ${JWT__ISSUER} + JWT__Audience: ${JWT__AUDIENCE} + JWT__KEY: ${JWT__KEY:?missing JWT__KEY} + JWT__REFRESHKEY: ${JWT__REFRESHKEY:?missing JWT__REFRESHKEY} + ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT} + ASPNETCORE_URLS: http://+:8080 + Cors__AllowedOrigins: ${Cors__AllowedOrigins} + ports: ["${WEB_PORT}:8080"] + volumes: + - heimdall_data:/var/lib/heimdall + - heimdall_data:/app/data + depends_on: + postgresql: + condition: service_healthy + healthcheck: + test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8080/healthz"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 60s + restart: unless-stopped + networks: [heimdall-net] + +volumes: + pgdata: + heimdall_data: + +secrets: + db_password: + file: ./secrets/db_password + +networks: + heimdall-net: + name: heimdall-net + driver: bridge +'@ +$composePath = Join-Path $destination 'docker-compose.yml' +[IO.File]::WriteAllText($composePath, $composeContent, [Text.Encoding]::ASCII) +Set-PrivateAcl -Path $composePath + +$selected = [Collections.Generic.List[string]]::new() +foreach ($service in @('ollama', 'ntfy', 'rustfs', 'coturn', 'redis', 'backup')) { + $prompt = if ($service -eq 'backup') { + 'Activer les sauvegardes planifiées (nécessite une configuration dédiée) ?' + } else { "Installer le service optionnel $service ?" } + if (Read-YesNo $prompt) { + $selected.Add($service) + $assetPath = Join-Path $optionalDirectory "docker-compose.$service.yml" + Get-SourceAsset "docker/docker-compose.$service.yml" $assetPath + Set-PrivateAcl -Path $assetPath + } +} + +Write-Host "Compose généré dans $composePath" +Write-Host "Variables protégées dans $envPath et secret PostgreSQL dans secrets (ACL utilisateur uniquement)." +Write-Host 'Validation du Compose avant démarrage…' +Invoke-DockerCompose @('--env-file', $envPath, '-f', $composePath, 'config', '--quiet') +$startCore = Read-YesNo 'Démarrer PostgreSQL et Heimdall maintenant ?' 'o' +if ($startCore) { + Invoke-DockerCompose @('--env-file', $envPath, '-f', $composePath, 'up', '-d') +} + +foreach ($service in $selected) { + switch ($service) { + 'rustfs' { + $accessKeyPath = Join-Path $optionalSecretsDirectory 'rustfs_access_key' + $secretKeyPath = Join-Path $optionalSecretsDirectory 'rustfs_secret_key' + [IO.File]::WriteAllText($accessKeyPath, "heimdall$(New-RandomHex 8)", [Text.Encoding]::ASCII) + [IO.File]::WriteAllText($secretKeyPath, (New-RandomHex), [Text.Encoding]::ASCII) + Set-PrivateAcl $accessKeyPath + Set-PrivateAcl $secretKeyPath + } + 'coturn' { + $coturnSecretPath = Join-Path $optionalSecretsDirectory 'coturn_secret' + [IO.File]::WriteAllText($coturnSecretPath, (New-RandomHex), [Text.Encoding]::ASCII) + Set-PrivateAcl $coturnSecretPath + } + 'backup' { + $backupScriptsPath = Join-Path $optionalDirectory 'scripts' + $null = New-Item -ItemType Directory -Path $backupScriptsPath -Force + Set-PrivateAcl -Path $backupScriptsPath -IsDirectory $true + foreach ($name in @('backup.sh', 'backup-protected-data.sh', 'backup-rustfs.sh', 'restore.sh', 'restore-protected-data.sh')) { + $assetPath = Join-Path $backupScriptsPath $name + Get-SourceAsset "docker/scripts/$name" $assetPath + Set-PrivateAcl -Path $assetPath + } + $backupDbPassword = Join-Path $optionalSecretsDirectory 'db_password' + Copy-Item -LiteralPath $dbPasswordPath -Destination $backupDbPassword + Set-PrivateAcl -Path $backupDbPassword + } + } + if ($startCore -and (Read-YesNo "Démarrer le service optionnel $service ?" 'o')) { + Invoke-DockerCompose @('--project-name', "heimdall-$service", '--env-file', $envPath, + '-f', (Join-Path $optionalDirectory "docker-compose.$service.yml"), 'up', '-d') + } else { + Write-Host "Service $service préparé dans $optionalDirectory." + } +} + +Write-Host "Configurez ensuite les intégrations activées depuis les paramètres de Central; leurs valeurs restent gérées par l’IHM." diff --git a/install/install-server.sh b/install/install-server.sh index fd5dc6a..80c6402 100755 --- a/install/install-server.sh +++ b/install/install-server.sh @@ -2,23 +2,41 @@ set -euo pipefail readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" -readonly REPO_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)" +readonly SOURCE_BASE_URL="${HEIMDALL_SOURCE_BASE_URL:-https://sources.tordais.cc/arnaud.dartois/Heimdall/raw/branch/main}" +REPO_ROOT="" +if [[ -f "${SCRIPT_DIR}/../docker/docker-compose.ollama.yml" ]]; then + REPO_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)" +fi say() { printf '%s\n' "$*"; } ask() { local prompt="$1" default="$2" answer - read -r -p "${prompt} [${default}] " answer + if [[ -r /dev/tty && -w /dev/tty ]]; then + read -r -p "${prompt} [${default}] " answer &2 exit 2 fi -for command in docker python3 openssl; do +for command in docker openssl curl; do command -v "$command" >/dev/null || { echo "Commande requise absente : $command" >&2; exit 1; } done docker compose version >/dev/null +copy_source_asset() { + local relative_path="$1" destination_path="$2" + if [[ -n "$REPO_ROOT" && -f "$REPO_ROOT/$relative_path" ]]; then + cp "$REPO_ROOT/$relative_path" "$destination_path" + else + curl --fail --silent --show-error --location \ + "$SOURCE_BASE_URL/$relative_path" --output "$destination_path" + fi +} + say "Installation de Heimdall Central (serveur + PostgreSQL)." destination="$(ask 'Dossier d’installation' "$HOME/heimdall")" web_port="$(ask 'Port HTTP du serveur' '5000')" @@ -129,7 +147,8 @@ for service in ollama ntfy rustfs coturn redis backup; do fi if [[ "$(ask "$prompt" 'n')" =~ ^([oO]|[oO][uU][iI]|[yY]|[yY][eE][sS])$ ]]; then selected+=("$service") - cp "$REPO_ROOT/docker/docker-compose.${service}.yml" "$destination/optional/" + copy_source_asset "docker/docker-compose.${service}.yml" \ + "$destination/optional/docker-compose.${service}.yml" chmod 600 "$destination/optional/docker-compose.${service}.yml" fi done @@ -157,7 +176,10 @@ for service in "${selected[@]}"; do ;; backup) mkdir -p "$destination/optional/scripts" - cp "$REPO_ROOT"/docker/scripts/backup*.sh "$REPO_ROOT"/docker/scripts/restore*.sh "$destination/optional/scripts/" + for script_name in backup.sh backup-protected-data.sh backup-rustfs.sh restore.sh restore-protected-data.sh; do + copy_source_asset "docker/scripts/$script_name" \ + "$destination/optional/scripts/$script_name" + done chmod 700 "$destination/optional/scripts" "$destination/optional/scripts"/*.sh cp "$destination/secrets/db_password" "$destination/optional/secrets/db_password" chmod 600 "$destination/optional/secrets/db_password" diff --git a/readme.md b/readme.md index dfd610a..a14c3dd 100644 --- a/readme.md +++ b/readme.md @@ -35,22 +35,44 @@ Heimdall.Web (Api + Blazor UI) Heimdall.Agent ## Démarrage rapide -### 1. Production : installer le Central sur Linux +### 1. Production : installer le Central sans cloner le dépôt -Prérequis : Git, Docker Engine avec le plugin Compose, Python 3 et OpenSSL. Le -compte qui lance l’installateur doit pouvoir utiliser Docker. +Prérequis Linux : Docker Engine avec le plugin Compose, OpenSSL et curl; le +compte doit pouvoir utiliser Docker. La commande télécharge et exécute le script +interactif directement depuis le dépôt : ```bash -git clone https://sources.tordais.cc/arnaud.dartois/Heimdall.git -cd Heimdall -./install/install-server.sh +curl -fsSL https://sources.tordais.cc/arnaud.dartois/Heimdall/raw/branch/main/install/install-server.sh | bash ``` -L’installateur interactif crée le Compose Central + PostgreSQL, le fichier -`.env` protégé et le secret de base de données. Il demande le port HTTP, les -origines CORS et quels services facultatifs préparer ou démarrer. L’image -Central vient de Docker Hub. Les paramètres applicatifs et intégrations se -configurent ensuite dans l’IHM; voir le [guide de déploiement](docs/docker-compose.md). +L’installateur demande un terminal interactif et lit ses réponses directement +depuis le terminal. Il crée le Compose Central + PostgreSQL, le `.env` protégé +et le secret de base de données; les Compose et scripts facultatifs sont +téléchargés seulement si tu les sélectionnes. L’image Central vient de Docker +Hub. Les paramètres applicatifs et intégrations se configurent ensuite dans +l’IHM. + +Sur Windows 10/11 avec Docker Desktop configuré en conteneurs Linux, ouvre +PowerShell avec les droits nécessaires pour utiliser Docker et lance : + +```powershell +$installer = Join-Path $env:TEMP 'heimdall-install-server.ps1' +Invoke-WebRequest -UseBasicParsing -Uri 'https://sources.tordais.cc/arnaud.dartois/Heimdall/raw/branch/main/install/install-server.ps1' -OutFile $installer +Set-ExecutionPolicy -Scope Process Bypass -Force +& $installer +Remove-Item $installer +``` + +Le contournement PowerShell est limité au processus courant. Une stratégie +imposée par une GPO peut toujours interdire l’exécution. Les deux installateurs +génèrent les secrets localement et ne les envoient pas au dépôt. Pour installer +depuis une révision précise, télécharge l’installateur depuis cette révision et +définis `HEIMDALL_SOURCE_BASE_URL` sur son URL `raw/commit/` avant de le +lancer; cette valeur sert aussi à récupérer les Compose facultatifs. Une +installation sans accès Internet doit recevoir également les scripts Compose et +de sauvegarde choisis. + +Voir aussi le [guide de déploiement](docs/docker-compose.md). Une fois le serveur démarré, ouvrez `http://:5000` (ou le port choisi dans l’installateur). Choisissez une origine CORS correspondant à @@ -130,7 +152,8 @@ Le dossier `docker/` contient tout nécessaire pour déployer Heimdall : | `Dockerfile` | Build | Image Central (UI + API + jobs) | | `Dockerfile.agent` | Build | Image agent avec FFmpeg | | Docker Hub | Publication | Images `eltruncho/heimdall` et `eltruncho/heimdall-agent` | -| `install/install-server.sh` | Production Linux | Génère le Compose Central, le `.env` et le secret PostgreSQL hors du dépôt | +| `install/install-server.sh` | Production Linux | Génère le Compose Central, le `.env` et le secret PostgreSQL hors du dépôt; utilisable depuis le dépôt ou téléchargé en ligne | +| `install/install-server.ps1` | Production Windows | Même parcours interactif PowerShell, sans cloner le dépôt | Pour la production, utilisez l’installateur serveur interactif ci-dessus et les commandes/Compose Agent fournis par l’IHM. `docker-compose.prod.yml` reste disponible pour une configuration manuelle avancée; il exige que l’opérateur prépare correctement `.env` et `docker/secrets/db_password`. Aucun Compose Agent de production statique n’est conservé dans le dépôt. diff --git a/todo.md b/todo.md index 70fdd5c..07f11d8 100644 --- a/todo.md +++ b/todo.md @@ -28,6 +28,7 @@ Ce fichier remplace les rapports de `docs/audits/` et constitue le suivi courant - [ ] **OPS-02** Les PR #62, #63 et #106 protègent les références de caméras supprimées logiquement, enregistrent l'inventaire des destinations avant upload et font parcourir ces destinations par le nettoyage final. Le run PR #317 a passé les 284 tests Infrastructure, dont les scénarios de changement de destination (snapshot référencé conservé, puis orphelin supprimé) et de S3 historique inaccessible (références conservées). Restent les objets recording tant que FEAT-02 n'a pas de producteur, les lignes historiques sans provenance (ne pas deviner), et la validation du changement de provider sur stockage déployé. - [ ] **OPS-05 / AGENT-06** Les Compose sont simplifiés en un noyau Central + PostgreSQL, un Compose Agent de développement local et des Compose facultatifs séparés par logiciel. En production, le Compose Agent est fourni par l’IHM pour le site sélectionné; le Compose statique de production a été supprimé. La PR #114 retire du Compose les réglages métier (SMTP, ntfy, Ollama, stockage, source des releases et URL API) pour les gérer par l’IHM avec portée globale, en laissant les destinations de notification à leur portée site/utilisateur. La PR #117 ajoute l’installateur interactif Linux Central + PostgreSQL et fixe les images à Docker Hub; sa CI PR #394 a passé tests et scans des deux images ainsi que `CI policy`, puis a été fusionnée sur `main` (`d1f3f1a`). Restent l’installation des clés de signature CI et la validation réelle de la génération IHM, digest/signature Agent, mise à jour native/Docker, arrêt propre et rollback. - [ ] **Installateurs Agent / mises à jour façon Pangolin** La PR #120 ajoute les choix d’OS et méthodes supportés dans l’IHM, les commandes Bash/PowerShell qui téléchargent les scripts depuis Central, les installs natives Linux/Windows vérifiant signature et digest, le mode service, le rollback après contrôle de démarrage, le réglage global avec surcharge nullable de site, et les mises à jour natives après 24 h de stabilité (les conteneurs restent gérés par l’orchestrateur). La migration conserve les choix existants. La PR #127 rend la commande PowerShell compatible avec les postes `Restricted` en appliquant le contournement d’exécution à la session courante seulement; une GPO peut encore prévaloir. Le run PR #437 a passé tests/build, scans des deux images et `CI policy`. Restent les validations réelles d’installation, mise à jour et rollback sur hôtes Linux et Windows. +- [ ] **Installateur Central sans clone (Linux/Windows)** Les scripts `install/install-server.sh` et `install/install-server.ps1` peuvent être téléchargés depuis la branche `main` et exécutés directement; ils créent le Compose Central + PostgreSQL, les secrets locaux protégés et téléchargent seulement les Compose facultatifs choisis. L’installation PowerShell vise Windows 10/11 avec Docker Desktop configuré pour les conteneurs Linux. Restent à valider les deux commandes bootstrap sur des hôtes propres, le démarrage, les ACL Windows, les services facultatifs et l’absence de checkout du dépôt. - [ ] **AGENT-08** Valider reconnexion, remplacement atomique de configuration caméra et ACK persisté sur Agent déployé. - [ ] **AGENT-09** La PR #101 aligne `heimdall.ai.pipeline.level` sur les transitions réelles (inférence lente, moteur indisponible, saturation CPU et récupération), sans ratio cumulatif périmé. La PR #102 ajoute `heimdall.ai.inference.queue.depth` et `heimdall.ai.inference.queue.rejected` pour rendre visibles le backlog ONNX et les frames rejetées quand la file est pleine. Restent à mesurer les seuils de capture et la santé d'enregistrement sous panne caméra/modèle/disque, puis valider ces alertes sur matériel représentatif. - [ ] **AGENT-10** Tester charge, redémarrages rapides et arrêt FFmpeg/ONNX sous contrainte sur matériel représentatif. @@ -38,7 +39,7 @@ Ce fichier remplace les rapports de `docs/audits/` et constitue le suivi courant ## P2 — fonctionnalités et exploitation -- [x] **Installateur Linux serveur** La PR #117 ajoute `install/install-server.sh` : le script interactif génère le Compose minimal Central + PostgreSQL et un `.env` protégé avec secrets aléatoires, puis propose de préparer/démarrer les Compose des services optionnels. Il lit l’image fixe Docker Hub dans le script; les intégrations applicatives restent configurées dans l’IHM. La PR a passé syntaxe Bash, `git diff --check`, les suites CI, les builds/scans des deux images et `CI policy`, puis a été fusionnée sur `main` (`d1f3f1a`). Il reste à effectuer une installation réelle documentée sur un hôte Linux. +- [x] **Génération de l’installation Central** La PR #117 ajoute `install/install-server.sh` : le script interactif génère le Compose minimal Central + PostgreSQL et un `.env` protégé avec secrets aléatoires, puis propose de préparer/démarrer les Compose des services optionnels. Il lit l’image fixe Docker Hub dans le script; les intégrations applicatives restent configurées dans l’IHM. La PR a passé syntaxe Bash, `git diff --check`, les suites CI, les builds/scans des deux images et `CI policy`, puis a été fusionnée sur `main` (`d1f3f1a`). Les commandes bootstrap Bash/PowerShell sans clone et leur validation réelle sont suivies dans l’item P1 ci-dessus. - [ ] **PWA** PR #64 livre le manifeste, une icône SVG, l'enregistrement du service worker et une page hors connexion statique ; cache public limité à ces trois fichiers, sans mise en cache des données métier. Le fallback offline est exclu des navigations API/auth, hubs, Hangfire, métriques, santé et documentation technique. Le cycle de mise à jour propose un rechargement explicite après installation d'une nouvelle version (installation initiale silencieuse, sans actualisation automatique). Des icônes PNG 180/192/512 px sont maintenant déclarées pour Apple et les installateurs Android, avec tests de dimensions et de présence. Restent les validations appareils/HTTPS, reprise mobile, stratégie de rollback et Web Push par utilisateur/appareil. Ne jamais mettre les données privées en cache. - [ ] **FEAT-01** Définir codecs, spectateurs et budget latence ; implémenter live WebRTC/ICE/TURN, sessions autorisées, audio/PTZ compatibles et libération des ressources. Tester LAN et réseau externe. -- 2.54.1