apphost.addon.apply
Ensure Nostr Buzz (WebSocket relay + Redis + MinIO) on a claimed AppHost site: Redis, MinIO, and relay are created if missing and updated on re-apply. This is not native Chat Relay, not Orkestia AppData conversations, and not DPWAI Chat Relay REST/SSE. Postgres is the site's AppData instance (not Neon, not in-cluster). Forces the Machine always-on. Does not steal the CloudFront site host.
Apply Nostr Buzz (WebSocket relay), not native Chat Relay, on a claimed AppHost site.
Overview
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-apphost |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | Yes | — | Claimed AppHost site (the project) |
addon | string | Yes | — | Addon name. v1 ships buzz only |
sku | string | No | small | Shared size class small |
custom_hostname | string | No | — | Optional customer subdomain CNAMEd to buzz-<slug>.orkestia.dev |
workflow_run_id | string | No | — | Engine-stamped parent run id when this runs as a DAG step (buzz.space.enable/delete) |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | No | — | — |
addon | string | No | — | — |
sku | string | No | — | — |
custom_hostname | string | No | — | — |
site | json | No | — | — |
provision | json | No | — | — |
credential | json | No | — | — |
relay_key | json | No | — | — |
materialize | json | No | — | — |
secrets_key | json | No | — | — |
secrets_material | json | No | — | — |
owner_keys | json | No | — | — |
plan | json | No | — | — |
web | json | No | — | — |
foundation | json | No | — | — |
appdata_secret | json | No | — | — |
relay_secret | json | No | — | — |
redis | json | No | — | — |
minio | json | No | — | — |
relay | json | No | — | — |
addon_ingress | json | No | — | — |
policy | json | No | — | — |
wait_relay | json | No | — | — |
wait_redis | json | No | — | — |
wait_minio | json | No | — | — |
wait_minio_pvc | json | No | — | — |
wait_git_pvc | json | No | — | — |
pvc_ok | json | No | — | — |
deployments | json | No | — | — |
check | json | No | — | — |
ack | json | No | — | — |
failure_reason | string | No | — | Engine-stamped failure reason |
failure_type | string | No | — | Stable failure classification |
failed_action | string | No | — | Action that failed |
failed_at_state | string | No | — | State when the workflow failed |
failed_step | json | No | — | Failed DAG step envelope |
failed_layer | json | No | — | Failed DAG layer envelope |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
compensation_trigger | json | No | — | — |
comp_queue | json | No | — | — |
comp_current_layer | json | No | — | — |
comp_retry_count | json | No | — | — |
DAG Layers
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | resolve | apphost.database.prepare | apphost.web.ack |
| 2 | provision | appdata.instance.provision | apphost.web.ack |
| 3 | credential | appdata.credential.ensure-app | apphost.web.ack |
| 4 | relay_key | identity.key.ensure, identity.key.ensure | apphost.web.ack |
| 5 | materialize | identity.key.materialize, identity.key.materialize | apphost.web.ack |
| 6 | owner_keys | identity.key.query | apphost.web.ack |
| 7 | prepare | apphost.addon.prepare | apphost.web.ack |
| 8 | foundation | k8s.manifest.sync | apphost.web.ack |
| 9 | secrets | kubernetes.secret.ensure, kubernetes.secret.ensure | apphost.web.ack |
| 10 | ingress | k8s.manifest.sync | apphost.web.ack |
| 11 | redis | k8s.manifest.sync | apphost.web.ack |
| 12 | minio | k8s.manifest.sync | apphost.web.ack |
| 13 | relay | k8s.manifest.sync | apphost.web.ack |
| 14 | edge | k8s.manifest.sync, k8s.manifest.sync | apphost.web.ack |
| 15 | wait | kubernetes.deployment.wait_for_available, kubernetes.deployment.wait_for_available, kubernetes.deployment.wait_for_available | apphost.web.ack |
| 16 | volumes | kubernetes.pvc.wait_for_bound, kubernetes.pvc.wait_for_bound | apphost.web.ack |
| 17 | volumes_ok | apphost.addon.pvc-bound-check | apphost.web.ack |
| 18 | observe | kubernetes.deployment.list | apphost.web.ack |
| 19 | verify | apphost.addon.ensure-check | — |
Execution Flow
Compensation
When any layer fails, its compensation steps run in reverse order to roll back the work completed so far.
Sub-workflows
| Sub-workflow | Step name |
|---|---|
apphost.database.prepare | site |
appdata.instance.provision | provision |
appdata.credential.ensure-app | credential |
identity.key.ensure | relay_key |
identity.key.materialize | materialize |
identity.key.query | owner_keys |
apphost.addon.prepare | plan |
k8s.manifest.sync | foundation |
kubernetes.secret.ensure | appdata_secret |
kubernetes.deployment.wait_for_available | wait_relay |
kubernetes.pvc.wait_for_bound | wait_minio_pvc |
apphost.addon.pvc-bound-check | pvc_ok |
kubernetes.deployment.list | deployments |
apphost.addon.ensure-check | check |
apphost.web.ack | ack |
Outcomes
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
applied | SUCCESS | Addon applied on the shared AppHost pool | site, provision, credential, relay_key, materialize, owner_keys, plan, redis, minio, relay |
failed | FAILURE | Apphost workflow failed | failure_reason |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "apphost.addon.apply",
"initial_data": {
"site_uuid": "value",
"addon": "value"
}
}