fix(install): repair optional RustFS and coturn services (#320)
Heimdall Gitea / Detect CI scope (push) Successful in 5s
Heimdall Gitea / Build and tests (push) Successful in 21m1s
Heimdall Gitea / Build and scan server image (push) Skipped
Heimdall Gitea / Build and scan agent image (push) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Skipped
Heimdall Gitea / Publish versioned installer release (push) Skipped
Heimdall Gitea / CI policy (push) Successful in 3s
Heimdall Gitea / Detect CI scope (push) Successful in 5s
Heimdall Gitea / Build and tests (push) Successful in 21m1s
Heimdall Gitea / Build and scan server image (push) Skipped
Heimdall Gitea / Build and scan agent image (push) Skipped
Heimdall Gitea / Build and scan NVIDIA Agent image (push) Skipped
Heimdall Gitea / Publish versioned installer release (push) Skipped
Heimdall Gitea / CI policy (push) Successful in 3s
## Problème et résultat Refs #319 Les Compose optionnels utilisent maintenant les secrets sous `optional/secrets/`, comme les créent les deux installateurs serveur. Coturn lance explicitement `turnserver`, publie TCP/UDP 3478 et la plage UDP relay configurable 49160–49200 par défaut. La documentation explique les ports et le secret partagé. ## Vérification - `git diff --check` : réussi. - Recette Compose jetable `heimdall-accept-319-1c3c2bc3` : config des fichiers, démarrage RustFS et coturn, RustFS `/health` réussi, ports coturn publiés; teardown vérifié, conteneurs/volume/réseau absents. Aucun tag d’image local construit ou supprimé; images amont conservées. - Limites : création/accès S3 signé et allocation TURN authentifiée non validés. L’accès TURN externe derrière NAT et les parcours d’installateurs sur hôtes Linux/Windows restent hors de cette preuve. - Aucun run CI ni déploiement réel revendiqué. ## Livraison - Revue des changements Compose et du contrat des secrets faite. - Issue #319 reste ouverte pour la validation TURN authentifiée/S3 et les validations terrain déjà suivies par #153. - Aucune release n’est demandée pour cette PR. Reviewed-on: #320 Co-authored-by: Arnaud Dartois <admin@tordais.cc>
This commit was merged in pull request #320.
This commit is contained in:
1 parent
622abb4454
commit
6e7f593cb3
5 files changed
+47
-7
No files matched your search
@@ -3,16 +3,24 @@ services:
|
||||
coturn:
|
||||
image: coturn/coturn:4.6
|
||||
pull_policy: always
|
||||
ports:
|
||||
- "${COTURN_PORT:-3478}:3478/tcp"
|
||||
- "${COTURN_PORT:-3478}:3478/udp"
|
||||
- "${COTURN_RELAY_PORT_MIN:-49160}-${COTURN_RELAY_PORT_MAX:-49200}:${COTURN_RELAY_PORT_MIN:-49160}-${COTURN_RELAY_PORT_MAX:-49200}/udp"
|
||||
entrypoint: ["turnserver"]
|
||||
command: >
|
||||
-n --use-auth-secret
|
||||
--static-auth-secret-file=/run/secrets/coturn_secret
|
||||
--realm=${COTURN_REALM:-heimdall.local}
|
||||
--fingerprint --no-tlsv1 --no-tlsv1_1 --log-file=stdout
|
||||
network_mode: host
|
||||
--no-cli
|
||||
--listening-port=3478
|
||||
--min-port=${COTURN_RELAY_PORT_MIN:-49160}
|
||||
--max-port=${COTURN_RELAY_PORT_MAX:-49200}
|
||||
secrets:
|
||||
- coturn_secret
|
||||
restart: unless-stopped
|
||||
|
||||
secrets:
|
||||
coturn_secret:
|
||||
file: ./secrets/coturn_secret
|
||||
file: ./optional/secrets/coturn_secret
|
||||
@@ -30,9 +30,9 @@ volumes:
|
||||
|
||||
secrets:
|
||||
rustfs_access_key:
|
||||
file: ./secrets/rustfs_access_key
|
||||
file: ./optional/secrets/rustfs_access_key
|
||||
rustfs_secret_key:
|
||||
file: ./secrets/rustfs_secret_key
|
||||
file: ./optional/secrets/rustfs_secret_key
|
||||
|
||||
networks:
|
||||
heimdall-net:
|
||||
|
||||
@@ -201,9 +201,14 @@ RTSPS/WHEP TCP ports and WebRTC ICE UDP port in the firewall. Add STUN URLs unde
|
||||
`LiveMedia:IceServers`; for TURN REST credentials set
|
||||
`LiveMedia:Turn:Urls` and `LiveMedia:Turn:SharedSecret`. Central returns
|
||||
five-minute HMAC credentials to the browser; the shared secret is never sent.
|
||||
When using `docker-compose.coturn.yml`, configure the Central secret from the same
|
||||
protected secret source as `docker/secrets/coturn_secret`; protect the Central
|
||||
`.env` with owner-only permissions.
|
||||
When using `docker-compose.coturn.yml`, the installer stores its shared secret
|
||||
at `optional/secrets/coturn_secret`. Configure the matching TURN shared secret
|
||||
in Central from that protected file and protect Central's `.env` with owner-only
|
||||
permissions. Coturn publishes TCP/UDP 3478 and UDP relay ports 49160–49200 by
|
||||
default; forward those ports through the host firewall/NAT. Set
|
||||
`COTURN_RELAY_PORT_MIN` and `COTURN_RELAY_PORT_MAX` together if you need a
|
||||
different relay range, and `COTURN_EXTERNAL_IP` when coturn must advertise an
|
||||
address other than the container's detected address. Use Docker's default bridge network; coturn must not use `network_mode: host` when relying on published ports.
|
||||
|
||||
Start the core project first so its external `heimdall-net` network exists, then
|
||||
start MediaMTX with a separate project name:
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: optional-server-services
|
||||
description: Keep installer-managed RustFS and coturn Compose services aligned with the server installer's paths and networking.
|
||||
---
|
||||
|
||||
# Installer-managed optional services
|
||||
|
||||
The Linux and Windows server installers run optional Compose files with the installation root as the current directory. They save service secrets in `optional/secrets/` and pass the root `.env` for interpolation. Therefore, Compose secret `file:` entries must use `./optional/secrets/<name>`, not `./secrets/<name>` or paths relative to `optional/`.
|
||||
|
||||
## RustFS
|
||||
|
||||
- Keep `rustfs_access_key` and `rustfs_secret_key` file paths aligned with the generated files from both installers.
|
||||
- Verify Compose config from the install-root working directory and ensure Docker secrets are sourced from those files.
|
||||
- Keep the named data volume and shared `heimdall-net` behavior intact.
|
||||
|
||||
## coturn
|
||||
|
||||
- Keep `coturn_secret` sourced from `./optional/secrets/coturn_secret`.
|
||||
- Use `turnserver` as the explicit image entrypoint, bridge networking, and explicit TCP/UDP listener and UDP relay port publications; the upstream image has a `turnadmin` entrypoint, and host networking cannot be combined with useful Compose port mappings.
|
||||
- Keep the published relay range identical to coturn's `--min-port`/`--max-port` options. Make listener and relay settings configurable with documented defaults.
|
||||
- Set `COTURN_EXTERNAL_IP` only when NAT requires coturn to advertise an explicit public address. The operator must forward the listener and relay range through firewalls/NAT.
|
||||
- Do not claim public TURN reachability from a local container startup. It requires an external ICE/TURN client on a real network.
|
||||
|
||||
## Acceptance
|
||||
|
||||
Run both services in one uniquely named disposable Compose project using generated secrets and unique loopback listener ports. Use `docker compose --project-directory <install-root> --env-file <generated-env> -f <source-compose> -p <project> config` to prove the installer root resolves `optional/secrets/` correctly. Start RustFS and coturn; verify RustFS `/health` and S3 authentication and coturn startup plus a TURN REST authenticated allocation from a test client if available. State separately whether the real TURN allocation succeeded. Tear down only that project, verify its containers/volumes/networks are absent, and keep upstream images. No local images should be built by this recipe.
|
||||
@@ -13,6 +13,7 @@ Keep the site Agent installer in `src/Heimdall.Web/Components/SiteInstallPanel.r
|
||||
- Keep generated command content in the existing builders and `Commands` projection. Platform selection controls the builders; do not duplicate generated commands in markup.
|
||||
- Native install commands require a latest signed release with update key, signed manifest, signature, and Agent archive assets. Docker commands additionally require a digest-pinned image reference and update key. Preserve these gates so the panel never offers a nonfunctional installer.
|
||||
- Treat site tokens and generated configuration as secrets: show them only in the authenticated site's installer view and copy only after a deliberate click. Do not log generated content.
|
||||
- For live installer verification, use the authenticated Orca browser session. Check for the dedicated Heimdall login only in the user secret store at `~/.config/heimdall/credentials.json`; never put account passwords in this skill, repository config, shell arguments, or Orca `fill` commands. The file fallback is owner-only (`0700` directory, `0600` file) and base64-encoded, not encrypted. If it is absent, provide the user-run masked helper `~/.local/bin/store-heimdall-credentials`; do not report the credentials as persisted until that helper succeeds. If Orca has no safe autofill path, ask the user to enter the password in the visible browser.
|
||||
- Keep all visible strings in `SharedResources.resx`, `SharedResources.en.resx`, and `SharedResources.fr.resx`.
|
||||
- Match Pangolin's control hierarchy and compact copy affordance while using Heimdall's MudBlazor theme and supported installation choices. Keep selection and copy feedback accessible with selected styling, tooltips/aria labels, and a check icon after copying.
|
||||
|
||||
|
||||
Reference in new issue
Block a user