refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)

Solution + 23 src projects + 26 test projects renamed; folders, csproj,
namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated.
ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated.
SQL roles/logins, LDAP domains, CLI command name, and CLI config dir
(~/.scadalink → ~/.scadabridge) also renamed.

Build green; 5 Host.Tests fail awaiting SQL login rename in next commit.
Pre-existing StaleTagMonitor timing flakes unchanged.

Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
Joseph Doherty
2026-05-28 09:37:45 -04:00
parent 6d87ee3c3b
commit 7b0b9c7365
1531 changed files with 11180 additions and 11054 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
# Deployments
Catalog of ScadaLink deployments. Each entry below has a corresponding markdown file with topology, ports, infrastructure dependencies, and operational commands. The deployment **ID** matches the `Transport.SourceEnvironment` value stamped into exported bundle manifests (Component #24), so an audit trail of "where did this bundle come from" maps 1:1 to a file in this folder.
Catalog of ScadaBridge deployments. Each entry below has a corresponding markdown file with topology, ports, infrastructure dependencies, and operational commands. The deployment **ID** matches the `Transport.SourceEnvironment` value stamped into exported bundle manifests (Component #24), so an audit trail of "where did this bundle come from" maps 1:1 to a file in this folder.
| Deployment ID | Type | Topology | Doc |
|---------------|------|----------|-----|
+24 -24
View File
@@ -1,11 +1,11 @@
# docker-cluster-env2
Secondary local Docker deployment — a minimal ScadaLink topology that runs **concurrently with** [`docker-cluster`](docker-cluster.md) so the Transport (#24) feature can be exercised end-to-end across two real environments (export a bundle from one, import into the other).
Secondary local Docker deployment — a minimal ScadaBridge topology that runs **concurrently with** [`docker-cluster`](docker-cluster.md) so the Transport (#24) feature can be exercised end-to-end across two real environments (export a bundle from one, import into the other).
- **Deployment ID:** `docker-cluster-env2`
- **Transport.SourceEnvironment:** `docker-cluster-env2`
- **Source directory:** [`docker-env2/`](../docker-env2/)
- **Container-name prefix:** `scadalink-env2-`
- **Container-name prefix:** `scadabridge-env2-`
- **Host-port range:** `91XX` (primary `90XX` + 100)
## Topology
@@ -34,11 +34,11 @@ Same active/standby pattern as the primary, scaled down to a single site cluster
| Node | Container Name | Host Web | Host Akka | Host gRPC |
|------|----------------|----------|-----------|-----------|
| Traefik LB | `scadalink-env2-traefik` | 9100 | — | — |
| Central A | `scadalink-env2-central-a` | 9101 | 9111 | — |
| Central B | `scadalink-env2-central-b` | 9102 | 9112 | — |
| Site-X A | `scadalink-env2-site-x-a` | — | 9121 | 9123 |
| Site-X B | `scadalink-env2-site-x-b` | — | 9122 | 9124 |
| Traefik LB | `scadabridge-env2-traefik` | 9100 | — | — |
| Central A | `scadabridge-env2-central-a` | 9101 | 9111 | — |
| Central B | `scadabridge-env2-central-b` | 9102 | 9112 | — |
| Site-X A | `scadabridge-env2-site-x-a` | — | 9121 | 9123 |
| Site-X B | `scadabridge-env2-site-x-b` | — | 9122 | 9124 |
## Sites
@@ -48,29 +48,29 @@ Same active/standby pattern as the primary, scaled down to a single site cluster
## Infrastructure Dependencies
Env2 reuses the primary's `infra/` containers via the shared `scadalink-net` bridge network — there is no separate `infra/` stack to start.
Env2 reuses the primary's `infra/` containers via the shared `scadabridge-net` bridge network — there is no separate `infra/` stack to start.
| Service | Shared Container | What env2 uses it for |
|---------|------------------|-----------------------|
| MS SQL | `scadalink-mssql` | Env2 databases `ScadaLinkConfig2` / `ScadaLinkMachineData2` (separate DBs on the same instance) |
| LDAP | `scadalink-ldap` | Authentication (same test users) |
| SMTP | `scadalink-smtp` | Notification capture (env2 emails distinguishable by `FromAddress`) |
| OPC UA | `scadalink-opcua` | Simulated tags for `site-x` data connections |
| REST API | `scadalink-restapi` | External REST integration testing |
| MS SQL | `scadabridge-mssql` | Env2 databases `ScadaBridgeConfig2` / `ScadaBridgeMachineData2` (separate DBs on the same instance) |
| LDAP | `scadabridge-ldap` | Authentication (same test users) |
| SMTP | `scadabridge-smtp` | Notification capture (env2 emails distinguishable by `FromAddress`) |
| OPC UA | `scadabridge-opcua` | Simulated tags for `site-x` data connections |
| REST API | `scadabridge-restapi` | External REST integration testing |
## Databases
| Database | Owner |
|----------|-------|
| `ScadaLinkConfig2` | Configuration Database (#17) — env2 instance |
| `ScadaLinkMachineData2` | Machine data — env2 instance |
| `ScadaBridgeConfig2` | Configuration Database (#17) — env2 instance |
| `ScadaBridgeMachineData2` | Machine data — env2 instance |
Created by `docker-env2/init-db.sh`, which `deploy.sh` runs automatically.
## Commands
```bash
# Primary infra must already be up (creates scadalink-net + MS SQL + LDAP + SMTP + OPC UA + REST)
# Primary infra must already be up (creates scadabridge-net + MS SQL + LDAP + SMTP + OPC UA + REST)
cd infra && docker compose up -d && cd ..
# Build image (shared with primary), create env2 DBs, deploy env2 containers
@@ -81,21 +81,21 @@ bash docker-env2/seed-sites.sh
# View logs
docker compose -f docker-env2/docker-compose.yml logs -f
docker logs -f scadalink-env2-central-a
docker logs -f scadabridge-env2-central-a
# Stop env2 (preserves SQLite + logs)
bash docker-env2/teardown.sh
# Also drop env2 databases
docker exec scadalink-mssql /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P 'ScadaLink_Dev1#' -C \
-Q "DROP DATABASE ScadaLinkConfig2; DROP DATABASE ScadaLinkMachineData2;"
docker exec scadabridge-mssql /opt/mssql-tools18/bin/sqlcmd \
-S localhost -U sa -P 'ScadaBridge_Dev1#' -C \
-Q "DROP DATABASE ScadaBridgeConfig2; DROP DATABASE ScadaBridgeMachineData2;"
```
## CLI Access
```bash
dotnet run --project src/ScadaLink.CLI -- \
dotnet run --project src/ZB.MOM.WW.ScadaBridge.CLI -- \
--url http://localhost:9100 \
--username multi-role --password password \
template list
@@ -105,14 +105,14 @@ dotnet run --project src/ScadaLink.CLI -- \
- Single site (`site-x`) instead of three (`site-a`/`site-b`/`site-c`).
- Host port range `91XX` instead of `90XX`.
- Container names prefixed `scadalink-env2-` instead of `scadalink-`.
- Databases `ScadaLinkConfig2` / `ScadaLinkMachineData2` on the **shared** `scadalink-mssql`.
- Container names prefixed `scadabridge-env2-` instead of `scadabridge-`.
- Databases `ScadaBridgeConfig2` / `ScadaBridgeMachineData2` on the **shared** `scadabridge-mssql`.
- `Transport.SourceEnvironment = "docker-cluster-env2"` stamped into exported bundle manifests.
- Distinct `Security.JwtSigningKey` so sessions cannot cross environments.
## Notes
- Concurrent with [`docker-cluster`](docker-cluster.md) — both stacks share `scadalink-net` and the `infra/` services. Disjoint host ports + DB names + container names allow them to run side-by-side.
- Concurrent with [`docker-cluster`](docker-cluster.md) — both stacks share `scadabridge-net` and the `infra/` services. Disjoint host ports + DB names + container names allow them to run side-by-side.
- Design rationale: [`docs/plans/2026-05-24-second-environment-design.md`](../docs/plans/2026-05-24-second-environment-design.md).
- Transport golden-path verification: [`docs/plans/2026-05-24-second-environment-verification.md`](../docs/plans/2026-05-24-second-environment-verification.md).
- Setup details, port table, and CLI examples in [`docker-env2/README.md`](../docker-env2/README.md).
+23 -23
View File
@@ -1,11 +1,11 @@
# docker-cluster
Primary local Docker deployment — the full ScadaLink reference topology used for day-to-day development and integration testing. Runs on the developer workstation under Docker / OrbStack.
Primary local Docker deployment — the full ScadaBridge reference topology used for day-to-day development and integration testing. Runs on the developer workstation under Docker / OrbStack.
- **Deployment ID:** `docker-cluster`
- **Transport.SourceEnvironment:** `docker-cluster`
- **Source directory:** [`docker/`](../docker/)
- **Container-name prefix:** `scadalink-`
- **Container-name prefix:** `scadabridge-`
- **Host-port range:** `90XX`
## Topology
@@ -35,15 +35,15 @@ Two-node active/standby everywhere. Central runs the Blazor UI, Template Engine,
| Node | Container Name | Host Web | Host Akka | Host gRPC |
|------|----------------|----------|-----------|-----------|
| Traefik LB | `scadalink-traefik` | 9000 | — | — |
| Central A | `scadalink-central-a` | 9001 | 9011 | — |
| Central B | `scadalink-central-b` | 9002 | 9012 | — |
| Site-A A | `scadalink-site-a-a` | — | 9021 | 9023 |
| Site-A B | `scadalink-site-a-b` | — | 9022 | 9024 |
| Site-B A | `scadalink-site-b-a` | — | 9031 | 9033 |
| Site-B B | `scadalink-site-b-b` | — | 9032 | 9034 |
| Site-C A | `scadalink-site-c-a` | — | 9041 | 9043 |
| Site-C B | `scadalink-site-c-b` | — | 9042 | 9044 |
| Traefik LB | `scadabridge-traefik` | 9000 | — | — |
| Central A | `scadabridge-central-a` | 9001 | 9011 | — |
| Central B | `scadabridge-central-b` | 9002 | 9012 | — |
| Site-A A | `scadabridge-site-a-a` | — | 9021 | 9023 |
| Site-A B | `scadabridge-site-a-b` | — | 9022 | 9024 |
| Site-B A | `scadabridge-site-b-a` | — | 9031 | 9033 |
| Site-B B | `scadabridge-site-b-b` | — | 9032 | 9034 |
| Site-C A | `scadabridge-site-c-a` | — | 9041 | 9043 |
| Site-C B | `scadabridge-site-c-b` | — | 9042 | 9044 |
Port pattern: `90X1`/`90X2` (Akka), `90X3`/`90X4` (gRPC), where X = 0 (central), 2 (site-a), 3 (site-b), 4 (site-c).
@@ -57,27 +57,27 @@ Port pattern: `90X1`/`90X2` (Akka), `90X3`/`90X4` (gRPC), where X = 0 (central),
## Infrastructure Dependencies
All from `infra/docker-compose.yml`, attached via the shared `scadalink-net` bridge network:
All from `infra/docker-compose.yml`, attached via the shared `scadabridge-net` bridge network:
| Service | Container | Host Port | Purpose |
|---------|-----------|-----------|---------|
| MS SQL 2022 | `scadalink-mssql` | 1433 | `ScadaLinkConfig`, `ScadaLinkMachineData` |
| LDAP (GLAuth) | `scadalink-ldap` | 3893 | Authentication |
| SMTP (Mailpit) | `scadalink-smtp` | 1025 / 8025 | Notification capture |
| OPC UA | `scadalink-opcua` | 50000 / 8080 | Simulated device tags |
| REST API | `scadalink-restapi` | 5200 | External REST integration testing |
| MS SQL 2022 | `scadabridge-mssql` | 1433 | `ScadaBridgeConfig`, `ScadaBridgeMachineData` |
| LDAP (GLAuth) | `scadabridge-ldap` | 3893 | Authentication |
| SMTP (Mailpit) | `scadabridge-smtp` | 1025 / 8025 | Notification capture |
| OPC UA | `scadabridge-opcua` | 50000 / 8080 | Simulated device tags |
| REST API | `scadabridge-restapi` | 5200 | External REST integration testing |
## Databases
| Database | Owner |
|----------|-------|
| `ScadaLinkConfig` | Configuration Database (#17) |
| `ScadaLinkMachineData` | Machine data (template/instance runtime data) |
| `ScadaBridgeConfig` | Configuration Database (#17) |
| `ScadaBridgeMachineData` | Machine data (template/instance runtime data) |
## Commands
```bash
# Start infra first (creates scadalink-net, MS SQL, LDAP, SMTP, OPC UA, REST API)
# Start infra first (creates scadabridge-net, MS SQL, LDAP, SMTP, OPC UA, REST API)
cd infra && docker compose up -d && cd ..
# Build image + deploy all 8 nodes
@@ -88,7 +88,7 @@ bash docker/seed-sites.sh
# View logs
docker compose -f docker/docker-compose.yml logs -f
docker logs -f scadalink-central-a
docker logs -f scadabridge-central-a
# Health
curl -s http://localhost:9001/health/ready | python3 -m json.tool
@@ -103,7 +103,7 @@ bash docker/teardown.sh
The CLI talks to the Traefik LB, which routes to the active central node.
```bash
dotnet run --project src/ScadaLink.CLI -- \
dotnet run --project src/ZB.MOM.WW.ScadaBridge.CLI -- \
--url http://localhost:9000 \
--username multi-role --password password \
template list
@@ -125,5 +125,5 @@ All passwords are `password`. See `infra/glauth/config.toml` for the full list.
## Notes
- Reference deployment for the project — when a change ships, it gets validated here first.
- Concurrent with [`docker-cluster-env2`](docker-cluster-env2.md) on the same host; the two stacks share the `scadalink-net` network and `infra/` services but use disjoint host ports (`90XX` vs `91XX`) and databases.
- Concurrent with [`docker-cluster-env2`](docker-cluster-env2.md) on the same host; the two stacks share the `scadabridge-net` network and `infra/` services but use disjoint host ports (`90XX` vs `91XX`) and databases.
- Detailed setup, failover testing, and build-cache notes live in [`docker/README.md`](../docker/README.md).