- scripts/install/traefik.yml + traefik-dynamic.yml: Traefik static + dynamic
config. One :80 entry point, one router on HostRegexp(otopcua.*), one
service load-balancing admin-a:9000 + admin-b:9000 with /health/active health
check (interval 5s, timeout 2s, expected 200). Followers return 503 from
/health/active so Traefik drops them within the next interval after a
leadership change.
- scripts/install/Install-Traefik.ps1: downloads Traefik for Windows, drops the
yml configs, registers the OtOpcUaTraefik Windows service via sc.exe with
restart-on-failure. Companion to Install-Services.ps1.
- docker-dev/{Dockerfile,docker-compose.yml,traefik-dynamic.yml,README.md}:
Mac-friendly four-node fleet (admin-a + admin-b + driver-a + driver-b) plus
SQL Server 2022 + OpenLDAP + Traefik. Single OtOpcUa.Host image built once;
Compose drives OTOPCUA_ROLES + Cluster:* per container to differentiate the
four hosts. README walks through bring-up + failover smoke + the dev LDAP
users.
Note: untested on macOS (no local Docker — see docs/v2/dev-environment.md).
25 lines
783 B
YAML
25 lines
783 B
YAML
# Dynamic (file-provider) Traefik config for the OtOpcUa admin HTTP routing.
|
|
# Picked up by traefik.yml's file provider (with watch: true) so router/service
|
|
# edits hot-reload without a Traefik restart.
|
|
|
|
http:
|
|
routers:
|
|
otopcua-admin:
|
|
entryPoints: ["web"]
|
|
rule: "HostRegexp(`otopcua.*`)"
|
|
service: otopcua-admin
|
|
|
|
services:
|
|
otopcua-admin:
|
|
loadBalancer:
|
|
servers:
|
|
- url: "http://admin-a:9000"
|
|
- url: "http://admin-b:9000"
|
|
healthCheck:
|
|
path: /health/active
|
|
interval: 5s
|
|
timeout: 2s
|
|
# Default expected status is 2xx. Followers return 503 from
|
|
# /health/active so Traefik will drop them from the balancer
|
|
# within the next interval after a leadership change.
|