Commit ac22431b2b
Verified · cmc
Layout: unified · split
.gitbay/wiki/Admin.org +20 −18
| @@ -363,13 +363,14 @@ below are per service, not per build, so raising =-jobs= divides them | |||
| 363 | rather than multiplying the host's load. | 363 | rather than multiplying the host's load. |
| 364 | 364 | ||
| 365 | =admin runners= shows which account each runner polls as, and what each | 365 | =admin runners= shows which account each runner polls as, and what each |
| 366 | is scoped to. A runner with no scope claims builds for *any* | 366 | may claim. A runner key claims builds only for the repositories it is |
| 367 | repository, which on an instance with open registration means running a | 367 | attached to: with none attached it claims nothing, and =-repos= may only |
| 368 | stranger's steps; scope one with =-repos owner/name=. An admin key | 368 | narrow within them. An admin's full-scope key claims any repository — |
| 369 | still works for the protocol during a rotation. A merge request head | 369 | that is what =-repos= was for — and still works for the protocol during |
| 370 | from a fork is built in the target repository as untrusted: the claim | 370 | a rotation. A merge request head from a fork is built in the target |
| 371 | carries no secrets. Same-repository heads were built by their branch | 371 | repository as untrusted: the claim carries no secrets, and only a runner |
| 372 | push and are not built again. | 372 | started with =-untrusted= takes it. Same-repository heads were built by |
| 373 | their branch push and are not built again. | ||
| 373 | 374 | ||
| 374 | =make deploy-runner= also installs | 375 | =make deploy-runner= also installs |
| 375 | =deploy/gitbay-runner.override.conf= as a systemd drop-in: =Nice=10=, | 376 | =deploy/gitbay-runner.override.conf= as a systemd drop-in: =Nice=10=, |
| @@ -386,12 +387,11 @@ v1 runs steps directly on the host — no containers — so treat the | |||
| 386 | runner machine as executing whatever your users push. Install the | 387 | runner machine as executing whatever your users push. Install the |
| 387 | toolchains your builds need on it. | 388 | toolchains your builds need on it. |
| 388 | 389 | ||
| 389 | A runner claims the oldest pending build in the queue, whichever | 390 | A runner claims the oldest pending build among the repositories its key |
| 390 | repository it belongs to. =-repos= narrows that to named repositories, | 391 | is attached to — for an admin key, the oldest in the instance. =-repos= |
| 391 | which is what makes a runner outside the server practical — one on a | 392 | narrows within that set, which is what makes a runner outside the server |
| 392 | machine that should build a single project, or that holds credentials for | 393 | practical: one on a machine that should build a single project, or that |
| 393 | one deployment, no longer picks up a build belonging to someone else. With | 394 | holds credentials for one deployment, stays on it. |
| 394 | open registration that someone need not be anyone you know. | ||
| 395 | 395 | ||
| 396 | #+begin_src sh | 396 | #+begin_src sh |
| 397 | gitbay-runner -remote git@gitbay.org -repos krz/site,krz/docs \ | 397 | gitbay-runner -remote git@gitbay.org -repos krz/site,krz/docs \ |
| @@ -410,11 +410,13 @@ repositories among them. =-untrusted= makes a runner claim merge | |||
| 410 | request heads from forks; the bay1 unit sets it because it isolates in | 410 | request heads from forks; the bay1 unit sets it because it isolates in |
| 411 | podman. A runner without it builds trusted commits only. | 411 | podman. A runner without it builds trusted commits only. |
| 412 | 412 | ||
| 413 | =gitbay dashboard= and =ssh git@<host> admin runners= list every account | 413 | =gitbay dashboard= and =ssh git@<host> admin runners= list every key |
| 414 | that has polled as a runner: when it last polled, the =-repos= scope it | 414 | that has polled as a runner: the account, the key's fingerprint, when it |
| 415 | asked for, and the build it holds. =admin runners= also heads the list | 415 | last polled, the repositories it may claim — its attachments for a runner |
| 416 | with the queue: builds pending now, and over the last day how many were | 416 | key, the =-repos= it asked for or =any= for an admin key — and the build |
| 417 | claimed, how long they waited to be claimed (average and worst), and | 417 | it holds. =admin runners= also heads the list with the queue: builds |
| 418 | pending now, and over the last day how many were claimed, how long they | ||
| 419 | waited to be claimed (average and worst), and | ||
| 418 | how many the reaper ended instead of a runner reporting them. A build a runner claimed and never | 420 | how many the reaper ended instead of a runner reporting them. A build a runner claimed and never |
| 419 | reported is failed by the scheduler's minute tick, whether or not any | 421 | reported is failed by the scheduler's minute tick, whether or not any |
| 420 | runner is still alive: within about two minutes of its log stream ending | 422 | runner is still alive: within about two minutes of its log stream ending |