workflows
The workflows group reads the provisioning workflows of a node and lets an operator abort, retry, pause or resume one. Workflows are started by other modules, such as metal for each workflow-driven provision state, not through this group. Every method is decided on the node (`compute-node`): reads as `compute:workflows:read`, the others as `compute:workflows:manage`. See [Provisioning workflows](/docs/guides/bare-metal/workflows).
The workflows group reads the provisioning workflows of a node and lets an operator abort, retry, pause or resume one. Workflows are started by other modules, such as metal for each workflow-driven provision state, not through this group. Every method is decided on the node (compute-node): reads as compute:workflows:read, the others as compute:workflows:manage. See Provisioning workflows.
All 6 methods are served by this release.
| Method | Kind | Authorization | Phase | Status |
|---|---|---|---|---|
get | read | compute:workflows:read @ compute-node | v0.2 | registered |
list | read | compute:workflows:read @ compute-node | v0.2 | registered |
abort | mutation | compute:workflows:manage @ compute-node | v0.2 | registered |
retry | mutation | compute:workflows:manage @ compute-node | v0.2 | registered |
pause | mutation | compute:workflows:manage @ compute-node | v0.2 | registered |
resume | mutation | compute:workflows:manage @ compute-node | v0.2 | registered |
get
POST /api/compute/workflows/get
Returns one workflow of the node with all its steps, including each step's phase, state, attempt, command, deadline, result and error.
NOT_FOUND unless the workflow belongs to the tenant and the node.
- Kind: read
- Authorization:
compute:workflows:read@compute-node - Module:
provision - Phase: v0.2 (registered)
Input
| Field | Type | Required | Constraints |
|---|---|---|---|
tenantId | string | yes | at most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$ |
nodeId | string | yes | at most 57 characters; matches ^node_[0-9a-hjkmnp-tv-z]{26,52}$ |
workflowId | string | yes | at most 55 characters; matches ^wf_[0-9a-hjkmnp-tv-z]{26,52}$ |
list
POST /api/compute/workflows/list
Returns a page of the node's workflows with their steps, newest first.
limit defaults to 20 and is at most 100; pass the returned cursor to read the next page.
- Kind: read
- Authorization:
compute:workflows:read@compute-node - Module:
provision - Phase: v0.2 (registered)
Input
| Field | Type | Required | Constraints |
|---|---|---|---|
tenantId | string | yes | at most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$ |
nodeId | string | yes | at most 57 characters; matches ^node_[0-9a-hjkmnp-tv-z]{26,52}$ |
limit | integer | 1-100; default 20 | |
cursor | string | at most 256 characters |
abort
POST /api/compute/workflows/abort
Cancels a workflow: pending steps are cancelled, the in-flight step's command is cancelled, and the cleanup phase runs before the workflow ends cancelled.
- A
pendingorfailedworkflow is cancelled at once, with no cleanup, and publishesworkflow.cancelled. - Aborting a workflow that is already cancelled or cancelling does nothing; aborting a succeeded one is
INVALID_STATE. - The optional
reason(at most 512 characters) is recorded in the workflow's error.
Aborting a workflow that metal owns fails the node; steer metal nodes with metal.abort and metal.recover instead.
- Kind: mutation
- Authorization:
compute:workflows:manage@compute-node - Module:
provision - Phase: v0.2 (registered)
Input
| Field | Type | Required | Constraints |
|---|---|---|---|
tenantId | string | yes | at most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$ |
nodeId | string | yes | at most 57 characters; matches ^node_[0-9a-hjkmnp-tv-z]{26,52}$ |
workflowId | string | yes | at most 55 characters; matches ^wf_[0-9a-hjkmnp-tv-z]{26,52}$ |
reason | string | at most 512 characters |
retry
POST /api/compute/workflows/retry
Runs a failed workflow again from fromStep, by default the first main step that did not succeed; that step and every later main step return to pending with the next attempt number, and on-failure and cleanup steps are re-armed.
INVALID_STATEunless the workflow isfailed.INVALID_INPUTwhenfromStepis not a main step, or when every main step succeeded.CONFLICTwhen the node has another active workflow.
Publishes workflow.retried with the fromStep.
- Kind: mutation
- Authorization:
compute:workflows:manage@compute-node - Module:
provision - Phase: v0.2 (registered)
Input
| Field | Type | Required | Constraints |
|---|---|---|---|
tenantId | string | yes | at most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$ |
nodeId | string | yes | at most 57 characters; matches ^node_[0-9a-hjkmnp-tv-z]{26,52}$ |
workflowId | string | yes | at most 55 characters; matches ^wf_[0-9a-hjkmnp-tv-z]{26,52}$ |
fromStep | string | at most 256 characters |
pause
POST /api/compute/workflows/pause
Pauses a running workflow: the step in flight finishes, but no further step starts until resume.
INVALID_STATE when the workflow is not running, or when it is in its cleanup phase after a failure or abort. Publishes workflow.paused.
- Kind: mutation
- Authorization:
compute:workflows:manage@compute-node - Module:
provision - Phase: v0.2 (registered)
Input
| Field | Type | Required | Constraints |
|---|---|---|---|
tenantId | string | yes | at most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$ |
nodeId | string | yes | at most 57 characters; matches ^node_[0-9a-hjkmnp-tv-z]{26,52}$ |
workflowId | string | yes | at most 55 characters; matches ^wf_[0-9a-hjkmnp-tv-z]{26,52}$ |
resume
POST /api/compute/workflows/resume
Puts a paused workflow back to running and queues it to continue with its next step.
INVALID_STATE when the workflow is not paused. Publishes workflow.resumed.
- Kind: mutation
- Authorization:
compute:workflows:manage@compute-node - Module:
provision - Phase: v0.2 (registered)
Input
| Field | Type | Required | Constraints |
|---|---|---|---|
tenantId | string | yes | at most 128 characters; matches ^[A-Za-z0-9._:-]{1,128}$ |
nodeId | string | yes | at most 57 characters; matches ^node_[0-9a-hjkmnp-tv-z]{26,52}$ |
workflowId | string | yes | at most 55 characters; matches ^wf_[0-9a-hjkmnp-tv-z]{26,52}$ |
Better Compute is created by Sean Filimon
Last updated
webhooks
Per-tenant subscriptions that POST every matching committed event to an HTTPS endpoint, signed with a secret only the tenant and Better Compute know, with at-least-once delivery, retries with backoff, dead letters and redelivery. The events module hosts this group, and every method decides `compute:webhooks:manage` on `compute-tenant/{tenantId}`. See [Webhooks](/docs/guides/events/webhooks).
CLI
The better-compute command line 0.1.1: 189 commands.