Files
scadalink-design/infra
Joseph Doherty 652378b470 Add test infrastructure with Docker services, CLI tools, and resolve Phase 0 questions
Stand up local dev infrastructure (OPC UA, LDAP, MS SQL) with Docker Compose,
Python CLI tools for service interaction, and teardown script. Fix GLAuth config
mount, OPC PLC node format, and document actual DN/namespace behavior discovered
during testing. Resolve Q1-Q8,Q10: .NET 10, Akka.NET 1.5.x, monorepo with slnx,
appsettings JWT, Windows Server 2022 site target.
2026-03-16 14:03:12 -04:00
..

ScadaLink Test Infrastructure

Local Docker-based test services for ScadaLink development.

Quick Start

docker compose up -d

This starts three services:

Service Port Purpose
OPC UA (Azure IoT OPC PLC) 50000 (OPC UA), 8080 (web) Simulated OPC UA server with ScadaLink-style tags
LDAP (GLAuth) 3893 Lightweight LDAP with test users/groups matching ScadaLink roles
MS SQL 2022 1433 Configuration and machine data databases

First-Time SQL Setup

The MS SQL container does not auto-run init scripts. After the first docker compose up -d, run:

docker exec -i scadalink-mssql /opt/mssql-tools18/bin/sqlcmd \
  -S localhost -U sa -P 'ScadaLink_Dev1!' -C \
  -i /docker-entrypoint-initdb.d/setup.sql

This creates the ScadaLinkConfig and ScadaLinkMachineData databases and the scadalink_app login.

Stopping & Teardown

Stop containers (data persists in SQL volume):

docker compose down

Stop a single service (leave the others running):

docker compose stop opcua      # or: ldap, mssql
docker compose start opcua     # bring it back without recreating

Full teardown (stop containers, delete SQL data volume, remove pulled images):

./teardown.sh

Or manually:

docker compose down -v         # stop containers + delete SQL data volume
docker compose down -v --rmi all  # also remove downloaded images

After a full teardown, the next docker compose up -d starts fresh — you'll need to re-run the SQL setup script.

CLI Tools

Python CLI tools for interacting with the test services are in tools/.

Set up a Python virtual environment (one-time):

python3 -m venv tools/.venv && source tools/.venv/bin/activate

Install dependencies (one-time, with venv active):

pip install -r tools/requirements.txt

The .venv directory is gitignored.

Quick readiness check (all three services, with venv active):

python tools/opcua_tool.py check
python tools/ldap_tool.py check
python tools/mssql_tool.py check
Tool Service Key Commands
tools/opcua_tool.py OPC UA check, browse, read, write, monitor
tools/ldap_tool.py LDAP check, bind, search, users, groups
tools/mssql_tool.py MS SQL check, setup, query, tables

Each tool supports --help for full usage. See the per-service docs below for detailed examples.

Detailed Documentation

See the project root for per-service setup guides: