zavage-gitea-runner/README.md

52 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2024-08-30 02:46:29 -06:00
---
gitea: none
include_toc: true
---
2024-08-30 02:57:20 -06:00
**Zavage act_runner for Gitea**
2024-08-30 01:00:49 -06:00
---------------------------------
Included is what's needed for act_runner to run on servbox host and provide a docker-runner
to Gitea instance. This is systemd units and configuration.
2024-08-30 02:57:20 -06:00
# Installation
2024-08-30 01:00:49 -06:00
1. provision gitea-runner user, with home directory and clone this repo inside of it.
1. Install docker-rootless, provision sid and gid ranges
2024-08-30 01:04:01 -06:00
/etc/subuid and /etc/subgid need configured
2024-08-30 01:52:26 -06:00
```
# as root:
echo "gitea-runner:296608:65536" | tee -a /etc/subuid
echo "gitea-runner:296608:65536" | tee -a /etc/subgid
# and verify (su -l gitea-runner):
id =u
whoami
grep ^$(whoami): /etc/subuid
grep ^$(whoami): /etc/subgid
```
2024-08-30 01:00:49 -06:00
1. Install 3 systemd units, 2 user-level and 1-system level to run dbus, docker (rootless), and act_runner
1. Install .bashrc or .profile config for user to connect to dbus, needed for systemd
1. Start and enable the systemd units/services
1. Verify it works
```
su -l gitea-runner
systemctl --user [start/enable/status] docker.service
systemctl --user [start/enable/status] dbus-gitea-runner.service
# system-level: (run as root)
systemctl [start/enable/status] gitea-act-runner.service
# Check:
journalctl --user -u docker.service
journalctl gitea-act-runner.service
```
2024-08-30 02:57:20 -06:00
# See also
2024-08-30 01:00:49 -06:00
* Mathew Guest: mat@zavage.net
2024-08-30 01:25:03 -06:00
* https://gitea.com/gitea/act_runner
2024-08-30 01:00:49 -06:00