diff --git a/docs/v2/dev-environment.md b/docs/v2/dev-environment.md index a3310b0..a615b80 100644 --- a/docs/v2/dev-environment.md +++ b/docs/v2/dev-environment.md @@ -22,6 +22,102 @@ Per decision #99: The tier split keeps developer onboarding fast (no Docker required for first build) while concentrating the heavy simulator setup on one machine the team maintains. +## Installed Inventory — This Machine + +Running record of every v2 dev service stood up on this developer machine. Updated on every install / config change. Credentials here are **dev-only** per decision #137 — production uses Integrated Security / gMSA per decision #46 and never any value in this table. + +**Last updated**: 2026-04-17 + +### Host + +| Attribute | Value | +|-----------|-------| +| Machine name | `DESKTOP-6JL3KKO` | +| User | `dohertj2` (member of local Administrators + `docker-users`) | +| VM platform | VMware (`VMware20,1`), nested virtualization enabled | +| CPU | Intel Xeon E5-2697 v4 @ 2.30GHz (3 vCPUs) | +| OS | Windows (WSL2 + Hyper-V Platform features installed) | + +### Toolchain + +| Tool | Version | Location | Install method | +|------|---------|----------|----------------| +| .NET SDK | 10.0.201 | `C:\Program Files\dotnet\sdk\` | Pre-installed | +| .NET AspNetCore runtime | 10.0.5 | `C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App\` | Pre-installed | +| .NET NETCore runtime | 10.0.5 | `C:\Program Files\dotnet\shared\Microsoft.NETCore.App\` | Pre-installed | +| .NET WindowsDesktop runtime | 10.0.5 | `C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\` | Pre-installed | +| .NET Framework 4.8 SDK | — | Pending (needed for Phase 2 Galaxy.Host; not yet required) | — | +| Git | Pre-installed | Standard | — | +| PowerShell 7 | Pre-installed | Standard | — | +| winget | v1.28.220 | Standard Windows feature | — | +| WSL | Default v2, distro `docker-desktop` `STATE Running` | — | `wsl --install --no-launch` (2026-04-17) | +| Docker Desktop | 29.3.1 (engine) / Docker Desktop 4.68.0 (app) | Standard | `winget install --id Docker.DockerDesktop` (2026-04-17) | +| `dotnet-ef` CLI | 10.0.6 | `%USERPROFILE%\.dotnet\tools\dotnet-ef.exe` | `dotnet tool install --global dotnet-ef --version 10.0.*` (2026-04-17) | + +### Services + +| Service | Container / Process | Version | Host:Port | Credentials (dev-only) | Data location | Status | +|---------|---------------------|---------|-----------|------------------------|---------------|--------| +| **Central config DB** | Docker container `otopcua-mssql` (image `mcr.microsoft.com/mssql/server:2022-latest`) | 16.0.4250.1 (RTM-CU24-GDR, KB5083252) | `localhost:1433` | User `sa` / Password `OtOpcUaDev_2026!` | Docker named volume `otopcua-mssql-data` (mounted at `/var/opt/mssql` inside container) | ✅ Running | +| Dev Galaxy (AVEVA System Platform) | Local install on this dev box | v1 baseline | Local COM via MXAccess | Windows Auth | Galaxy repository DB `ZB` on local SQL Server (separate instance from `otopcua-mssql` — legacy v1 Galaxy DB, not related to v2 config DB) | ✅ Available (per CLAUDE.md) | +| GLAuth (LDAP) | Local install at `C:\publish\glauth\` | v1 baseline | `localhost:3893` (LDAP) / `3894` (LDAPS) | Bind DN `cn=admin,dc=otopcua,dc=local` / password in `glauth-otopcua.cfg` | `C:\publish\glauth\` | Pending — v2 test users + groups config not yet seeded (Phase 1 Stream E task) | +| OPC Foundation reference server | Not yet built | — | `localhost:62541` (target) | `user1` / `password1` (reference-server defaults) | — | Pending (needed for Phase 5 OPC UA Client driver testing) | +| FOCAS TCP stub | Not yet built | — | `localhost:8193` (target) | n/a | — | Pending (built in Phase 5) | +| Modbus simulator (`oitc/modbus-server`) | — | — | `localhost:502` (target) | n/a | — | Pending (needed for Phase 3 Modbus driver; moves to integration host per two-tier model) | +| libplctag `ab_server` | — | — | `localhost:44818` (target) | n/a | — | Pending (Phase 3/4 AB CIP and AB Legacy drivers) | +| Snap7 Server | — | — | `localhost:102` (target) | n/a | — | Pending (Phase 4 S7 driver) | +| TwinCAT XAR VM | — | — | `localhost:48898` (ADS) (target) | TwinCAT default route creds | — | Pending — runs in Hyper-V VM, not on this dev box (per decision #135) | + +### Connection strings for `appsettings.Development.json` + +Copy-paste-ready. **Never commit these to the repo** — they go in `appsettings.Development.json` (gitignored per the standard .NET convention) or in user-scoped dotnet secrets. + +```jsonc +{ + "ConfigDatabase": { + "ConnectionString": "Server=localhost,1433;Database=OtOpcUaConfig_Dev;User Id=sa;Password=OtOpcUaDev_2026!;TrustServerCertificate=true;Encrypt=false;" + }, + "Authentication": { + "Ldap": { + "Host": "localhost", + "Port": 3893, + "UseLdaps": false, + "BindDn": "cn=admin,dc=otopcua,dc=local", + "BindPassword": "" + } + } +} +``` + +For xUnit test fixtures that need a throwaway DB per test run, build connection strings with `Database=OtOpcUaConfig_Test_{timestamp}` to avoid cross-run pollution. + +### Container management quick reference + +```powershell +# Start / stop the SQL Server container (survives reboots via Docker Desktop auto-start) +docker stop otopcua-mssql +docker start otopcua-mssql + +# Logs (useful for diagnosing startup failures or login issues) +docker logs otopcua-mssql --tail 50 + +# Shell into the container (rarely needed; sqlcmd is the usual tool) +docker exec -it otopcua-mssql bash + +# Query via sqlcmd inside the container (Git Bash needs MSYS_NO_PATHCONV=1 to avoid path mangling) +MSYS_NO_PATHCONV=1 docker exec otopcua-mssql /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P "OtOpcUaDev_2026!" -C -Q "SELECT @@VERSION" + +# Nuclear reset: drop the container + volume (destroys all DB data) +docker stop otopcua-mssql +docker rm otopcua-mssql +docker volume rm otopcua-mssql-data +# …then re-run the docker run command from Bootstrap Step 6 +``` + +### Credential rotation + +Dev credentials in this inventory are convenience defaults, not secrets. Change them at will per developer — just update this doc + each developer's `appsettings.Development.json`. There is no shared secret store for dev. + ## Resource Inventory ### A. Always-required (every developer + integration host)