Repository navigation
Description
Goal
Ship reusable Ops for the two local-deploy targets that have no open questions —
emulated AWS via floci and vanilla k8s via k3d — so "deploy chant locally, no
cloud account" is a first-class flow. Azure and GCP are gated on feasibility research
and tracked separately (see the companion research issue).
Why Ops, not a lexicon
An Op (packages/core/src/op/) is an imperative, phased procedure with primitives like
kubectlApply, helmInstall, waitForStack — exactly "provision, wait, apply, tear
down." k3d and Floci are backends you provision and point an apply at, not resource
catalogs to serialize. Placement follows the capability-relocation seam: the Floci
activity lives in the aws lexicon; the k3d activity is cloud-agnostic (core or the
k8s lexicon).
Target 1 — floci (emulated AWS)
Already feasible: chant's cfn-deploy honors AWS_ENDPOINT_URL
(lexicons/aws/src/components/cloud-executor.ts), and floci emulates the CloudFormation
control plane (/_localstack/health reports cloudformation). This work packages the
boot/teardown that test/components-aws-e2e.sh and test/adopt-alb-services-e2e.sh
already do by hand.
flociUp/flociDownactivities (in theawslexicon):docker run -d --rm -p <port>:4566 floci/floci:<pin>; port configurable
(E2E uses 4599 to avoid clashing with anything on 4566).- Mount
/var/run/docker.sockwhen ECR is needed — floci ≥ 1.5.30 starts a real
backing container for the ECR registry. - Health-check
GET /_localstack/healthuntilcloudformationis ready. - Export
AWS_ENDPOINT_URL=http://localhost:<port>and dummy creds
(AWS_ACCESS_KEY_ID=test,AWS_SECRET_ACCESS_KEY=test,AWS_REGION). flociDown:docker rm -fthe container.
local-aws.op.tscomposing: boot → wait-ready → apply (existing component /
cfn-deploypath, unchanged) → teardown.
Target 2 — k3d (vanilla k8s)
No unknowns; real Kubernetes, kubectl apply unchanged.
k3dUp/k3dDownactivities (core ork8slexicon):k3d cluster create <name>(optional--config <k3d.yaml>for
ports/registry/agents), merge kubeconfig.k3dDown:k3d cluster delete <name>.
local-k8s.op.tscomposing: create → wait nodes Ready →kubectlApplyan
existing chant k8s stack → teardown.- Enables the GCP feasibility spike in the research issue (Config Connector needs a
cluster to run on).
Optional
Wire a local lifecycle env so chant lifecycle plan local and the apply naturally
target the local backend.
Reference points
packages/core/src/op/{builders,index,local-executor,resource}.ts(Op machinery;
resource.tsis theTemporal::Oporchestrate binding).lexicons/aws/src/components/cloud-executor.ts(AWS_ENDPOINT_URLinjection).test/components-aws-e2e.sh,test/adopt-alb-services-e2e.sh(the bash to replace).
Acceptance criteria
-
flociUp/flociDown+local-aws.op.ts: an existing AWS example
(e.g.adopt-alb-services) deploys end-to-end via the Op, with bring-up and
teardown owned by the Op — no hand-written boot bash. -
k3dUp/k3dDown+local-k8s.op.ts: an existing k8s stack applies to a k3d
cluster the Op creates and destroys. - Activities placed per the seam (Floci in
aws, k3d agnostic). - The two E2E scripts' boot/teardown steps are replaced by (or thin wrappers over)
the Ops.
Out of scope
- Azure (
floci-az) and GCP (floci-gcp) — feasibility unknown, see companion research
issue. - The browser/WASM sandbox and hosted agent loop (parked).
- Real-cloud deploys (same Ops, BYO creds).
Activity
lex00 commentedon Jul 7, 2026
Companion research issue for Azure + GCP feasibility: #705
lex00 commentedon Jul 7, 2026
Deploy-Op coverage audit (2026-07-07) — reuse vs gaps
Checked what deploy Ops/apply paths chant already has, so this work extends them rather than rebuilding:
lexicons/aws/src/components/shipsapply.ts,cloud-executor.ts(honorsAWS_ENDPOINT_URL),publish.ts,wait-aws.ts,safety.ts, … and real deploy Ops exist:examples/gitlab-aws-alb-op/ops/alb-deploy.op.ts,lexicons/aws/examples/lifecycle-reconcile-aws/ops/{apply,reconcile}.op.ts. ⇒ the floci-aws Op wraps the existing AWS apply (local emulator bring-up aroundcomponents/apply.ts), not a new path.kubectlApply/helmInstall/waitForStack; deploy Ops likeexamples/k8s-gke-microservice/ops/gke-bootstrap.op.ts. ⇒ the k3d Op wraps existingkubectlApplywith cluster bring-up.components/dir and no deploy Op — onlyops/lexicon-upgrade/azure-upgrade.op.ts(a version bump). Azure deploy today = emit an ARM template and runaz deploymentby hand (only documented in thechant-azureskills).Implication: k3d + floci-aws here are low-risk reuse. But Azure has no first-class apply path at all, so even after the floci-az deployments provider (#705), chant still needs an Azure apply Op/component before local (or real) Azure deploys are usable. Flagged on #705.
feat(op): add k3d local-cluster activities for #704 (#708)
lex00 commentedon Jul 8, 2026
✅ k3d Op — done in #708 (merged).
k3dUp/k3dDownbuilders (core) + activity impls (temporal lexicon) with idempotent create; k3d merges kubeconfig + switches context so a followingkubectlApplytargets the cluster.examples/local-op-quickstart/ops/local-k8s.op.ts: k3d up → apply → wait → down.Remaining for this issue: the floci-aws Op (
flociUp/flociDownin the aws lexicon, wrappingcomponents/apply.ts+AWS_ENDPOINT_URL).feat(op): add floci AWS-emulator activities for #704 (#709)