From bc25b82d6dd91ea27777fc9b51c0453451583e32 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 9 Jan 2025 17:55:03 +0100 Subject: [PATCH] notizen zur forgejo runner installation --- ForgeJoRunnerInstall.md | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 ForgeJoRunnerInstall.md diff --git a/ForgeJoRunnerInstall.md b/ForgeJoRunnerInstall.md new file mode 100644 index 0000000..7623e8d --- /dev/null +++ b/ForgeJoRunnerInstall.md @@ -0,0 +1,50 @@ +# Docker Installation +```bash +curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ + $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null +apt update +apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin +``` + +# ForgeJo Runner Installation +https://forgejo.org/docs/next/admin/runner-installation/ + +```bash +export RUNNER_VERSION=$(curl -X 'GET' https://data.forgejo.org/api/v1/repos/forgejo/runner/releases/latest | jq .name -r | cut -c 2-) +wget -O forgejo-runner https://data.forgejo.org/forgejo/runner/releases/download/v${RUNNER_VERSION}/forgejo-runner-${RUNNER_VERSION}-linux-amd64 +chmod +x forgejo-runner +mv forgejo-runner /usr/local/bin/forgejo-runner +chmod +x /usr/local/bin/forgejo-runner +forgejo-runner -v +useradd --create-home runner +usermod -aG docker runner +su runner +``` + +# Konfiguration / Registrierung +https://forgejo.org/docs/next/admin/runner-installation/#standard-registration +Als ```runner``` ausführen + +```bash +forgejo-runner register +``` + +Sample Output +```bash +INFO Registering runner, arch=arm64, os=linux, version=v5.0.4. +WARN Runner in user-mode. +INFO Enter the Forgejo instance URL (for example, https://next.forgejo.org/): +https://git.fucktheforce.de/ +INFO Enter the runner token: + || COPY FROM https://git.fucktheforce.de/user/settings/actions/runners +INFO Enter the runner name (if set empty, use hostname: runner-host): +my-forgejo-runner +INFO Enter the runner labels, leave blank to use the default labels (comma-separated, for example, ubuntu-20.04:docker://node:20-bookworm,ubuntu-18.04:docker://node:20-bookworm): + +INFO Registering runner, name=my-forgejo-runner, instance=https://code.forgejo.org/, labels=[docker:docker://node:20-bullseye]. +DEBU Successfully pinged the Forgejo instance server +INFO Runner registered successfully. +``` \ No newline at end of file