From 6f4cbf8449b0c8d06d5e5b50f3af8bfd5b6d2043 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 29 Apr 2026 17:05:50 -0400 Subject: [PATCH] =?UTF-8?q?PR=207.1=20=E2=80=94=20Default-flip=20Galaxy=20?= =?UTF-8?q?backend=20to=20mxgateway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds Galaxy.DefaultBackend = "GalaxyMxGateway" to the server appsettings as the forward-looking default for tooling and migration scripts that author new Galaxy DriverInstance rows. No runtime behavior change — both factories register independently at startup, so existing rows keep working until PR 7.2 retires the legacy registration (gated on the parity matrix in docs/v2/Galaxy.ParityMatrix.md going fully green on the parity rig). The e2e-config.sample.json comment is updated to reflect the new default endpoint (http://localhost:5120 mxaccessgw) while still pointing pre-flip rigs at the legacy OtOpcUaGalaxyHost path. Install-Services.ps1's OtOpcUaGalaxyHost registration is intentionally unchanged — yanking that mid-flight without a soaked parity rig would leave any in-progress installation without a Galaxy backend at all. PR 7.2 retires it alongside the legacy projects. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/e2e/e2e-config.sample.json | 12 ++++++------ src/ZB.MOM.WW.OtOpcUa.Server/appsettings.json | 17 ++++++++++++++++- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/scripts/e2e/e2e-config.sample.json b/scripts/e2e/e2e-config.sample.json index f735efe..c8dbc64 100644 --- a/scripts/e2e/e2e-config.sample.json +++ b/scripts/e2e/e2e-config.sample.json @@ -3,14 +3,14 @@ "modbus": { "$comment": "Port 5020 matches tests/.../Modbus.IntegrationTests/Docker/docker-compose.yml — `docker compose --profile standard up -d`.", - "endpoint": "127.0.0.1:5020", + "endpoint": "10.100.0.35:5020", "bridgeNodeId": "ns=2;s=Modbus/HR200", "opcUaUrl": "opc.tcp://localhost:4840" }, "abcip": { "$comment": "ab_server listens on port 44818 (default CIP/EIP). `docker compose --profile controllogix up -d`.", - "gateway": "ab://127.0.0.1:44818/1,0", + "gateway": "ab://10.100.0.35:44818/1,0", "family": "ControlLogix", "tagPath": "TestDINT", "bridgeNodeId": "ns=2;s=AbCip/TestDINT" @@ -18,7 +18,7 @@ "ablegacy": { "$comment": "Works against ab_server --profile slc500 (Docker fixture) or real SLC/MicroLogix/PLC-5 hardware. `/1,0` cip-path is required for the Docker fixture; real hardware accepts an empty path — e.g. `ab://10.0.1.50:44818/`.", - "gateway": "ab://127.0.0.1/1,0", + "gateway": "ab://10.100.0.35/1,0", "plcType": "Slc500", "address": "N7:5", "bridgeNodeId": "ns=2;s=AbLegacy/N7_5" @@ -26,7 +26,7 @@ "s7": { "$comment": "Port 1102 matches tests/.../S7.IntegrationTests/Docker/docker-compose.yml (python-snap7 needs non-priv port). `docker compose --profile s7_1500 up -d`. Real S7 PLCs listen on 102.", - "endpoint": "127.0.0.1:1102", + "endpoint": "10.100.0.35:1102", "cpu": "S71500", "slot": 0, "address": "DB1.DBW0", @@ -50,7 +50,7 @@ }, "galaxy": { - "$comment": "Galaxy (MXAccess) driver. Has no per-driver CLI — all stages go through otopcua-cli against the published NodeIds. Seven stages: probe / source read / virtual-tag bridge / subscribe-sees-change / reverse write / alarm fires / history read. Requires OtOpcUaGalaxyHost running + seed-phase-7-smoke.sql applied with a real Galaxy attribute substituted into dbo.Tag.TagConfig.", + "$comment": "Galaxy (MXAccess) driver. Has no per-driver CLI — all stages go through otopcua-cli against the published NodeIds. Seven stages: probe / source read / virtual-tag bridge / subscribe-sees-change / reverse write / alarm fires / history read. PR 7.1 default-flipped backend to GalaxyMxGateway (in-process .NET 10 driver over mxaccessgw gRPC at http://localhost:5120 by default — override via the DriverInstance row's DriverConfig). Pre-flip rigs running the legacy 'Galaxy' DriverType still need OtOpcUaGalaxyHost running + seed-phase-7-smoke.sql applied with a real Galaxy attribute substituted into dbo.Tag.TagConfig.", "sourceNodeId": "ns=2;s=p7-smoke-tag-source", "virtualNodeId": "ns=2;s=p7-smoke-vt-derived", "alarmNodeId": "ns=2;s=p7-smoke-al-overtemp", @@ -62,7 +62,7 @@ "opcuaclient": { "$comment": "OPC UA Client (gateway) driver. Default opc-plc Docker fixture exposes ns=3;s=FastUInt1 as a ticker. The `bridgeNodeId` is the local mirror of remoteNodeId after the OpcUaClient driver's DiscoverAsync runs — dev-specific. Stages 5/7/8 are opt-in: supply writable* NodeIds to enable reverse-bridge, alarmNodeId to enable alarm, historyNodeId to enable history (opc-plc does not historize by default — a Prosys / UA Expert sample server is needed for stage 8).", - "remoteUrl": "opc.tcp://localhost:50000", + "remoteUrl": "opc.tcp://10.100.0.35:50000", "remoteNodeId": "ns=3;s=FastUInt1", "bridgeNodeId": "ns=2;s=OpcUaClient/FastUInt1", "bridgeRootNodeId": "ns=2;s=OpcUaClient", diff --git a/src/ZB.MOM.WW.OtOpcUa.Server/appsettings.json b/src/ZB.MOM.WW.OtOpcUa.Server/appsettings.json index 8d6ec16..75693d5 100644 --- a/src/ZB.MOM.WW.OtOpcUa.Server/appsettings.json +++ b/src/ZB.MOM.WW.OtOpcUa.Server/appsettings.json @@ -5,7 +5,22 @@ "Node": { "NodeId": "node-dev-a", "ClusterId": "cluster-dev", - "ConfigDbConnectionString": "Server=localhost,14330;Database=OtOpcUaConfig;Integrated Security=True;TrustServerCertificate=True;Encrypt=False;", + "ConfigDbConnectionString": "Server=10.100.0.35,14330;Database=OtOpcUaConfig;Integrated Security=True;TrustServerCertificate=True;Encrypt=False;", "LocalCachePath": "config_cache.db" + }, + "Historian": { + "Wonderware": { + "Enabled": false, + "PipeName": "OtOpcUaWonderwareHistorian", + "SharedSecret": "", + "PeerName": "OtOpcUa-node-dev-a", + "DriverInstancePrefix": "galaxy", + "ConnectTimeoutSeconds": 10, + "CallTimeoutSeconds": 30 + } + }, + "Galaxy": { + "$comment": "PR 7.1 — DefaultBackend selects which factory tooling and migration scripts pick when authoring NEW Galaxy DriverInstance rows. Both factories register at startup so existing rows keep working: 'GalaxyMxGateway' (default since PR 7.1, in-process .NET 10 driver over the mxaccessgw gRPC gateway) and 'Galaxy' (legacy out-of-process Galaxy.Host EXE + named pipe). Legacy registration retires in PR 7.2 once the parity matrix in docs/v2/Galaxy.ParityMatrix.md is fully green on the parity rig.", + "DefaultBackend": "GalaxyMxGateway" } }