Skip to main content
Version: v3.8.0

Step 8 - Operations center Application

Goal

Deploy the operations-center Application on ops-b with alert-dashboard. The dashboard consumes imported NATS subjects and calls diagnostic runbooks through Router.

Scenario context

Remote operators open a single web UI for fleet sparklines, live alerts, the event journal, and Diagnose actions. The dashboard binds to import rule operations-center-import (step 5) and user rule ops-viewer (step 1).

Replace <diagnostic-bridge-port> with the value from step 7. Leave <snapshot-bridge-port> as a placeholder until Phase 2 step 14 unless you already deployed snapshot-service.

YAML walkthrough

File: deploy/steps/06-application-operations-center.yaml

Application header

operations-center Application
---
apiVersion: datasance.com/v3
kind: Application
metadata:
name: operations-center
spec:
natsConfig:
natsAccess: true
natsRule: operations-center-import

alert-dashboard microservice

Image: ghcr.io/datasance/pot-edge-patterns/alert-dashboard:1.1.0

Key environment variables:

VariableValuePurpose
DIAGNOSTIC_URLhttp://router.default.svc.bridge.local:<diagnostic-bridge-port>Router bridge to site-a runbooks
SNAPSHOT_URLhttp://router.default.svc.bridge.local:<snapshot-bridge-port>Fab gallery link (Phase 2; placeholder OK in Phase 1)
NATS_NOTIFY_SUBJECTnotify.alerts.>Live alert panel
TELEMETRY_SUBJECTtelemetry.machine.>Fleet sparklines for M001M004
JOURNAL_STREAMJOURNAL_PRODUCTIONEvent journal consumer

Override agent.name if your ops node is not ops-b.

Container external port 8082 maps to HTTP 8080 inside the dashboard. Step 9 creates the Service bridge for browser access.

Why this design

Data pathMechanism
Live alertsImported notify.alerts.> + SSE in dashboard
Event journalImported journal.events.> + JetStream consumer on JOURNAL_PRODUCTION
Fleet chartsImported telemetry.machine.> + in-memory ring buffer per machine
RunbooksHTTP via DIAGNOSTIC_URL through Router, not NATS

One Application on ops-b keeps remote ops isolated from plant NATS credentials.

Deploy

Edit the YAML with your diagnostic bridge port, then:

potctl deploy -f deploy/steps/06-application-operations-center.yaml

Verify

potctl get microservices
potctl describe microservice alert-dashboard

Confirm:

  • natsAccess: true and natsRule: ops-viewer
  • DIAGNOSTIC_URL contains your real bridge port, not the placeholder

After step 9 exposes the dashboard Service, trigger a fault (optional REPLAY_SEGMENT on sensor-simulator) and confirm live alerts and journal entries appear. Fleet panel should show four machine sparklines.

Common mistakes

  • Placeholder DIAGNOSTIC_URL. Diagnose fails until you paste the port from step 7 and redeploy.
  • Skipping step 5. Without imports, NATS subjects are empty even when plant telemetry runs.
  • Wrong TELEMETRY_SUBJECT. Use telemetry.machine.>, not v1.0.0 telemetry.temperature.
  • Deploying before ops-b exists. Provision the ops-b Edgelet node first.

Next step

Step 9: Alert dashboard Service: create the Router bridge and open the dashboard in a browser.

Group 3See anything wrong with the document? Help us improve it!