Extends the docker-dev compose with two additional, fully-isolated Akka clusters representing distinct sites. Each site is a 2-node fused admin+driver cluster (OTOPCUA_ROLES=admin,driver on both nodes), backed by its own ConfigDb database so configuration state stays separate from the main cluster and from the other site. Cluster isolation: the three meshes share the same Akka system name "otopcua" and remoting port 4053 (inside each container's own network namespace), but their seed-node lists are disjoint — main seeds at admin-a, site-a seeds at site-a-1, site-b seeds at site-b-1 — so gossip doesn't cross between them. Layout: Main cluster ConfigDb=OtOpcUa admin-a, admin-b, driver-a, driver-b Site A ConfigDb=OtOpcUa_SiteA site-a-1, site-a-2 (fused admin+driver) Site B ConfigDb=OtOpcUa_SiteB site-b-1, site-b-2 (fused admin+driver) OPC UA endpoints exposed on host ports 4840-4845. Admin UIs reachable through Traefik via Host-header routing: http://localhost → main cluster (PathPrefix default) http://site-a.localhost → site A http://site-b.localhost → site B `*.localhost` auto-resolves on macOS; Linux users add the two hosts to /etc/hosts (or rely on the resolver's RFC 6761 behaviour).
58 lines
1.6 KiB
YAML
58 lines
1.6 KiB
YAML
# docker-dev companion to scripts/install/traefik-dynamic.yml. Routes three
|
|
# Akka clusters that share the Compose network:
|
|
#
|
|
# - Main cluster (default): PathPrefix(`/`) → admin-a / admin-b.
|
|
# - Site A cluster: Host(`site-a.localhost`) → site-a-1 / site-a-2.
|
|
# - Site B cluster: Host(`site-b.localhost`) → site-b-1 / site-b-2.
|
|
#
|
|
# Host-header rules are more specific than PathPrefix, so they win over the
|
|
# default router for the site hostnames automatically — no priority field needed.
|
|
|
|
http:
|
|
routers:
|
|
otopcua-admin:
|
|
entryPoints: ["web"]
|
|
rule: "PathPrefix(`/`)"
|
|
service: otopcua-admin
|
|
|
|
otopcua-site-a:
|
|
entryPoints: ["web"]
|
|
rule: "Host(`site-a.localhost`)"
|
|
service: otopcua-site-a
|
|
|
|
otopcua-site-b:
|
|
entryPoints: ["web"]
|
|
rule: "Host(`site-b.localhost`)"
|
|
service: otopcua-site-b
|
|
|
|
services:
|
|
otopcua-admin:
|
|
loadBalancer:
|
|
servers:
|
|
- url: "http://admin-a:9000"
|
|
- url: "http://admin-b:9000"
|
|
healthCheck:
|
|
path: /health/active
|
|
interval: 5s
|
|
timeout: 2s
|
|
|
|
otopcua-site-a:
|
|
loadBalancer:
|
|
servers:
|
|
- url: "http://site-a-1:9000"
|
|
- url: "http://site-a-2:9000"
|
|
healthCheck:
|
|
path: /health/active
|
|
interval: 5s
|
|
timeout: 2s
|
|
|
|
otopcua-site-b:
|
|
loadBalancer:
|
|
servers:
|
|
- url: "http://site-b-1:9000"
|
|
- url: "http://site-b-2:9000"
|
|
healthCheck:
|
|
path: /health/active
|
|
interval: 5s
|
|
timeout: 2s
|