GitHub Actions Runner Controller (ARC) configuration note
Important
First thing first, for personal use only. I am not responsible for the content or its consequences.
Introduction
First contact with Kubernetes and GitHub Actions Runner Controller (ARC). Feels a little painful at the beginning :).
Special thanks to Bassem Dghaidi’s awesome video. You can find the link in the References section.
Prerequisites
- Kubernetes
- Helm 3
- minikube (optional)
- GitHub Organization account
Registering a GitHub App for ARC
Create a new GitHub Apps
Go to https://github.com/organizations/OmicoDev/settings/apps/new
Note
ReplaceOmicoDev
with your organization name.
Then, follow the instructions to create a new GitHub App.
Install the GitHub App to your organization
Go to https://github.com/organizations/OmicoDev/settings/apps/omico-actions-runner-controller/installations and then click Install
to install the GitHub App to your organization.
Note
ReplaceOmicoDev
with your organization name.
Replaceomico-actions-runner-controller
with your GitHub App name.
Install ARC
Create new minikube cluster (optional)
1 | minikube start -p arc --cpus=12 --memory=32G --mount |
Note
You should modify the parameters according to your needs.
Installing Actions Runner Controller
1 | helm install arc \ |
Configuring a runner scale set
1 | INSTALLATION_NAME="arc-ubuntu-latest" |
Note
ReplaceOmicoDev
with your organization name.
Replacearc-ubuntu-latest
with your runner installation name.
Replaceomico-actions-runner-controller
with your GitHub App name.minRunners
is optional, you can modify it according to your needs.
For more configurations, please refer to values.yaml of gha-runner-scale-set.
Create a secret for the GitHub App
1 | SECRET_NAME="omico-actions-runner-controller" |
Note
Replaceomico-actions-runner-controller
with your GitHub App name.
Replace114514
with your GitHub App ID and Installation ID.
Replaceomico-actions-runner-controller.private-key.pem
with your private key file name. (You can get it from the GitHub App settings page. See Create a new GitHub Apps)
Verify the installation
1 | kubectl get pods -n arc-systems |
If you see the following pods, then the installation is successful.
1 | NAME READY STATUS RESTARTS AGE |
If the listener
pod is missing, please check the logs of arc-gha-rs-controller
pod.
1 | kubectl logs -n arc-systems $(kubectl get pods -n arc-systems -o=name | grep "pod/arc-gha-rs-controller") |
Good luck for debugging :)
Useful commands
Install Dashboard for minikube
1 | minikube -p arc addons enable metrics-server |
Delete the minikube cluster
1 | minikube delete -p arc |
Delete the runner scale set
1 | INSTALLATION_NAME="arc-ubuntu-latest" |
Get basic information of the ARC secret
1 | SECRET_NAME="omico-actions-runner-controller" |
Get ARC secret private key
Note
Be careful with the private key.
1 | SECRET_NAME="omico-actions-runner-controller" |
Delete the ARC secret
1 | SECRET_NAME="omico-actions-runner-controller" |
References
The official documentation of ARC
GitHub Actions: Dive into actions-runner-controller (ARC) || Advanced installation & configuration by Bassem Dghaidi