Closed alex9fredericks closed 5 months ago
The following script works fine with GitHub runners but not with ARC:
Just checked this and it happens because summerwind/actions-runner-dind
docker image has an old version of python (3.8) that it's not supported by the dagger python SDK.
Another varation that still does not work (2)
this seemed to work, it's the docker stop
part that failed after running the pipeline since it seems like the dagger engine wasn't started. @alex9fredericks could it be possible that the python main.py
is not currently running a dagger pipeline in this case?
In any case we should handle this gracefully also.
Just checked this and it happens because summerwind/actions-runner-dind docker image has an old version of python (3.8) that it's not supported by the dagger python SDK.
Yes!! This is a big part of the solution. Here is some yaml to get Summerwind’s ubuntu 22.04 runner:
apiVersion: actions.summerwind.dev/v1alpha1
kind: RunnerDeployment
metadata:
name: runnerdeploy-for-testing
spec:
replicas: 1
template:
spec:
repository: git_username/repo
ephemeral: false
image: ghcr.io/git_username/actions-runner-dind:ubuntu-22.04 # < nice
imagePullSecrets:
- name: regcred
@alex9fredericks could it be possible that the python main.py is not currently running a dagger pipeline in this case?
True, we never get to run a pipeline. The issue is, that the Summerwind image user that runs everything, runner:runner
does not have access to the folder /usr/local/
, at least, cannot write the dagger
binary to it, and therefore the Dagger For GitHub Action fails (here). It would work if you do this, with sudo:
cd /usr/local && { \
curl -sL https://dl.dagger.io/dagger/install.sh 2>/dev/null | DAGGER_VERSION=0.9.3 sudo sh
What you can also do, is run a custom version of the Summerwind docker image. Here I change the owernship of the folder /usr/local/bin to runner, and now it all works!
# file
# ---
# /apps/actions-runner-dind/Dockerfile
FROM summerwind/actions-runner-dind:ubuntu-22.04
USER root
RUN apt update -y && \
apt install -y --no-install-recommends \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN chown -R runner:runner /usr/local/bin/
USER runner
This PR https://github.com/dagger/dagger-for-github/pull/105 fixes the /use/local path issue. This problem will be resolved in the next release
@alex9fredericks Please confirm that you're good to go with the v5.1.0
release 🙏
https://github.com/marketplace/actions/dagger-for-github
Hey @jpadams, everything worked fine at the first run! :)
This test was done with a simplified runner image:
FROM summerwind/actions-runner-dind:ubuntu-22.04
USER root
RUN apt update -y && \
apt install -y --no-install-recommends \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
USER runner
What is the issue?
The issue I'd like to log, just more FYI, is that it seems that you cannot run the GitHub Dagger action, out of the box, with self hosted runners, on Kubernetes. I installed the ARC for GitHub, with Helm, with the quick-start guide. (With Helm, this was actually quite easy to install). I managed to register some runners, and most of the workflows just run fine. For reference, workflows that used the "docker/build-push-action@v4.1.0", did work right away.
Dagger version
dagger v0.9.3
Steps to reproduce
Problem and Solution (1)
The following script works fine with GitHub runners but not with ARC:
Solution
This is my workaround for the moment!! 😄 :
Another varation that still does not work (2)
I also tried another variation, based on a suggestion from @marcosnils! This still produces another error:
Log output
No response