Deployments

A Deployment is a versioned snapshot of your component configuration — the set of activities, workflows, webhook endpoints, and cron tasks that Obelisk should run. Every time you push a new deployment.toml to the server, Obelisk stores it as a new Deployment record in the database.

What a Deployment stores

Each Deployment record contains:

Because the manifest is stored verbatim and deployment-owned sources are stored with it, the server can recreate a deployment directory and provide source context to replay, advance, logs, and backtrace inspection even after the active deployment has moved on.

Execution - Deployment relationship

Every execution carries a reference to the Deployment that was active when it was locked for processing. This means:

Deployment lifecycle

Only zero or one deployment can be enqueued and one can be active at any given time.

Hot redeploy

Hot redeploy activates a new deployment without restarting the server. The behavior differs by component type:

Hot redeploy is triggered via:

obelisk deployment apply <PATH|ID>           # CLI: submit + hot-redeploy

or via the Web API:

curl "127.1:5005/v1/deployments/Dep_.../switch" \
  -H content-type:application/json -X PUT -d '{"hot_redeploy": true}'

If a configuration change cannot be applied hot (e.g. a component that requires a full restart), the API returns "restart_required" and the deployment is enqueued for the next startup.

Upgrading workflow executions

The default auto locking strategy upgrades compatible in-flight workflow executions automatically. If a workflow uses by_component_digest, existing in-flight executions continue to reference the old component digest. To migrate one to the new version, use the upgrade API:

OLD=$(curl "127.1:5005/v1/executions/${EXECUTION_ID}/status" -H accept:application/json | jq .component_digest)
NEW=$(curl '127.1:5005/v1/components?name=my_workflow' -H accept:application/json | jq .[0].component_id.input_digest)

curl "127.1:5005/v1/executions/${EXECUTION_ID}/upgrade" \
  -H content-type:application/json -X PUT \
  -d "{\"old\": $OLD, \"new\": $NEW}"

The RPC replays the execution history against the new component and refuses to switch if the new workflow code is not replay-compatible — unless skip_determinism_check is set to true.

Managing deployments

CLI:

CommandDescription
obelisk deployment submit <PATH>Store a deployment TOML; print the new ID
obelisk deployment enqueue <PATH|ID>Submit (if path) and enqueue for next restart
obelisk deployment apply <PATH|ID>Submit (if path) and hot-redeploy immediately
obelisk deployment listList recent deployments and their status
obelisk deployment activePrint the active deployment ID
obelisk deployment show <ID> [FILE]Show stored TOML or a stored file
obelisk deployment get <ID>Recreate deployment TOML and source files
obelisk deployment gcDelete unreferenced deployment file blobs

Web API: see Programmatic Access — Deployments.

gRPC: see the DeploymentRepository service in proto/obelisk.proto.