Ask for the registration and capacity at first boot #1

Merged
Job79 merged 1 commits from first-boot-setup into main 2026-11-23 18:58:25 +00:00
Owner

Installing becomes: boot, answer the questions, done. No login to run gitea-runner register.

  • gitea-runner-setup asks on the console for the number of parallel jobs, the Gitea URL and a registration token, then registers. A failed registration asks for the URL and token again.
  • gitea-runner-setup.service runs it until the runner is registered, after systemd-firstboot. Logins wait for it (Before=systemd-user-sessions.service, as systemd-firstboot does), so no getty reads the same console.
  • The capacity goes to the drop-in gitea-runner.service.d/capacity.conf as CAPACITY, which the config reads as capacity: ${CAPACITY}. The config stays a read-only link that updates keep changing. The default is 1, and systemctl edit gitea-runner changes it later.

Tested in the test VM: answered 2, then a wrong token (asks again), then a real one. It registered as runneros-7be5, the login prompt came only after, the drop-in holds CAPACITY=2, and the runner runs with it.

🤖 Generated with Claude Code

Installing becomes: boot, answer the questions, done. No login to run `gitea-runner register`. - `gitea-runner-setup` asks on the console for the number of parallel jobs, the Gitea URL and a registration token, then registers. A failed registration asks for the URL and token again. - `gitea-runner-setup.service` runs it until the runner is registered, after systemd-firstboot. Logins wait for it (`Before=systemd-user-sessions.service`, as systemd-firstboot does), so no getty reads the same console. - The capacity goes to the drop-in `gitea-runner.service.d/capacity.conf` as `CAPACITY`, which the config reads as `capacity: ${CAPACITY}`. The config stays a read-only link that updates keep changing. The default is 1, and `systemctl edit gitea-runner` changes it later. Tested in the test VM: answered 2, then a wrong token (asks again), then a real one. It registered as `runneros-7be5`, the login prompt came only after, the drop-in holds `CAPACITY=2`, and the runner runs with it. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Job79 added 1 commit 2026-11-23 18:57:30 +00:00
gitea-runner-setup asks on the console for the number of parallel jobs,
the Gitea URL and a registration token, and registers the runner. It runs
until the runner is registered, and logins wait for it, as for
systemd-firstboot. The capacity goes to a drop-in of gitea-runner.service,
which passes it to the config as CAPACITY, so the config stays read-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Job79 merged commit 6ebddf18ce into main 2026-11-23 18:58:25 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Job79/runneros#1