From 7339902cc4f07402c8871ce6f87b26c588751cd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sun, 18 Jun 2023 13:19:33 +0200 Subject: [PATCH] docs: explain the LABELS unpriviliged runners should have --- developer/infrastructure.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/developer/infrastructure.md b/developer/infrastructure.md index 8b000cdb..41acf4cf 100644 --- a/developer/infrastructure.md +++ b/developer/infrastructure.md @@ -73,13 +73,26 @@ echo 'export TERM=vt100' >> .bashrc ### Creating a runner +Multiple runners can co-exist on the same machine. To keep things +organized they are located in a directtory that is the same as the url +from which the token is obtained. For instance +DIR=codeberg.org/forgejo-integration means that the token was obtained from the +https://codeberg.org/forgejo-integration organization. + +If a runner only provides unprivileged docker containers, the labels +should be +`LABELS=docker:docker://node:16-bullseye,ubuntu-latest:docker://node:16-bullseye`. + +If a runner provides LXC containers and unprivileged docker +containers, the labels should be +`LABELS=docker:docker://node:16-bullseye,self-hosted`. + ```shell -URL=codeberg.org/forgejo-integration -mkdir -p $URL ; cd $URL +mkdir -p $DIR ; cd $DIR forgejo-runner generate-config > config.yml ## edit config.yml -## obtain a token for $URL -forgejo-runner register --no-interactive --token XXXXXXX --name runner --instance https://codeberg.org --labels docker:docker://node:16-bullseye,self-hosted +## Obtain a $TOKEN from https://$DIR +forgejo-runner register --no-interactive --token $TOKEN --name runner --instance https://codeberg.org --labels $LABELS forgejo-runner --config config.yml daemon |& cat -v > runner.log & ```