Cloud, Containers, Load Balancing & Release Engineering
This example is the ReleaseDashboardPage: Deploy… / Rollback…, the eight-chip release runbook strip
and the node grid read from HealthCheck.json, plus the deployment package the lab asks for (environment-specific
appsettings*.json, HealthCheck.json, /healthz probes, container / reverse-proxy / load-balancer notes and the
runbook documents).
Everything runs in this one process. No container is built and no server other than this app is started —
deployment/Dockerfile, deployment/docker-compose.yml and deployment/nginx.conf are deliverables to read.
Run it
cd "LearnWisej-Samples/Enterprise Wisej.NET Course/Module 12/EnterpriseOps"
dotnet run -f net10.0 --urls http://localhost:5212
Then open http://localhost:5212. (Visual Studio: open EnterpriseOps.slnx, press F5.) The project multi-targets
net10.0-windows;net10.0, so dotnet run needs -f.
The host reads ASPNETCORE_ENVIRONMENT (the launch profile sets Development; Startup.cs falls back to it).
Set it to Production without the EnterpriseOps__* secrets and the process exits at startup with the
configuration errors — the fail-fast rule the module teaches.
| URL | What it is |
|---|---|
| http://localhost:5212/healthz | readiness — 200 with the probe body, 503 once a critical check fails |
| http://localhost:5212/healthz/live | liveness — 200 while the process can run code |
| http://localhost:5212/HealthCheck.json | not served — Startup.cs keeps every .json out of the file server |
What to try
| Action | What you should see |
|---|---|
| The page loads | The runbook chips are grey; both nodes are Healthy · 2.4.2; the dark status bar shows node, release and environment. |
| Deploy… (first time) | Chips 1–3 turn green, chip 4 (smoke tests) red: the 2.4.2 database migration does not complete on app-node-B. The node turns red with ROUTED AWAY — no new sessions, the dark line under the grid shows its probe body ({ "status": "Unhealthy", … database: FAIL · storage: OK · websocket: OK }), chip 8 is armed and the banner tells you to press Rollback. |
| Rollback… | Chip 8 turns ↩; node B returns on 2.4.1, the smoke tests re-run green, it rejoins the rotation; green banner "… Users never saw a broken node." |
| Deploy… again | The fix has shipped: chips 1→7 turn green one at a time (pushed over WebSocket while the service works); chip 8 stays grey with rollback not needed; green banner Release 2.4.2 live on both nodes. |
Deploy and Rollback are refused server-side (ReleaseAuthorization) for anyone who is not a Manager or Admin —
the button being visible is not a permission.
Where things live
Module 12/
├─ EnterpriseOps.slnx
├─ deployment/ sample container + proxy notes — READ, never built or run by this lab
│ ├─ DeploymentReleasePatterns.md the document: config table + runbook, and the index
│ ├─ Dockerfile · Dockerfile.notes.md
│ ├─ docker-compose.yml
│ ├─ nginx.conf · nginx.proxy.notes.md
│ └─ LoadBalancerNotes.md sticky sessions, draining, scaling, health-aware routing
└─ EnterpriseOps/
├─ Startup.cs configuration → StartupValidation (fail fast) → HealthCheck.json →
│ UseForwardedHeaders → UseWisej → /healthz + /healthz/live → file server
├─ Program.cs session entry point
├─ appsettings.json · appsettings.{Development,Staging,Production}.json — no secrets, ever
├─ HealthCheck.json the probe contract (endpoints, thresholds, checks, safeToExpose)
├─ UI/ReleaseDashboardPage.cs + .Designer.cs
├─ Domain/ ReleaseNode (HealthReport, NodeRow) · Runbook · WorkOrder
├─ Data/WorkOrderRepository.cs the "known query returns rows" check
├─ Security/ReleaseAuthorization.cs who may deploy and roll back
├─ Services/ HostConfiguration · StartupValidation · HealthProbeService ·
│ LoadBalancerSimulator · SmokeTestService · ReleaseService ·
│ ActivityTrace (server log) · SessionContext
└─ docs/ the five deliverables (below)