[nomad-step-1] S1.2 — add lib/init/nomad/deploy.sh (dependency-ordered nomad job run + wait) #841
Labels
No labels
action
backlog
blocked
bug-report
cannot-reproduce
in-progress
in-triage
needs-triage
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
rejected
reproduced
tech-debt
underspecified
vision
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#841
Loading…
Add table
Add a link
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?
Part of the Nomad+Vault migration. Step 1 — Forgejo as first Nomad job.
Goal
Add
lib/init/nomad/deploy.sh— a small orchestrator that runs a list of jobspecs in dependency order and waits for each to gorunningbefore starting the next. Step-1 uses it for forgejo-only; Steps 3–6 extend the job list.Scope
lib/init/nomad/deploy.sh:forgejo), resolves each to${REPO_ROOT}/nomad/jobs/<name>.hcl.nomad job validate <path>— fail fast on bad HCL.nomad job run -detach <path>— idempotent registration (same jobspec content = no-op from Nomad's side; new revision deploys).nomad job status -json <name>untilStatus = "running"or all allocations inrunningstate. Timeout configurable via envJOB_READY_TIMEOUT_SECS(default 120).nomad alloc logs -stderr, exit 1.--dry-runflag: print each intendednomad job runinvocation, exit 0.Bonus: one named helper
_wait_job_running <name> <timeout>that's reusable from future init scripts.Acceptance criteria
lib/init/nomad/deploy.sh forgejoworks end-to-end against a Step-0-provisioned cluster (fresh LXC).lib/init/nomad/deploy.sh forgejo --dry-runprints the planned actions, exits 0 without touching cluster state.[deploy] forgejo already runningoutput.deploy.shexits 1 with validation error; no partial state created.shellcheckclean.Non-goals
nomad job dispatchfor parameterized batch jobs (Step 5 when vault-runner lands).Labels / meta
[nomad-step-1] S1.2— no dependencies.