Choosing Your Deployment Model
chant covers the synthesis step — TypeScript in, validated artifacts out — and offers two optional layers beyond that. Knowing which layer fits your situation avoids unnecessary setup.
If you never use the operational layers, chant is a pure synthesis compiler — no executor, no state file, nothing to run. The orchestration layer is Temporal-native when you want durability and zero-dependency when you don’t: the local executor runs Ops in-process, and only gated or destructive applies need a Temporal cluster.
Synthesis Only
Section titled “Synthesis Only”chant build produces spec-native artifacts (CloudFormation, GitLab CI, Kubernetes manifests, etc.) and stops. Deployment happens however it always has: a CI pipeline, ArgoCD, Terraform, a manual kubectl apply. Nothing else to install.
Use this when:
- You already have a deployment pipeline you trust
- You want to adopt typed, linted IaC without changing operational tooling
- Your deployments are short-running or trivially retried from scratch
How to get started: Quick Start — the entire guide is synthesis-only.
# That's the complete picture for synthesis-only userschant buildkubectl apply -f dist/infra.yaml # or whatever your tooling does nextOps — Durable Deployment Workflows
Section titled “Ops — Durable Deployment Workflows”Ops are named, phased deployment workflows declared in *.op.ts files. chant build compiles each Op into a Temporal worker. chant run <name> starts the worker and submits the workflow to Temporal.
import { Op, phase, kubectlApply, shell } from "@intentius/chant-lexicon-temporal";
export default Op({ name: "api-deploy", phases: [ phase("Infra", [kubectlApply("dist/infra.yaml", { profile: "longInfra" })]), phase("App", [kubectlApply("dist/k8s.yaml")]), phase("Smoke", [shell("kubectl rollout status deployment/api")]), ], onFailure: [ phase("Rollback", [shell("kubectl delete -f dist/infra.yaml --ignore-not-found")]), ],});chant run api-deployYou get: live phase progress in the Temporal UI, automatic retry on activity failure, onFailure phases run if the workflow terminates with an error, and gate steps that pause the workflow until a human or external system sends a signal.
Use this when:
- Deployments take more than a few minutes
- You want to see current phase and history without grepping logs
- Some steps need to pause for human approval or an external event (DNS delegation, change-window approval)
- You want automatic rollback on failure without scripting it yourself
How to get started: Quick Start for synthesis, then the Ops guide for Op authoring and chant run. Requires a Temporal server or Temporal Cloud (free tier available).
Raw Temporal + chant
Section titled “Raw Temporal + chant”You write your own Temporal workflow TypeScript — signals, queries, updates, parallel activities — and use chant-synthesized YAML as the input those activities operate on. This is the approach shown in the Temporal Workflow-Driven Deploy tutorial.
// Your own Temporal workflowexport async function deployWorkflow(params: DeployParams): Promise<void> { await applySharedInfra(params); // activity calls kubectl apply on chant-built YAML await Promise.all([ applyRegionalInfra(params, 'east'), // parallel activities with heartbeat applyRegionalInfra(params, 'central'), applyRegionalInfra(params, 'west'), ]); setHandler(dnsSignal, () => { dnsReady = true; }); await condition(() => dnsReady, '48h'); // gate step — signal or auto-detect // ...}Use this when:
- You’re already running Temporal and have existing workers or workflow patterns
- You need signal/query/update patterns, search attributes, or schedule triggers that Op phases don’t expose
- You want full control over retry policies, heartbeat intervals, and workflow determinism
How to get started: Temporal Workflow-Driven Deploy tutorial.
Decision Table
Section titled “Decision Table”| Situation | Model |
|---|---|
| I have ArgoCD / Terraform / an existing deploy pipeline | Synthesis only |
| My deployment script is more than 50 lines and fails unpredictably | Ops |
| I need a human approval gate mid-deploy | Ops |
| I need parallel regional deploys with independent retry | Ops or raw Temporal |
| I’m already a Temporal shop with existing workers | Raw Temporal |
| I need custom Temporal search attributes or schedules | Raw Temporal |
| I need workflow-level queries during a running deploy | Raw Temporal (or Op + MCP op-status) |