Dev VMs render FORGE_URL from identity #142
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/archetypes#142
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 dev VM's shell and its
forgeCLI learn the forge's web address from the VM's identity, so a deployment whose forge is a plain-http VM on the private network gets a workingforge issue createwith no per-VM configuration.Primary goals:
FORGE_URLrendered from identity — the dev builder setsenvironment.sessionVariables.FORGE_URLto the runtime identity'sforgeUrl, the same way it rendersINVENTORY; nothome.sessionVariables, becausessh <vm> <command>sources no login profile.runtimeIdentity.forgeUrl or "https://${runtimeIdentity.forgeHost}", so a secrets input that predates the field (allod/secrets#44) renders today's default and no machine changes its behaviour.builders.devwith a fixture identity carryingforgeUrl = "http://192.0.2.12"and asserts the rendered variable; a second fixture without the field asserts thehttps://default.FORGE_URLbesideINVENTORYas a variable the dev home renders from data.Current state and specifics
nix/builders/dev.nixrenders the forge ssh block fromruntimeIdentity.forgeHostandforgePort(modules/dev-ssh-forge.nix) and setsenvironment.sessionVariables.INVENTORYwhen an inventory checkout is given; it sets noFORGE_URL. TheforgeCLI (allod/tools,cmd/forge/main.go) readsFORGE_URLand defaults tohttps://forge.anarch.diy, so on a deployment whose forge is theforgeservice VM (plain http at the guest's address,allod/profileshosts/service/forge) every API call from the VM goes to the wrong host while ssh clones work. The end-to-end witness inchecks/forge-sync.nixalready setsFORGE_URL=http://<forge ip>by hand on its client node, which is the shape this makes automatic.Scope
In: the one
sessionVariablesentry in the dev builder, its check, and the README line. Out: the identity field itself (allod/secrets#44); the install script's second run (allod/deploy); privacy and service builders, which run no forge CLI.Part of allod/strategy#65
Landed on master by direct commit
e208b22("Render FORGE_URL in the dev VM's session environment"); closing on the owner's instruction.