Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Verify demo host identity before deploy
rcourtmana462b730ec6e
diff --git a/.github/workflows/README.md b/.github/workflows/README.mdindex 7751b52520..635e6f1950 100644--- a/.github/workflows/README.md+++ b/.github/workflows/README.md@@ -33,12 +33,18 @@ Required environment secrets:Required environment variables:-1. **DEMO_LOCAL_BASE_URL**+1. **DEMO_EXPECTED_HOSTNAME**+ - The remote `hostname` value the selected environment is expected to report+ - Stable example: `pulse-cloud`+ - Preview example: `pulse-v6-preview`+ - This is a host-identity guard: the workflow fails closed if the SSH secret points at the wrong machine++2. **DEMO_LOCAL_BASE_URL**- Local URL used on the target host for version and mock-mode verification- Example stable value: `http://localhost:7655`- Example preview value: `http://localhost:8665`-2. **DEMO_PUBLIC_HEALTH_URL**+3. **DEMO_PUBLIC_HEALTH_URL**- Public health endpoint for the selected demo target- Example stable value: `https://demo.pulserelay.pro/api/health`- Example preview value: `https://v6-demo.pulserelay.pro/api/health`@@ -63,8 +69,9 @@ Optional environment variables:4. **Governance check**: Validates the selected tag is reachable from the governed release branch for that version5. **Latest check**: Refuses to update a target unless the published tag is the latest release for that target channel6. **Update**: SSHs to the selected demo host and runs the tag-matched root installer from that exact git tag-7. **Verify**: Checks that the new version is running, mock mode is active, and the public demo HTML serves the same frontend entry asset as the target service-8. **Cleanup**: Removes SSH key from runner+7. **Host identity check**: Verifies the SSH target reports the governed expected hostname before running installer or deploy steps+8. **Verify**: Checks that the new version is running, mock mode is active, and the public demo HTML serves the same frontend entry asset as the target service+9. **Cleanup**: Removes SSH key from runner### Testing@@ -96,12 +103,13 @@ environment without changing the governed release workflow.- Uses the same `demo-stable` / `demo-preview-v6` environment contract as therelease-driven updater-- Requires `DEMO_LOCAL_BASE_URL` and `DEMO_PUBLIC_HEALTH_URL`+- Requires `DEMO_EXPECTED_HOSTNAME`, `DEMO_LOCAL_BASE_URL`, and `DEMO_PUBLIC_HEALTH_URL`- Supports optional `DEMO_SERVICE_NAME`, `DEMO_INSTALL_DIR`, `DEMO_TEST_PORT`,`DEMO_AUTH_USER`, and `DEMO_AUTH_PASS`- Assumes the target service and install directory already exist on the host- Defaults preview runs to `pulse-v6-preview` and refuses to target the stable`pulse` service identity+- Verifies the SSH target reports the governed expected hostname before deploy- Verifies that the public demo shell serves the same frontend entry asset thatwas built and deployeddiff --git a/.github/workflows/deploy-demo-server.yml b/.github/workflows/deploy-demo-server.ymlindex c4bb3d2c7d..abfcdc7503 100644--- a/.github/workflows/deploy-demo-server.yml+++ b/.github/workflows/deploy-demo-server.yml@@ -48,6 +48,7 @@ jobs:runs-on: ubuntu-latestenvironment: ${{ needs.resolve.outputs.environment_name }}env:+ DEMO_EXPECTED_HOSTNAME: ${{ vars.DEMO_EXPECTED_HOSTNAME }}DEMO_LOCAL_BASE_URL: ${{ vars.DEMO_LOCAL_BASE_URL }}DEMO_SERVICE_NAME: ${{ vars.DEMO_SERVICE_NAME }}DEMO_INSTALL_DIR: ${{ vars.DEMO_INSTALL_DIR }}@@ -67,6 +68,7 @@ jobs:[ -n "$DEMO_SERVER_HOST" ] || { echo "::error::DEMO_SERVER_HOST is required in the selected demo environment."; exit 1; }[ -n "$DEMO_SERVER_USER" ] || { echo "::error::DEMO_SERVER_USER is required in the selected demo environment."; exit 1; }[ -n "$DEMO_SERVER_SSH_KEY" ] || { echo "::error::DEMO_SERVER_SSH_KEY is required in the selected demo environment."; exit 1; }+ [ -n "$DEMO_EXPECTED_HOSTNAME" ] || { echo "::error::DEMO_EXPECTED_HOSTNAME is required in the selected demo environment."; exit 1; }[ -n "$DEMO_LOCAL_BASE_URL" ] || { echo "::error::DEMO_LOCAL_BASE_URL is required in the selected demo environment."; exit 1; }[ -n "$DEMO_PUBLIC_HEALTH_URL" ] || { echo "::error::DEMO_PUBLIC_HEALTH_URL is required in the selected demo environment."; exit 1; }@@ -146,6 +148,25 @@ jobs:ssh-keyscan -H "$DEMO_SERVER_HOST" >> ~/.ssh/known_hostschmod 600 ~/.ssh/known_hosts+ - name: Verify target host identity+ env:+ DEMO_SERVER_HOST: ${{ secrets.DEMO_SERVER_HOST }}+ DEMO_SERVER_USER: ${{ secrets.DEMO_SERVER_USER }}+ run: |+ set -euo pipefail+ REMOTE_HOSTNAME="$(+ ssh -i ~/.ssh/id_ed25519 \+ -o IdentitiesOnly=yes \+ -o StrictHostKeyChecking=yes \+ -o UserKnownHostsFile=~/.ssh/known_hosts \+ "$DEMO_SERVER_USER@$DEMO_SERVER_HOST" \+ "hostname"+ )"+ [ "$REMOTE_HOSTNAME" = "$DEMO_EXPECTED_HOSTNAME" ] || {+ echo "::error::Demo environment points at host $REMOTE_HOSTNAME but expected $DEMO_EXPECTED_HOSTNAME."+ exit 1+ }+- name: Resolve deploy pathsid: configrun: |diff --git a/.github/workflows/update-demo-server.yml b/.github/workflows/update-demo-server.ymlindex 38670ff585..1f2de3fe52 100644--- a/.github/workflows/update-demo-server.yml+++ b/.github/workflows/update-demo-server.yml@@ -151,6 +151,7 @@ jobs:runs-on: ubuntu-latestenvironment: ${{ needs.resolve.outputs.environment_name }}env:+ DEMO_EXPECTED_HOSTNAME: ${{ vars.DEMO_EXPECTED_HOSTNAME }}DEMO_LOCAL_BASE_URL: ${{ vars.DEMO_LOCAL_BASE_URL }}DEMO_PUBLIC_HEALTH_URL: ${{ vars.DEMO_PUBLIC_HEALTH_URL }}DEMO_SERVICE_NAME: ${{ vars.DEMO_SERVICE_NAME }}@@ -174,6 +175,7 @@ jobs:[ -n "$DEMO_SERVER_HOST" ] || { echo "::error::DEMO_SERVER_HOST is required in the selected demo environment."; exit 1; }[ -n "$DEMO_SERVER_USER" ] || { echo "::error::DEMO_SERVER_USER is required in the selected demo environment."; exit 1; }[ -n "$DEMO_SERVER_SSH_KEY" ] || { echo "::error::DEMO_SERVER_SSH_KEY is required in the selected demo environment."; exit 1; }+ [ -n "$DEMO_EXPECTED_HOSTNAME" ] || { echo "::error::DEMO_EXPECTED_HOSTNAME is required in the selected demo environment."; exit 1; }[ -n "$DEMO_LOCAL_BASE_URL" ] || { echo "::error::DEMO_LOCAL_BASE_URL is required in the selected demo environment."; exit 1; }[ -n "$DEMO_PUBLIC_HEALTH_URL" ] || { echo "::error::DEMO_PUBLIC_HEALTH_URL is required in the selected demo environment."; exit 1; }@@ -237,6 +239,25 @@ jobs:ssh-keyscan -H "$DEMO_SERVER_HOST" >> ~/.ssh/known_hostschmod 600 ~/.ssh/known_hosts+ - name: Verify target host identity+ env:+ DEMO_SERVER_HOST: ${{ secrets.DEMO_SERVER_HOST }}+ DEMO_SERVER_USER: ${{ secrets.DEMO_SERVER_USER }}+ run: |+ set -euo pipefail+ REMOTE_HOSTNAME="$(+ ssh -i ~/.ssh/id_ed25519 \+ -o IdentitiesOnly=yes \+ -o StrictHostKeyChecking=yes \+ -o UserKnownHostsFile=~/.ssh/known_hosts \+ "$DEMO_SERVER_USER@$DEMO_SERVER_HOST" \+ "hostname"+ )"+ [ "$REMOTE_HOSTNAME" = "$DEMO_EXPECTED_HOSTNAME" ] || {+ echo "::error::Demo environment points at host $REMOTE_HOSTNAME but expected $DEMO_EXPECTED_HOSTNAME."+ exit 1+ }+- name: Resolve demo service identityid: configrun: |diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.mdindex dbb48de40d..c21057c077 100644--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md@@ -182,10 +182,12 @@ reusing the stable runtime in place.That same preview deployment boundary also owns service-identity isolation andpublic-shell parity proof. Preview demo runs must fail closed onto thededicated preview service identity instead of defaulting back to the stable-`pulse` instance, and demo deploy/update verification must prove that the-public demo HTML serves the same frontend entry asset as the target service or-freshly built preview artifact rather than treating a passing `/api/health`-response as enough evidence that the public shell actually updated. That proof+`pulse` instance, must prove that the SSH target reports the governed expected+hostname before any installer or binary copy runs, and demo deploy/update+verification must prove that the public demo HTML serves the same frontend+entry asset as the target service or freshly built preview artifact rather than+treating a passing `/api/health` response as enough evidence that the public+shell actually updated. That proofmust use a deterministic HTML parser for the actual module entry script ratherthan brittle escaped shell regex or a first-match asset scrape that can faildifferently over SSH or select the wrong preloaded chunk.diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.goindex 03fac85d5d..6845250eb4 100644--- a/scripts/installtests/build_release_assets_test.go+++ b/scripts/installtests/build_release_assets_test.go@@ -117,11 +117,15 @@ func TestDeployDemoWorkflowFailsClosedForPreviewAndVerifiesFrontendParity(t *tesworkflow := string(workflowBytes)required := []string{+ `DEMO_EXPECTED_HOSTNAME: ${{ vars.DEMO_EXPECTED_HOSTNAME }}`,`DEMO_LOCAL_BASE_URL: ${{ vars.DEMO_LOCAL_BASE_URL }}`,+ `[ -n "$DEMO_EXPECTED_HOSTNAME" ] || { echo "::error::DEMO_EXPECTED_HOSTNAME is required in the selected demo environment."; exit 1; }`,`[ -n "$DEMO_LOCAL_BASE_URL" ] || { echo "::error::DEMO_LOCAL_BASE_URL is required in the selected demo environment."; exit 1; }`,`Capture expected frontend entry asset`,+ `Verify target host identity`,`SERVICE_NAME="pulse-v6-preview"`,`Preview demo deployments must not target the stable pulse service.`,+ `Demo environment points at host $REMOTE_HOSTNAME but expected $DEMO_EXPECTED_HOSTNAME.`,`Verify frontend parity`,`extract_entry_asset()`,`<script\b[^>]*\bsrc=\"(/assets/index-[^\"]*\.js)\"`,diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.pyindex a72457173d..75c990f2d3 100644--- a/scripts/release_control/release_promotion_policy_test.py+++ b/scripts/release_control/release_promotion_policy_test.py@@ -231,12 +231,18 @@ class ReleasePromotionPolicyTest(unittest.TestCase):self.assertIn("latest published release for target", demo)self.assertIn('SERVICE_NAME="pulse-v6-preview"', demo)self.assertIn("Preview demo updates must not target the stable pulse service.", demo)+ self.assertIn("DEMO_EXPECTED_HOSTNAME", demo)+ self.assertIn("Verify target host identity", demo)+ self.assertIn("Demo environment points at host $REMOTE_HOSTNAME but expected $DEMO_EXPECTED_HOSTNAME.", demo)self.assertIn("Verify frontend parity", demo)self.assertIn("extract_entry_asset()", demo)self.assertIn(r'<script\b[^>]*\bsrc=\"(/assets/index-[^\"]*\.js)\"', demo)self.assertIn("Public demo is serving $PUBLIC_ASSET but the target service is serving $REMOTE_ASSET.", demo)self.assertIn('SERVICE_NAME="pulse-v6-preview"', preview_deploy)self.assertIn("Preview demo deployments must not target the stable pulse service.", preview_deploy)+ self.assertIn("DEMO_EXPECTED_HOSTNAME", preview_deploy)+ self.assertIn("Verify target host identity", preview_deploy)+ self.assertIn("Demo environment points at host $REMOTE_HOSTNAME but expected $DEMO_EXPECTED_HOSTNAME.", preview_deploy)self.assertIn("Verify frontend parity", preview_deploy)self.assertIn("extract_entry_asset()", preview_deploy)self.assertIn(r'<script\b[^>]*\bsrc=\"(/assets/index-[^\"]*\.js)\"', preview_deploy)