deploy(prod): resolve Q2 (GR = ZB on app-vp03, alarms off until an area is chosen) and Q8 (site-par); seed script takes -SecretName for the site PSK

Claude-Session: https://claude.ai/code/session_01GT67AD5mc2BnaaAfY3hqqQ
This commit is contained in:
Joseph Doherty
2026-11-20 15:31:55 -05:00
parent 9c77b6ce5c
commit 7ea31e160a
4 changed files with 11 additions and 8 deletions
@@ -7,13 +7,15 @@
# It is never printed and never on argv.
param(
[Parameter(Mandatory)][ValidateSet('MxAccessGw','ScadaBridge-Central')][string]$Target,
[Parameter(Mandatory)][string]$ValueFile
[Parameter(Mandatory)][string]$ValueFile,
[ValidatePattern('^[A-Za-z0-9._-]+$')][string]$SecretName = 'nam-ldap-svc-password',
[string]$Description = 'NAM LDAP lookup account (svc_igntadmin, PROD interim D-P5)'
)
$ErrorActionPreference = 'Stop'
$cli = 'E:\ApiInstall\_tools\secret-0.6.6\ZB.MOM.WW.Secrets.Cli.exe'
$cliSql = 'E:\ApiInstall\_tools\secret-0.6.6-sql\ZB.MOM.WW.Secrets.Cli.exe'
$name = 'nam-ldap-svc-password'
$desc = 'NAM LDAP lookup account (svc_igntadmin, PROD interim D-P5)'
$name = $SecretName # 2026-11-20: also used for SB-GRPC-PSK-<siteId> into the central store
$desc = $Description
& icacls.exe $ValueFile /inheritance:r /grant:r 'BUILTIN\Administrators:F' 'NT AUTHORITY\SYSTEM:F' | Out-Null
function SvcEnv($svc) {
$k = "HKLM:\SYSTEM\CurrentControlSet\Services\$svc"
@@ -1,6 +1,6 @@
# MxAccessGateway NSSM env for PROD (all four boxes; QA vq03 key set + PROD plan §3A.3). KEY=VALUE, '#' comments.
# @file = value read at install time from <ValuesDir>\<KEY>.txt (secrets; never in this file)
# __Q2_..__ = open question Q2 (prod Galaxy Repository / alarm area); install-mxgw.ps1 refuses while any remain
# Q2 resolved 2026-11-20: Galaxy Repository = ZB on WONDER-APP-VP03 (Integrated Security, as QA); alarm area still open
ASPNETCORE_ENVIRONMENT=Production
DOTNET_ENVIRONMENT=Production
Kestrel__Endpoints__Grpc__Url=http://0.0.0.0:5120
@@ -16,8 +16,9 @@ MxGateway__Galaxy__ConnectionString=@file
MxGateway__Authentication__Mode=ApiKey
MxGateway__Authentication__SqlitePath=E:\ApiInstall\MxAccessGateway\data\gateway-auth.db
MxGateway__ApiKeyPepper=@file
MxGateway__Alarms__Enabled=true
MxGateway__Alarms__SubscriptionExpression=__Q2_ALARM_EXPRESSION__
# Alarms OFF at first install (2026-11-20): the alarm area is not known yet (Q2; ZB on app-vp03 is not readable by adm_dohertj2).
# To enable: set Enabled=true and add MxGateway__Alarms__SubscriptionExpression=\\WONDER-APP-VP03\Galaxy!<area>, restart.
MxGateway__Alarms__Enabled=false
MxGateway__Ldap__Enabled=true
MxGateway__Ldap__Server=uswap-vdc-nam1.nam.zimmer.com
MxGateway__Ldap__Port=636
@@ -4,7 +4,7 @@
"Role": "Site",
"NodeName": "node-a",
"NodeHostname": "10.201.75.86",
"SiteId": "__Q8_SITE_ID__",
"SiteId": "site-par",
"RemotingPort": 8082,
"GrpcPort": 8083,
"MetricsPort": 8084
@@ -4,7 +4,7 @@
"Role": "Site",
"NodeName": "node-b",
"NodeHostname": "10.201.75.87",
"SiteId": "__Q8_SITE_ID__",
"SiteId": "site-par",
"RemotingPort": 8082,
"GrpcPort": 8083,
"MetricsPort": 8084