-
Notifications
You must be signed in to change notification settings - Fork 20
GitHub Self Hosted Runners
Bajczi Levente edited this page Sep 26, 2023
·
4 revisions
sudo apt update
sudo apt install snapd --fix-missing
sudo snap install microk8s --classic --channel=1.28
sudo usermod -a -G microk8s $USER
sudo chown -f -R $USER ~/.kube
exit # relogin
head node:
microk8s add-node
sudo ufw allow from <worker-ip> # repeat
worker nodes:
microk8s join <output of add-node> --worker # rerun add-node for every new node
sudo ufw allow from <head-ip>
Contents of runnerdeployment.yml
:
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: <name>
spec:
replicas: 10
template:
spec:
organization: <org>
microk8s enable dns
microk8s kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.12.0/cert-manager.yaml
# wait until everything is "running": microk8s kubectl get pods --all-namespaces -o wide
while ! microk8s kubectl apply -f https://github.com/actions/actions-runner-controller/releases/download/v0.27.5/actions-runner-controller.yaml --server-side; do sleep 1; done
microk8s kubectl create secret generic controller-manager -n actions-runner-system --from-literal=github_token=<TOKEN> # see: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners-with-actions-runner-controller/authenticating-to-the-github-api#authenticating-arc-with-a-github-app
while ! microk8s kubectl apply -f runnerdeployment.yml; do sleep 1; done