Auto: opcuaclient-11 — reverse connect (server-initiated)

Closes #283
This commit is contained in:
Joseph Doherty
2026-04-26 06:08:30 -04:00
parent 9a3bc08e1c
commit 5c72deb839
10 changed files with 920 additions and 26 deletions

View File

@@ -43,3 +43,41 @@ services:
timeout: 2s
retries: 10
start_period: 10s
# opc-plc-rc — reverse-connect (server-initiated) variant. The simulator
# acts as the OPC UA server but, unlike the regular service above, it dials
# OUT to the client's listener URL instead of accepting an inbound dial.
# Mirrors the OT-DMZ topology where the plant firewall only permits
# outbound traffic from the upstream server. The driver-side test fixture
# binds opc.tcp://0.0.0.0:4844 and waits for opc-plc-rc to ReverseHello.
#
# `--rc` is opc-plc's reverse-connect knob — value is the client URL the
# simulator should dial when it has no inbound connection. host.docker.internal
# is the docker-for-windows / docker-for-mac shorthand for the host's IP;
# on Linux hosts use --add-host=host.docker.internal:host-gateway.
opc-plc-rc:
image: mcr.microsoft.com/iotedge/opc-plc:2.14.10
container_name: otopcua-opc-plc-rc
restart: "no"
extra_hosts:
- "host.docker.internal:host-gateway"
command:
# --pn=50001: bind on a different port so this container can run alongside
# the dial-mode simulator above. Reverse-connect doesn't require
# the client to know this port (the simulator is the dialer)
# but it still has to bind one for any incoming admin queries.
# --rc: reverse-connect target — the simulator dials this URL and
# presents its OPC UA endpoint over the inbound socket. Must
# point at the test runner's listener.
# --ut/--aa/--alm: same flags as the regular profile.
- "--pn=50001"
- "--rc=opc.tcp://host.docker.internal:4844"
- "--ut"
- "--aa"
- "--alm"
healthcheck:
test: ["CMD-SHELL", "netstat -an | grep -q ':50001.*LISTEN' || exit 1"]
interval: 5s
timeout: 2s
retries: 10
start_period: 10s