getting-started.sh --forge: point the dev VM at the forge VM #11
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/deploy#11
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 second run of
getting-started.sh, asgetting-started.sh --forge, points the deployment's dev VM at its own forge VM: the agent in the VM then opens pull requests and issues on a forge the operator owns, and a push to master is refused by that forge, with no hosted forge and no account anywhere else.Primary goals:
forge-sync— the operator provisions theforgemachine, runsforge-sync forgeon the host, commits what it prints, and runsbash getting-started.sh --forge; the script refuses, naming the step, whenforge-synchas not run (nosecrets/allod-dev-forge-key.age, nosecrets/agent-pr-token.age, orforgeAccessstill false).forgeHostbecomes the forge machine's address from the inventory,forgePortits clone port, andforgeUrlbecomeshttp://<address>(set, or added afterforgePortwhen the clone predates allod/secrets#44).forge_key = "allod_vm"restored andhost_provided_reposdropped onallod-dev,scripts/vm-specs.jsonregenerated, committed.--refreshand the script reads each pinned revision back out offlake.lockand stops with both values if it did not reach the clone's HEAD; the first run's re-lock takes the same function.provision-vm --replace allod-dev, with one line saying it replaces the VM, because the guest clone step pulls an existing checkout and a host-provided checkout has no remote to pull from;rebuild-vmwould not re-clone.--forgerun finds every edit in place and reports it, like the first run's steps.Current state and specifics
getting-started.shstep 3 clearsforgeAccess, step "Dev VM built from the local clones" setsforge_key = nulland declareshost_provided_repos, and step 4 re-locks withnix flake update "${DATA_INPUTS[@]}"and trusts the exit status (allod/deploy#9). The forge machine's address ismachines.forge.ipin the inventory, already moved onto libvirt's network by the first run; its clone port is the one theforgeprofile declares (2222).forge-sync(allod/nexus) generates the dev VM's forge key, grantsforgeAccess, mints the token, pushes the repositories and prints the secrets commit and re-lock lines; it does not touch inventory or the forge host fields, which is this flag's job. The dev VM rendersFORGE_URLfromforgeUrlonceallod/deploypins the archetypes revision carrying allod/archetypes#142, so this change's lock bump movesarchetypesandallod-secretsto the revisions carrying allod/archetypes#142 and allod/secrets#44.Validation
The script's edits are exercised on a dev machine against throwaway clones of the public templates under a scratch
HOME, withALLOD_HARDWARE_CONFIGpointed at a fixture and--prepare-onlystopping before any build: run 1, then fakeforge-sync's outputs in the scratch secrets clone, then--forge --prepare-only, and read back identity, inventory and the lock. The laptop witness is the operator's: as the second run of the script on the public install walk's machine, afterprovision-vm --replace allod-dev, the VM'sFORGE_URLand clone remotes name the forge VM,forge issue createfrom the VM is read back through the forge's API, and a push to master is refused by the server with the client's hook disabled for that one push.Scope
In: the
--forgeflag, the precondition, the identity and inventory edits, the shared verified re-lock, the README section, and the lock bump. Out:forge-syncitself; reaching the forge by name rather than address, deferred by decision; the hypervisor's own clones, which keep their upstream remotes so the operator still pulls template updates from the public forge.Part of allod/strategy#65
Landed on master in commit
7432a9e: the --forge second run, with the fix round inf937f60. Verified against the files on master today; closing as completed.