ONEWEB6.0Docs

Part 7 — Deploying and Operating

15 min readDocumentation
Audienceoperators.
Sources this page was written from

DEPLOYMENT-CENTER-PLAN.md, DEPLOYMENT-CENTER-ARCHITECTURE.html, CLAUDE.md, kernel-poc/src/ (tools/deploy.js, deployer.js, deploy-local.js, deploy-k8s.js, four-eyes.js, bundle tools); for Monitors and alerts, OBSERVABILITY-PLAN.md sections 23.10–23.13. Use case: UC-10.

7.1 Environments and targets#

An Environment (Dev, Test, Prod…) belongs to a workspace and holds: app addresses, service bindings per network view, Connection bindings, identity, engine settings, the deploy target, approval rules and pipeline gates. The Environments tab has a "Runtime setup" block per environment that lists what is unset and what a deploy will refuse, in the deploy's own words.

Target State
Local Apps run as host processes in .deploy/<ws>/<env>/{a,b}/<app> (blue/green slots), never in generated/
Kubernetes / OpenShift One image per app, Helm chart (Ingress vs Route), --atomic rollback
AWS Blocked by name; no driver yet

env_set_target sets it; env_test_target is "Test connection".

flowchart LR ENV["Environment<br/>Dev, Test, Prod"] --> T["Deploy target"] T -->|"Local"| L["Host processes<br/>slots a and b"] T -->|"Kubernetes or OpenShift"| K["One image per app<br/>Helm chart"] T -->|"AWS"| X["Blocked by name<br/>no driver yet"]
Environment, target and where the app runs
The workspace's Environments tab: an environment's approval rule, an app's address, and Runtime setup (a throwaway journey workspace)
The workspace's Environments tab: an environment's approval rule, an app's address, and Runtime setup (a throwaway journey workspace)

7.2 Deployment Center: plan, start, watch#

An observed failed run (builder-journey test, 2026-11-05). In an isolated workspace whose Dev environment was fully set up (services, identity provider, run history, engine and its keys, an app database), the run's steps were preflight succeeded, database succeeded, build failed, then identity, rollout and health skipped. The build step refuses before building anything: "the app's env cannot be derived — nothing was built, and nothing is started with a blank", naming each variable the app reads that nothing supplies. Here those were DECISION_RUNTIME_URL and DECISION_RUNTIME_KEY. The generated app reads them only to evaluate decisions on an environment's decision runtime and otherwise evaluates in-process, but the deploy treats any variable the app reads and nothing derives as required, and these two are not in its optional list (OPTIONAL_APP_ENV in deploy-app-env.js). This was a defect and is fixed (commit dff7d6f): both names are now optional for an app, since it evaluates decisions in-process when no decision runtime is declared, and an environment that does declare one still derives both. After the fix the same journey passed 47 of 47 steps, with the run's six steps (preflight, database, build, identity, rollout, health) all succeeding. A Kernel and deployer started before the fix must be restarted to pick it up. For any other name the same refusal still means: fill in Runtime setup, or put it in the environment's override file (.deploy/<workspace>/<env>/<app>.env.local).

What the screen shows (observed, read-only, 2026-11-05; no deploy was started). Open it from the app's project page (the Deployment Center tile) or the rail. It has an Overview and an Environments & targets tab. The overview lists notes such as "SIT has no target — Nothing can deploy there until it says where it runs", then a row per environment (for example Dev and Prod as Local, this host; others no target) showing what is running there and, for Prod, "Risk officer approves". Below are the Releases and, for the selected release, a tab per environment with its members. The Operations side (the OPS toggle) offers a Work Portal view (open tasks across processes and apps, with how many are past SLA; read-only) and an Operations view.

  1. Plan (deploy_plan, read-only): units, changes, steps, gates, every blocker, and a digest.
  2. Start (deploy_start): re-plans, refuses if the digest moved, then queues a run (one active run per environment; Postgres only).
  3. A deployer claims the run and executes steps through the target's driver. The facade starts one automatically (KERNEL_DEPLOYER=off disables it); the Center shows whether one is alive.
  4. Step order: preflight → set up app databases → build → migrate → identity → processes → flows → rollout → health. Gate steps (gate:<id>) are inserted as chosen.
  5. History is two events: deployment_started and deployment_finished.
flowchart LR A["Preflight"] --> B["Set up<br/>app databases"] B --> C["Build"] C --> D["Migrate"] D --> E["Identity"] E --> F["Processes"] F --> G["Flows"] G --> H["Rollout"] H --> I["Health"]
The steps of a deployment run, in order

Identity runs before the process deploy because the engine fixes a task's candidates when a process is deployed, so the first members must already be granted. A run lists only the steps its release needs (for example, no Build step when no app changes), and when the release includes Decisions served by an environment's decision runtime, a "Serve decisions" step runs between Flows and Rollout.

sequenceDiagram participant B as Builder participant K as Kernel participant D as Deployer participant R as Target driver B->>K: deploy_plan K-->>B: units, changes, steps, gates, blockers, digest B->>K: deploy_start K->>K: re-plan, refuse if the digest moved K->>K: queue the run in kernel.deploy_run D->>K: claim the run D->>R: execute each step R-->>D: step result D->>K: finish the run (deployment_finished)
Plan, start and run: who does what

A run builds from the current version; a release pinning an older one is blocked (pinned-not-current). A value nothing derives and no override supplies is refused by name before any build, all at once.

App env is derived (deploy-app-env.js): Connections the app reads, issuer, address, sidecar key, run history, policy keys, engine client, and DATABASE_URL from the app's own database, with secrets read from the vault. A hand-written .deploy/<ws>/<env>/<app>.env.local is only optional overrides and wins. npm run generate:app-env -- --env <env> writes the same block into a generated app's .env.local; restart the app afterwards.

7.3 Four-eyes and approvals#

Four-eyes rules make sure the person who made a change is not the only person who approves or ships it.

flowchart LR P["A release to deploy"] --> D1["Decision approval<br/>(not-approved)"] P --> R1["Residency check<br/>(release gate)"] P --> F1["Deploy four-eyes<br/>(refused by deploy_start)"] P --> G1["Pipeline gates<br/>(steps of the run)"] D1 --> S["Run proceeds"] R1 --> S F1 --> S G1 --> S
Release gates that can stop a deploy
Rule Meaning
Decision approval An approval covers one sequence; its approver wrote none of the changes since the previous one. env_set_four_eyes makes an environment require it; deploy_plan blocks not-approved.
Deploy four-eyes Someone other than the release's authors must press Deploy (bundle_release_gates). env_set_deploy_four_eyes sets it. Absent = OFF for an environment named Dev/Development, ON elsewhere. A decision approval never clears it.
Prod approval approveProd verb; separation-of-duties warnings if one person holds conflicting roles.

DevSecOps pipeline gates (G0 plan, G1 commit, G2 static, G3 supply-chain, G4 infrastructure, G5 test, G6 dynamic, G7 release, G8 deploy, G9 operate) are chosen per environment in the Deployment Center ("Pipeline gates" on each environment's card; env_set_pipeline). Absent means no gates. They appear as gate:<id> steps in deploy_plan, and so in its digest.

flowchart LR A["Preflight"] --> B["Pre gates<br/>G0 G1 G2 G3 G5 G8"] B --> C["Set up<br/>app databases"] C --> D["Build"] D --> E["Build gates<br/>G4 and G7"] E --> F["Remaining steps"] F --> G["Health"] G --> H["Post gates<br/>G6 and G9"]
Where pipeline gate steps sit in a run

A release with no app to build has no Build step, and its build gates then follow the pre gates.

7.4 Rollback#

deploy_rollback puts back what served each app before a succeeded run: the other Local slot or the previous Helm revision — never a rebuild. dryRun says what would happen. Hub flows roll back with hub_rollback (Part 5). A driver refuses a run whose environment's target changed after planning.

flowchart TB R["deploy_rollback"] --> L["Local target:<br/>the other slot"] R --> K["Kubernetes or OpenShift:<br/>the previous Helm revision"] R --> N["Never a rebuild"]
What deploy_rollback puts back

7.5 App databases and Data Studio#

The deploy step "Set up app databases" runs before the build: it creates the schema and missing tables as the owner, then the least-privilege reader (and writer, where no approval is required). The owner login comes from the vault, pasted write-only in Data Studio's "Set up a database". Blockers: database-not-ready, no-engine, engine-unresolved. Migrations are generated; blocked ones are never emitted.

7.6 Operations consoles#

The consoles let operators watch runs, failed items and decision drift without changing the system by accident.

Three consoles, read-only apart from three confirmed actions.

View Shows
Flow runs Run history from Jaeger; Replay (with plan and acknowledgements)
Failed items Dead letters and failed files; Replay; Delete (reason required)
Decision drift Board of monitored decisions with drift scores
Health & alerts Whether the environment's telemetry answers, which alert rules are firing, and the silences in force (read-only; no acknowledge or silence button here)

The Work Portal console and the Workspace console are separate (consoles listing in Part 4).

Health & alerts#

Pick an environment that has a metrics store bound (a picker appears when there are several). The view shows:

  • Components. The stores and services health is judged from, worst first: metrics, the collector, run history, logs once bound, the Kernel, the deployer, the database and the brokers. A store that does not answer is shown as Not answering, never as healthy. Not bound and Not checked mean nothing is measured there, not that it is fine.
  • Alerts. Every alert rule that the environment's published Monitors compile to, firing first. A row says whether it is firing, pending or quiet, and whether someone has acknowledged it or it is silenced. A rule that fails to evaluate is marked Rule failing: it is watching nothing.
  • A selected alert shows what it watches, its route, when it began, who acknowledged it and any silence, and its runbook link.

If one of the three reads fails, the view says that part is not known beside the parts that did answer. It does not show an empty list.

Monitors: alerts, objectives and who is told#

A Monitor is where you say what to watch in a flow, when that is a problem, and who is mailed. Make one from + New → Monitor in an app; it opens in the Monitor designer.

Steps
  1. In the Monitor designer click Add a route. Choose the mail server, list who is mailed (one address per line) and tick the severities the route carries.
  2. Click Add an alert. Give it a title, choose A measurement crosses a limit, the flow, Error rate, a comparison and a limit (a ratio: 0.05 is five percent), how long it must hold (for example 10m), a severity and the route.
  3. Publish the Monitor from the status chip.

7.7 The Work Portal#

Generated per app. Officers see their tasks (work parties are read from current roles, not frozen candidates), start cases ("+ Start a case" needs the correlation field), and complete tasks. Writes to the engine need the bpm-engine-caller token (OW_ENGINE_CLIENT_ID/SECRET in the app's env); without it every portal write fails closed.

The Work Portal's Start a case form: applicant, amount, date, loan type, and a District list that follows the Province chosen (a throwaway journey app, test user)
The Work Portal's Start a case form: applicant, amount, date, loan type, and a District list that follows the Province chosen (a throwaway journey app, test user)
The task screen: the case, its step, the form with what the start form stored, the SLA, and "Claim this task" for someone in the work party
The task screen: the case, its step, the form with what the start form stored, the SLA, and "Claim this task" for someone in the work party
Completed: each finished task with its case reference, cycle time and who closed it
Completed: each finished task with its case reference, cycle time and who closed it

The three screens were captured on 2026-11-06 by the builder-journey test (47 of 47 steps passed), signed in as a test user of a throwaway app on Dev. The Completed list also shows other test cases that user closed on the shared engine. The inbox screen is not shown: its captures showed the four summary tiles (Yours, Breached, At risk, Unclaimed) cut to 38px with the filter bar drawn over them. That was a real defect, not a timing artefact (still 38px against 86px of content 1.5 s later), caused by the base stylesheet giving every button a fixed height that the tiles did not reset. It is fixed in the generator (compile-ds.js) and covered by test-compile-ds.js; an app shows the fix after its next regeneration. A regeneration of loan-onboarding into a scratch folder on 2026-11-08 carries it (.ow-wp-tile { … height: auto; … } in app/layout.css); no portal was built and rendered from it, so a new capture has not been taken.

7.8 Backup and rebuild#

  • cd kernel-poc && npm run restore rebuilds all 6.0 state (the Kernel, seeds, apps) from seed scripts. Artifacts that exist only in a database are a cache, not a corpus.
  • Over a populated store, a restore step can fail on purpose where a seed and the stored artifact both changed (EDITED_SINCE_IMPORT); resolve with node src/seed-adopt.js <id> (--dry first).
  • A fresh worktree lacks local secrets (platform-dev/openbao/*.json, rabbitmq/rabbitmq.env); copy them from the main checkout before restore.
  • docker compose -f platform-dev/docker-compose.yml down -v cannot reach 6.0 state.
  • Proof tooling: npm run restore:time, npm run test:restore.

7.9 Troubleshooting by symptom#

Start from what you see; the diagram covers the two most common deploy problems and the table lists the rest.

flowchart TB S["Deploy does not complete"] --> Q["Is the run still queued"] Q -->|"yes"| D["No deployer alive, or it is busy<br/>with another run:<br/>the facade starts one unless<br/>KERNEL_DEPLOYER=off, or run<br/>npm run deployer"] Q -->|"no"| B["Did the Build step fail"] B -->|"env cannot be derived"| F["Fill in Runtime setup<br/>or the override file"] S --> P["Or was it refused<br/>before a run"] P -->|"pinned-not-current"| R["Re-pin the app to its<br/>current version"]
A deploy that does not complete
Symptom Likely cause / action
Designer shows old behavior after a fix pnpm serve serves a prebuilt dist/; rebuild the package (and every SDK consumer)
Designer never mounts; reading 'push' in react-dom Loaded via rsbuild dev; use build + serve
Hub apply says "not ready", env just changed An SFTP inbox directory does not exist; create it first
SFTP file trigger silent Stale pinned host key; re-run provision-sftp.js
Credit check answers 401 after a key change App's .env.local older than the vault; generate:app-env, restart; use key:rotate
Browser tests fail after a UI change UI contract ids changed; bump CONTRACT_VERSION, tell the TTB session
Login silently dead after an issuer change OIDC discovery cached; restart the app
A regen broke a running next dev Regenerate refuses under a live dev server unless --while-running
Queue consumer re-runs a failed message maximumRetryAttempts misset; only 0 is one attempt
Deploy run stays queued No deployer alive; the Center says so; start one or restart the facade
Build step: "the app's env cannot be derived… reads it and nothing derives it" The generated app reads a variable the environment does not supply. Seen for DECISION_RUNTIME_URL and DECISION_RUNTIME_KEY on an app with a Decision step (fixed in dff7d6f; restart an older Kernel and deployer); otherwise fill in Runtime setup or the override file
Restore step refuses Both seed and stored artifact changed; use seed-adopt.js

Full gotcha list: CLAUDE.md.