rig bootstrap should take the users file — one command, box ready #51
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:bootstrap
scope:coolify
scope:db
scope:docs
scope:drill
scope:installer
scope:labels
scope:platform
scope:runner
scope:users
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/rig#51
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
rig bootstrapshould take the users file — one command, box readyThe ask
Today bring-up is at least two commands, three on a VM host:
rig bootstrapalready knows everything else about what this box is — class,host, join, hostname — and writes
/etc/rig/roleto say so. The users fileis the last piece of "what this box is" that bootstrap does not take. It
should take it, and (proposed) require it:
One command, and you have a box with its people on it.
Why required rather than optional
A bootstrapped box with no users converges to a box only root can enter. On
class=humanthat is a half-built machine waiting for a second command theoperator has to remember — and
rig users close-rootis explicitly gatedbehind "once your admin key works", which needs an admin to exist. Requiring
--usersmakes the complete path the default path instead of the documentedone.
Ordering on
host=yes— smaller than it first looksThe apparent problem:
box setup-hostowns theincusgroup and rig neverinstalls Incus, so inlining
users applywould hitusers-apply.sh:180anddie pointing at
box setup-host.But box's own installer already runs setup-host (
box/bin/box:502:"install.sh runs it for you, so this is for re-applying by hand"). So on a
host=yesmachine, installing the box CLI has already built the stack —incusgroup, boxnet, ACL,box-netprofile, firewall. There is nothing towait for and no phase to orchestrate. The prerequisite is simply:
Note the intra-apply order:
box grantrequires the account to exist(
grant-user.sh:62does agetent passwdcheck), so the grant step mustfollow
useradd, not precede it.Correction: bootstrap already installs box
An earlier revision of this issue asked "should rig install box on
host=yes?" as the open question standing between this and one-commandbring-up. That was wrong — bootstrap already does it, deliberately and
with the boundary reasoned out in place, at
commands/bootstrap.sh:437-512:it installs the box CLI globally and lets box's own installer run
setup-host, underBOX_YES=1for non-interactivity. The delegation law ispreserved exactly as the comments there state — rig installs box, and box
installs Incus.
So on
host=yestheincusgroup normally exists by the time a users phasewould run, because bootstrap put it there. Nothing about the ordering needs
solving.
What remains
The early
host=yesprecondition fires only in the narrow case where boxwas never installed —
RIG_SKIP_BOX_INSTALL=1, orcurlabsent, both ofwhich bootstrap already handles by warning and continuing. That refusal
should also be gated on the users file actually containing a role-
boxuser, so an admins-only file is not refused on an Incus-less host.
No
box setup-hostcall and no new install path belong in this change —both already exist upstream in the same script.
Other decisions
rig bootstrapinvocation gains arequired flag. Worth a major bump and a CHANGELOG entry that names the
migration.
--no-usersis the escape hatch, and it is explicit.control-plane,workloadandrunnerareclass=server— machines whose door is thecontrol plane's automation rather than a human's. They are still better
off with named human accounts: a server nobody logs into routinely is
exactly where shared-root access rots, and per-human users keep
attribution intact for the times someone does go in. So
--usersisrequired for every role, and skipping it is a deliberate
--no-usersrather than a default.
never persisted (
README.md: "rig never persists it"). Bootstrap taking apath must not change that.
rig bootstrap <claude|codex|grok|staging> [--user]is a different family with its own flags — does
--usersapply there atall, or only to the host roles?
Correcting the issue body: it originally posed "should rig install box on
host=yes?" as the open question blocking one-command bring-up. That was wrong —commands/bootstrap.sh:437-512already installs the box CLI and lets box's own installer runsetup-host, with the delegation boundary reasoned out in place. The ordering concern this issue opened with does not exist; only the users phase was ever missing. Body updated.