ci: Add support for linux-riscv64 - #7414
Conversation
|
Currently blocked on missing https://github.com/anchore/syft support for |
|
Nice! IIUC we need to add the RISE app to our GitHub org, right? There's also https://www.riscvrunners.com/. Do you know the differences? |
Yes, you’d need to add https://github.com/apps/rise-risc-v-runners (only require permissions on “self-hosted runners read+write”). On https://www.riscvrunners.com/, the main difference is the RISE ones are free (and will stay free, RISE is not a business) and you have access to the whole machine. I’m not intimately familiar with the base image they are using (which packages, what OS, etc) but I’ll look more into it. |
|
Trying to add the proper image dependencies at k0sproject/image-builder@main...luhenry:k0s-image-builder:main |
I need to follow up on k0sproject/image-builder#256. I don't think we can generally enable RISC-V builds for everything. |
Sounds good. Do you know if there will be other images that will be a required dependency? |
|
I'm brute-forcing my way through figuring out which images/versions are working: https://github.com/luhenry/k0s-image-builder/actions/runs/24236376271 Good news is quite a few are already working, so adding them is a simple "adding a new version" away. Once that workflow finished, I'll look through all the failures and categorize them, that should give us a good todo list, and list of things to exclude/ignore as well |
No. In fact, Calico is not a requirement. By default, k0s will use kube-router, which is already available for RISC-V. You won't be able to use NLLB (another optional feature), as this is would require envoy, and we didn't have the time to try to make it compile for RISC-V. But I'm currently looking into adding support for Traefik (#7405), mainly for Windows, but Traefik supports RISC-V and ARMv7 out of the box, so this might be a viable alternative to make NLLB usable on RISC-V, as well. |
|
Recent development: BIRD has just added (like 3 days ago) builds for riscv64: https://gitlab.nic.cz/labs/bird/-/commit/0aca5b325fb6606d620ef349d70892105e1242c3. I ran into that issue in the build for
Good, then at least it's not a blocker. It should get resolved soon though. I never like diverging from how it's done on |
|
Also, another finding: |
Not all the images in the image-builder repo are used by k0s itself. There's also some utility things, like the GH Actions runners which we use to build k0s for ARMv7. Not sure if the etcd stuff is used anywhere, still. Pretty sure that envoy is the last image that's directly used by k0s which is not available for RISC-V. |
We started to build BIRD from source in the Calico Dockerfiles recently, so this should be fine. |
|
Triggering with |
|
And for the missing |
|
Following k0sproject/pushgateway-ttl-builder#5 (comment), I've cherry-picked your commit to mark Envoy as not-supported. |
This project is a dependency of `k0s` which is working on being built, tested and released on `linux-riscv64` [1]. RISC-V is gaining momentum especially in the embedded and edge world. [1] k0sproject/k0s#7414
|
https://github.com/replicatedhq/troubleshoot is missing on riscv64 now for:
The simplest solution is to simply not run the I've also verified that k0sproject/image-builder#253 is working: I rebased it and used the resulting image at https://github.com/luhenry/k0s/actions/runs/24254357499/job/70824468191. The Build :: Airgap image bundle (riscv64) / linux-riscv64 is passing. |
|
Opened a PR on replicatedhq/troubleshoot#2010 for |
|
I got some progress in enabling the test suite but hitting the next blocker. On the overlay-on-overlay, I fixed it by using an empty volume for the pod at The next issue I ran into was the DNS from kube-proxy inside the k0s cluster was getting confused because the CIDR was the same between the k8s's pod and the k0s running inside the pod. The solution was simply to use the hostNetwork for the pods [3]. This actually makes more sense since the pod should not have access to anything internal to the k8s cluster. Finally, the issue I'm not running into has to do with As a side note, we are also working with a Kernel contributor to upstream any patches necessary to mainline Linux to support the TH1520 (the SoC used by the EM-RV1) so we can go to mainline kernel instead of an older kernel version. Overall, it's making good progress and I'm hoping to get things working in next weeks. Good news is nearly nothing has to change on k0s itself, and all in the infrastructure. [2]: |
|
Good news! CNCF approved to add the RISE RISC-V runners to the k0sproject org 🚀 @luhenry could you rework this PR in a way that it doesn't trigger for every PR? Instead, I think it's best to start with a nightly job that also has a workflow_dispatch, similar to what we have for the ostests. If the integration tests aren't working yet, we could add this as an optional parameter for workflow_dispatch (again, in a way similar to what we're doing for the ostests, this time in ostests-matrix.yaml). This way, we can execute and iterate on the integration tests without needing to change the workflows. |
fa4d755 to
cc9320d
Compare
|
I split the I'm testing it at:
|
d476e15 to
822738f
Compare
|
For the latest on the issue with
@twz123 that should be all done. |
|
If you want, you can split out 6fd5939 into a separate PR, so we can merge that already. |
|
@twz123 I split it out as you requested. Also, I got UPDATE: UPDATE 2: The PR for sonobuoy: vmware-tanzu/sonobuoy#2049 |
|
@twz123 anything else I should do to get this merged? Thanks 🙏 |
|
I verified a build works: https://github.com/luhenry/k0s/actions/runs/26634638919 |
|
Enabling the |
Signed-off-by: Ludovic Henry <git@ludovic.dev>
|
Also enabling |
twz123
left a comment
There was a problem hiding this comment.
Thanks for pushing this forward!
There was a problem hiding this comment.
The changes here are a bit hacky, but I don't have a better proposal right now that wouldn't require lots of work. So just let's live with it for now...
|
It's been succeeding for past few days: |
Description
This is currently an experiment. Happy to get reviews as always.
Add GitHub Actions CI on
linux-riscv64using RISE RISC-V Runners.Relates to #1919
Depends on k0sproject/image-builder#253 #7459
Type of change
How Has This Been Tested?
Checklist