mirror of
https://codeberg.org/forgejo/docs.git
synced 2025-01-13 01:09:42 -05:00
docs: updates to the runner installation instructions
based on installing them today
This commit is contained in:
parent
1a6e50db3b
commit
069e649fc3
1 changed files with 8 additions and 6 deletions
|
@ -52,37 +52,39 @@ enough --domain code.forgejo.org ssh bind-host
|
||||||
```shell
|
```shell
|
||||||
git clone https://code.forgejo.org/forgejo/lxc-helpers/
|
git clone https://code.forgejo.org/forgejo/lxc-helpers/
|
||||||
|
|
||||||
lxc-helpers.sh lxc_container_create forgejo-integration-runner
|
lxc-helpers.sh lxc_container_create forgejo-runners
|
||||||
lxc-helpers.sh lxc_container_start forgejo-integration-runner
|
lxc-helpers.sh lxc_container_start forgejo-runners
|
||||||
lxc-helpers.sh lxc_container_user_install forgejo-integration-runner $(id -u) $USER
|
lxc-helpers.sh lxc_container_user_install forgejo-runners $(id -u) $USER
|
||||||
```
|
```
|
||||||
|
|
||||||
### Creating an LXC container
|
### Creating an LXC container
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
lxc-helpers.sh lxc_container_run forgejo-integration-runner -- sudo --user debian bash
|
lxc-helpers.sh lxc_container_run forgejo-runners -- sudo --user debian bash
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install wget docker.io emacs-nox
|
sudo apt-get install wget docker.io emacs-nox
|
||||||
sudo usermod -aG docker $USER
|
sudo usermod -aG docker $USER
|
||||||
lxc-helpers.sh lxc_prepare_environment
|
lxc-helpers.sh lxc_prepare_environment
|
||||||
wget -O forgejo-runner https://code.forgejo.org/forgejo/runner/releases/download/v2.0.4/forgejo-runner-amd64
|
wget -O forgejo-runner https://code.forgejo.org/forgejo/runner/releases/download/v2.0.4/forgejo-runner-amd64
|
||||||
chmod +x forgejo-runner
|
chmod +x forgejo-runner
|
||||||
|
echo 'export PATH=$HOME:$PATH' >> .bashrc
|
||||||
|
echo 'export TERM=vt100' >> .bashrc
|
||||||
```
|
```
|
||||||
|
|
||||||
### Creating a runner
|
### Creating a runner
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
URL=codeberg.org/forgejo-integration
|
URL=codeberg.org/forgejo-integration
|
||||||
PATH=$(pwd):$PATH
|
|
||||||
mkdir -p $URL ; cd $URL
|
mkdir -p $URL ; cd $URL
|
||||||
forgejo-runner generate-config > config.yml
|
forgejo-runner generate-config > config.yml
|
||||||
## edit config.yml
|
## edit config.yml
|
||||||
## obtain a token for $URL
|
## 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
|
forgejo-runner register --no-interactive --token XXXXXXX --name runner --instance https://codeberg.org --labels docker:docker://node:16-bullseye,self-hosted
|
||||||
forgejo-runner --config config.yml daemon | cat -v | tee runner.log
|
forgejo-runner --config config.yml daemon |& cat -v > runner.log &
|
||||||
```
|
```
|
||||||
|
|
||||||
#### codeberg.org config.yml
|
#### codeberg.org config.yml
|
||||||
|
|
||||||
- `fetch_timeout: 30s` # because it can be slow at times
|
- `fetch_timeout: 30s` # because it can be slow at times
|
||||||
- `fetch_interval: 60s` # because there is throttling and 429 replies will mess up the runner
|
- `fetch_interval: 60s` # because there is throttling and 429 replies will mess up the runner
|
||||||
|
- cache `enabled: false` # because codeberg.org is still v1.19
|
||||||
|
|
Loading…
Reference in a new issue