The tenant content that lived in claude/codex/grok's cloud-init — agent CLI installs, docker, node, the per-template agent-context heredocs — moves to rig's bootstrap roles (rig#31), where it is convergent, idempotent and testable end to end. What remains per template is a thin seed: the tenant user, tmux (#65), and rig preinstalled — nothing that joins a tailnet or admits credentials. - BOX_BOOTSTRAP_ROLE: a template names the creds-free rig role cmd_new auto-runs inside the guest after cloud-init settles. The value is a role NAME by allowlist — anything shell-shaped dies at parse time, on the host. A failed role leaves the box up and names the re-run. - render_userdata: the seed's ONE substitution. @RIG_REPO@/@RIG_REF@ resolve from the mint environment (default heavy-duty/rig @ main — unpinned, the honest rig#29 treatment, until rig#32's releases); values are whole-string-validated before touching the YAML, because they land inside a runcmd shell line. - templates/staging: the re-cut of #69's layering — user ops, BOX_REQUIRE_VM=1, BOX_AUTOSTART=1, role staging. The tailnet workload join holds a key and stays operator-run; cmd_new prints it as the next step and box never sees the key. - blank stays a box with nobody home: no rig, no role, nothing auto-runs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
31 lines
1.5 KiB
YAML
31 lines
1.5 KiB
YAML
#cloud-config
|
|
# A thin, creds-free, server-class seed (#81): the 'ops' user, tmux (#65),
|
|
# and rig — nothing that joins a tailnet or admits credentials, no docker,
|
|
# no sshd config, no keys. The server posture comes from
|
|
# 'rig bootstrap staging' (heavy-duty/rig#31), which box auto-runs after
|
|
# mint; the tailnet workload join holds a pre-auth key and stays
|
|
# operator-run ('box shell' → 'sudo rig bootstrap workload'), exactly as
|
|
# #69 designed it — box never sees the key.
|
|
users:
|
|
- name: ops
|
|
shell: /bin/bash
|
|
sudo: "ALL=(ALL) NOPASSWD:ALL"
|
|
lock_passwd: true
|
|
package_update: true
|
|
# tmux: 'box tmux' runs 'tmux new-session' INSIDE the box (#65) — and the
|
|
# operator babysits the workload join through it.
|
|
# curl + ca-certificates: the rig installer below rides them, and a bare
|
|
# cloud image is not guaranteed to ship either.
|
|
packages:
|
|
- tmux
|
|
- curl
|
|
- ca-certificates
|
|
runcmd:
|
|
# Preinstall rig so the box can converge — and re-converge — via
|
|
# 'rig bootstrap staging'. @RIG_REPO@/@RIG_REF@ are the pin point (#81):
|
|
# box substitutes them at mint from the RIG_REPO/RIG_REF environment
|
|
# (default heavy-duty/rig @ main — unpinned, tracking main, the same
|
|
# honest edge as rig's own unpinned box install, until rig#32 ships a
|
|
# release flow). The pin covers both the installer fetched AND the tree
|
|
# it installs, so a branch under review is testable end to end.
|
|
- curl -fsSL https://raw.githubusercontent.com/@RIG_REPO@/@RIG_REF@/install.sh | RIG_REPO="@RIG_REPO@" RIG_REF="@RIG_REF@" bash
|