-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build CAPO supported images #1502
Comments
Initial experiments: tormath1@d981cfb but limited because Github Actions do not support KVM (except on hosted runners) |
@tormath1 We would probably use cloudbuild rather than GH actions, and I think that might support KVM. |
No more luck with cloudbuild - using EDIT: Trying now with no acceleration, just to see how many times it would take. |
Here's the result with no acceleration: https://github.com/tormath1/cluster-api-provider-openstack/actions/runs/4408341205/usage - generated artifacts are currently uploaded on Github but we could send them to a GCS bucket. |
That's awesome! I think we're going to need this in cloudbuild for 2 reasons:
That said, I don't currently know when I or anybody else will find time to implement this and you seem to have something looks close to useful for at least some people already. I wonder if we should merge a GH actions solution now and aim to replace it with a cloudbuild solution in prow when we get to it. Thoughts? |
Moving it to cloudbuild is not an issue as it mainly relies on the Makefile and Docker to run. It's just less community friendly as one can easily browse the logs on the Github actions (or maybe we can have the logs from cloubuild ? I don't know how it works :D) |
Yeah, we have the logs: they're in the prow job that runs the cloudbuild, same as regular tests. Admittedly they're not as easy to find, though. This feels like an opportunity for improved docs 🤔 |
For reference, here's the logs of one of our nightly image builds: https://prow.k8s.io/view/gs/kubernetes-jenkins/logs/cluster-api-provider-openstack-push-images-nightly/1635189053307490304 Incidentally, that job seems pointless. We should probably kill it. |
Example of automatic uploading of artifacts from a cloudbuild job: cluster-api-provider-openstack/Makefile Lines 405 to 406 in b2b2a3e
|
Ported the Github Action to cloudbuild, it works fine with a single job but not when running in parallel the four builds (flatcar x2 + ubuntu x2). It might be some network issue with Packer trying to SSH... (logs) |
Could it just be timeouts? It's probably fine to run them sequentially as separate cloudbuild steps, I guess. |
I don't think it's timeout, it's very early in the builds - we can run them sequentially if 6h of build is not an issue :) |
status update: it "works" with cloudbuild using image-builder Docker image and parallel builds without kvm acceleration but it's not super reliable with commands typed over VNC. proposals:
|
could a step below this be to maybe build out the Makefile's needed to make this happen so users can easily build things out.. and then this could be using that toolset? |
@tormath1 Do you think it's worth committing the Makefile in something like its current state? |
I think it's always worth to push things - especially the Makefile as it is already in a good shape. We just miss the image-builder PR to use an official image. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
@tormath1 what is the status of this? Do you have something for the Makefile that could be useful? I would like to take a shot at getting the cloudbuild operational 😄 |
@lentzi90 I did not touch this topic since the last comments. There is currently this commit on my fork: tormath1@b6f3326: it builds images in Github Actions using @mdbooth Makefile. so I think we could at least enable the sequential builds - only the upload to a GCS bucket is missing but I think it's trivial since we are in the cloudbuild context (I guess we should have permissions to write into CAPO bucket). |
FTR, we are doing this on our side at the moment in the Cluster API driver for Magnum. The images are purely generated using GitHub Actions running inside our cloud which have nested virtualization. The images are also then tested with Sonobuoy + CAPI afterwards to make sure they are functional. https://github.com/vexxhost/magnum-cluster-api/blob/main/.github/workflows/test.yml#L143-L191 |
@lentzi90 @mdbooth looks like Github runners now support nested virtualization for all runners (actions/runner-images#7191 (comment)) - we could give another try to build images using github actions |
Yep. My motivations for preferring Prow over GH actions are mostly operational, but having nothing remains even more painful. I think we should resurrect the work you already did to get this working a while back. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close not-planned |
@k8s-triage-robot: Closing this issue, marking it as "Not Planned". In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
/kind feature
Describe the solution you'd like:
During the CAPO office hours, @mdbooth suggested to build CAPO supported images in the CI. These images could be directly consumed by the tests (and consumed by the users?).
These images could be built for multiple Kubernetes version and multiple OS version (ubuntu-2004, flatcar, etc.)
Anything else you would like to add:
On the implementation side, we could use Github Actions and image-builder Docker image. Example with Flatcar:
(Note: it needs kubernetes-sigs/image-builder#1092)
For Flatcar: flatcar/Flatcar#928 (kubernetes-sigs/image-builder#924) can be interesting
Produced images could be then stored on a GCS bucket.
The text was updated successfully, but these errors were encountered: