I've been using the ability to run containers with the docker functionality on my Synology for some time now. I've upgraded the memory to 8Gb just to be able to use this more. Now I run lots of stuff on there:

  • Microsoft SQL
  • Unifi Controller
  • SonarQube
  • Unifi video
  • Minecraft server
  • Github runner

Only when I started to use the Synology as a Github workflow runner I ran into the limitations of the Synology. The workflow that I run has some unittests in it, on my workstation these test run in about 6 seconds. On the Synology this takes 45 seconds. All in all the whole workflow takes almost 8 minutes to complete, which is too long (build time is more than 3 minutes).

The Synology CPU just isn't up to this task. So I decided that I need a new server that will run a Kubernetes cluster for my containers. I ended up getting an Intel NUC10 with 1TB SSD and 64GB of RAM. This is running VMware ESXi (7.0.1) on which I run several Ubuntu VM's that serve as Kubernetes nodes. For Kubernetes I installed the MicroK8s distro.

The first container I wanted to move to this cluster is the of course the Github runner. But after doing so, the workflow broke, on the SonarQube init.

The Sonar initialization uses a internal DNS name to find the SonarQube server (a container on the Synology). SSH-ing into the Pod confirmed that the name resolving was not working. So I enabled the CoreDns service with my internal DNS server, according to the docs:

sudo microk8s enable dns:192.168.1.1

Ran the workflow again, only to see it fail again. Again tested the name resolving in the container itself, to find out it is still not working.

To manage my K8s cluster graphically I found this cool K8s UI: Lens. With Lens I can easily see the state of my cluster, but also change the config. So also the coredns config, after opening this config I found out that somehow my internal DNS server was not used as forwarder (although the docs say it would). So changing it to my internal DNS:

And saving the file, was enough to get it working. Best of all, my Github workflow now completes in about 2 minutes:

Happy with that..

Btw.. this is the Deployment i'm using for this

apiVersion: apps/v1
kind: Deployment
metadata:
  name: github-runner
  labels:
    app: github-runner
spec:
  replicas: 3
  selector:
    matchLabels:
      app: github-runner
  template:
    metadata:
      labels:
        app: github-runner
    spec:
      containers:
      - name: github-runner
        image: myoung34/github-runner:latest
        env:
        - name: ACCESS_TOKEN
          value: my_token
        - name: REPO_URL
          value: https://github.com/floreseken/myrepo