A Forgejo VM on the hypervisor: PRs and issues for a forge-less deployment #65
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/strategy#65
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?
A forge-less deployment, which the public install path now produces in one run, has no pull requests and no issues: the hypervisor pushes its clones into the dev VM and pulls the agent's commits back with the relay. That is sovereign and it is thin. The next step a new operator wants is a forge of their own without renting a VPS: a Forgejo VM on the same hypervisor, the dev VM cloning from it, an agent account that can open PRs and issues there, branch protection that refuses a push to master. Later, when they want it reachable from outside, a dump of that VM restores onto a VPS and one host in identity changes.
Proposal, in four pieces, each its own issue on the owning repo:
forgemachine in the public templates: a privacy-archetype VM with a data disk, the module composed in fresh mode, its own host key and identity entry, on the libvirt network.forge-bootstrapon the hypervisor: admin and agent accounts, the dev VM's forge key registered, the org and the mirrored repositories pushed from the hypervisor's clones, the agent token minted and landed through the managed credential path, branch protection applied from the git policy data the secrets template already ships.forgeAccess = true, the registry's remotes name the local org,getting-started.shoffers it as a second run.Proof before any laptop touches it: a NixOS VM test with a forge node and a dev node where the bootstrap runs, the dev node clones, pushes a branch, opens a pull request through the
forgeCLI, and is refused on master. Then the public install walk's laptop, as a second run of the script.Promotion to a VPS is the existing dump and restore and is out of scope here beyond keeping it possible.
forgemachine: the template's first service VM #25service.forgeprofile: Forgejo in fresh mode over plain http #12forgemachine's identity and host key #42Slice 2, the
serviceguest type, is built and green in all three repos and is awaiting relay. Slice 3's issues are filed.Slice 1 — the public Forgejo module:
Slice 2 — the
serviceguest type:Slice 3 — the
forgemachine in the templates. allod/archetypes#138 lands first; the other three are independent of each other:Two findings from building slice 2 that changed slice 3's shape:
allod/profilesdeclares onlynixpkgsas an input, and anarchetypesinput would be a cycle, so a profile definition had no way to compose a module this framework exports. That is allod/archetypes#138, and it blocks allod/profiles#12.getting-started.shregenerates a host key for each key of the secrets template'smachine-host-keys.json, so a new machine's host key is generated on a fresh install by virtue of appearing in that file. Slice 3 therefore needs no change to that script, and the dev VM's forge key pair — which does need one — moves to the bootstrap slice, where its recipients are actually required.Slices 4 and 5 are unchanged:
forge-bootstrapon the hypervisor, then the dev VM's flip.forgemachine: the template's first service VM #25service.forgeprofile: Forgejo in fresh mode over plain http #12forgemachine's identity and host key #42Slices 1 through 4 are merged on the public templates; the primary deployment's forge VM is provisioned and serving. The remaining work is slice 5, the dev VM's flip, and slice 6,
allod forge up.Slice 1 — the public Forgejo module:
Slice 2 — the
serviceguest type:Slice 3 — the
forgemachine in the templates:Slice 4 —
forge-syncon the hypervisor and its witness:Slice 5 — the dev VM flips to the local forge: not yet filed.
Slice 6 — operator ergonomics:
Two things changed shape while building slice 4.
forge-bootstrapbecameforge-sync, because it reconciles the forge to the declared state on every run rather than acting once. And the witness in allod/archetypes#140 consumedforge-syncbefore archetypes had re-pinnedallod/nexus, so master was red withforge-sync: command not foundbetween the two landings; the pin is now on master. A check that consumes a sibling repository's new code wants the lock bump in the same commit.Reaching the forge by name instead of address is deferred past slice 6: it is a coupled change across the profile's
domain, Caddy's site address and slice 5's clone URL.Positioning, settled 2026-10-09: the forge VM is a starting place. A new operator tries the whole stack on one machine, with pull requests and issues on a forge they own, without committing to a hosted forge; when they outgrow it, the upgrade path is the existing dump and restore onto a hosted forge, or GitHub. A deployment that already has a hosted forge does not run
forge-syncagainst a local VM; the command assumes one forge and one agent account per deployment, and that assumption stays. Slices 5 and 6 are unchanged.Slice 5 is landed: allod/secrets#44 (identity's
forgeUrl, defaulted), allod/archetypes#142 (dev VMs renderFORGE_URLfrom it) and allod/deploy#11 (getting-started.sh --forge, which also settles allod/deploy#9). The remaining witness is the laptop as the second run of the script: provision the forge VM,forge-sync forge,--forge,provision-vm --replace allod-dev, then an issue created from inside the VM and a push to master refused. Slice 6 (allod/nexus#85) is the last open piece.Slice 5's laptop witness, run as three clean installs from the public template on 2026-10-09, found seven gaps, every one fixed on its master the same day: allod/deploy#12, allod/nexus#86, allod/nexus#87, allod/nexus#88, allod/nexus#89, allod/nexus#90 and allod/profiles#13. Two designs are filed from it: forge-sync pushes as the agent, which its own branch protection refuses from the second run on (allod/nexus#91), and a one-line key hand-off from the hypervisor to a dev VM (allod/nexus#92). Still to run on the laptop: the
--forgeflip, the VM replace, and the in-VM witnesses. Slice 6 (allod/nexus#85) remains unstarted.complete except allod/nexus#85 which can be tracked on its own