Journey: Deploy AICR
A datacenter from nothing, in one command. The NVIDIA AI Cluster Runtime (AICR) publishes validated, version-locked recipes — GPU drivers, operators, system configuration — and renders them for Helm, Argo CD, Flux or Helmfile. It is explicit that it is not a cluster provisioner: you bring the cluster. Terraform is the one consumer that can put the cluster in the graph, and Turf is what converges that graph: the cluster in round one, sixteen Helm releases behind it in round two, certification as a step of the run. No GPU, no cloud account, no registry key — the whole kind recipe pulls anonymously.
Example: use-cases/datacenter/aicr-stack in turf-examples. Load skill_deployment first:
the configuration is checked out, and you drive it. One beat at a time; end each on a cue.
What it needs: Docker, kind and kubectl on the engine’s PATH. Round two pulls
sixteen charts’ worth of images; say it will take a while, and quote no number — the README
measured two clean runs that differed by a factor of three, and that number is the laptop’s
network, not the engine.
Beat 1 — The cluster in the graph (start here, tool-free)
Section titled “Beat 1 — The cluster in the graph (start here, tool-free)”Say what AICR is in two sentences and where the edge is: every renderer AICR ships treats the
cluster as a precondition, never a node in the graph. Then show the two hand-written files
that put it there — main.tf is about twenty lines:
resource "kind_cluster" "dc" { name = "${var.cluster_name}-${var.generation}" node_image = var.node_image wait_for_ready = true kind_config { … one control plane, var.worker_count workers … }}
module "stack" { source = "./bundle" # generated by `aicr bundle --deployer terraform` cluster_endpoint = kind_cluster.dc.endpoint # ties every release to this cluster's lifetime}bundle/ is the recipe service=kind, accelerator=h100, intent=inference rendered as
Terraform: 14 components, 16 dependency edges, a DAG four levels deep, one module call
per component with depends_on taken from the recipe’s own dependencyRefs. Nothing in it
was written by hand.
Then the file that makes this journey a run, not a deploy — aicr.turf.hcl, two Turf
actions:
action "turf_action" "certify" { # after the GPU Operator's release lands config { prompt = "Certify the runtime: read the ClusterPolicy and fail unless status.state is ready; report node count and GPU count." inputs = { release = caller.name, namespace = caller.namespace, context = "kind-…" } }}action_trigger "certify" { target = module.stack.module.gpu_operator.helm_release.this events = [after_create] actions = [action.turf_action.certify] on_failure = taint}action "turf_action" "handover" { … } # declared, not bound: invoked when the operator says soLocate the turf-examples checkout (hub: The examples) and check docker info,
kind version, kubectl version --client. Say the plan: register, bind, two rounds, certify,
hand over.
Your cue — something like “okay, let’s register it.”
Beat 2 — Register and bind
Section titled “Beat 2 — Register and bind”init({ path: "<examples>/use-cases/datacenter/aicr-stack", config_alias: "aicr" })— Turf’stofu init. Read the result out loud, briefly:kindandhelminstalled (with their versions and hashes — that is what a provider scan reads, see the guardrails journey), the declared local backend, the variables (cluster_name,generation,node_image,worker_count), and the module tree — one call per component.- Write
guide.auto.tfvarsin the example directory withworker_count = 2. Say why in one line: the day-2 journey drains a worker, and kind lifts the control plane’sNoScheduletaint only on a single-node cluster, so one worker would carry every workload and a drain would have nowhere to move it. (The file is git-ignored.) open({ config_alias: "aicr", workspace_alias: "aicr" })— binds the workspace to the configuration; the backend comes from the files.
Your cue — “plan it.”
Beat 3 — Round 1: the cluster, everything else deferred
Section titled “Beat 3 — Round 1: the cluster, everything else deferred”up({ workspace_alias: "aicr" }).
Present the plan: 6 to add, 69 deferred. The six are the cluster and five containment
shims that sit behind no order-only edge; everything else — every release — is deferred,
with provider_config_unknown (the helm provider is bound to the cluster’s endpoint, which
does not exist yet) or absent_prereq (a module that waits on one that waits). Make the
point: the DAG is four deep but converging costs two rounds, not four — deferral is about
unknown values, and once the cluster exists the whole graph is plannable. plan.invocations
is empty this round; certify’s caller is deferred with its module.
Get the user’s explicit yes, then apply({ convergence_id, plan_digest }). A real kind
cluster comes up in Docker — three nodes. The engine plans round 2 on its own and stops at
its approval point.
Your cue — “round two.”
Beat 4 — Round 2: the runtime lands, then certification
Section titled “Beat 4 — Round 2: the runtime lands, then certification”Present the plan apply returned: ~25 creates, nothing deferred — the same helm
provider block now resolves against the applied cluster. plan.invocations names
action.turf_action.certify on module.stack.module.gpu_operator.helm_release.this,
after_create, on_failure = taint. Say what is about to happen: sixteen releases install
as the graph inside one apply (the five level-0 releases within seconds of each other,
gpu-operator only after its three prerequisites), then the apply stops for you.
Get the yes; apply. This is the long step — say so. The call returns
awaiting_actions with the certify request: do it —
kubectl --context <inputs.context> get clusterpolicy -o json → status.state; node
count; GPU count (zero). Answer:
apply({ convergence_id, action_results: { "<key>": { succeeded: true, progress: ["ClusterPolicy cluster-policy: state=ready reason=NoGPUNodes", "3 nodes (1 control-plane, 2 workers); 0 GPUs allocatable"] } } })The apply goes on to the end: converged. output({ workspace_alias: "aicr" }) →
releases (name → namespace, sixteen of them) and namespaces. One remark on the census:
reason=NoGPUNodes is the Node Feature Discovery label that is the entire seam between this
laptop and a datacenter — the same recipe, the same graph, with GPUs the operands come up.
Your cue — “hand it over” or “what about day 2?”
Beat 5 — Handover, on demand
Section titled “Beat 5 — Handover, on demand”Triggered by: the user wanting to close the loop.
handover is declared in aicr.turf.hcl with no trigger — a decision only the operator
makes, run when the cluster is ready to leave your hands:
invoke({ workspace_alias: "aicr", action_addr: "action.turf_action.handover" })— planned like everything else (plan.invocationsnames it, no resource changes); approve;apply→awaiting_actions.- Ask the user, in their words: is
aicr-1ready to hand over to its tenant? Quote them inprogress; a “no” issucceeded: falsewith their reason.converged.
Then the next step is the user’s: Day 2 on this cluster
(read_skill_file({ skill_name: "guide", path: "references/day2-maintenance.md" }) — keep
the aicr workspace open, the cluster is kind-aicr-1), or teardown —
destroy({ workspace_alias: "aicr" }), the user’s explicit yes, apply (one round removes
all 31 addresses; the overlay fires on no destroy event, so nothing asks), then
close({ workspace_alias: "aicr" }). Remove guide.auto.tfvars if they want the
example as it was.
Turf™ is a trademark of Turf LLC. Terraform® is a trademark of HashiCorp. Ansible® is a trademark of Red Hat, LLC, registered in the United States and other countries. Helm®, Kubernetes®, Prometheus® and OpenTelemetry® are registered trademarks, and Jaeger™ is a trademark, of the Linux Foundation. OpenTofu® and Model Context Protocol® are registered trademarks of LF Projects, LLC. All other trademarks are the property of their respective owners. Turf is not affiliated with, endorsed by, or sponsored by HashiCorp, IBM, Red Hat, the Linux Foundation, LF Projects or the OpenTofu project.
© 2026 Turf LLC. Free for individuals, education and small businesses within the Community limits, under the Turf Community Edition License 1.0. Government and larger organizations need a commerciallicense.turf.build · Discord ·GitHub