-
Notifications
You must be signed in to change notification settings - Fork 787
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 multi-arch buildah images #2958
Comments
Re: Cirrus-CI - we 100% control the contents of the VM images and the speed/size of the VMs. The only restrictions are those imposed by the underlying cloud (currently GCP). Adding packages is pretty easy. The only possible exception are images for MacOS and Windows tasks, we use the default ones provided by the platform. |
Re: Travis - The multi-arch hardware is really the only plus. The Ubuntu-centric-ness and slowness/limitations are HUGE detractors. |
Re: Github Actions - Biggest attraction is the "slick" containers-based workflow. IMHO, this is also biggest detractor - it's not very portable to other CI systems. Secondarily, it's a relatively immature platform (some strange/quirky "features" and limitations), and I fear (given time) they may start imposing more heavy-handed usage limitations like Travis. |
Oh! Another option here could be to use OBS, IIRC they do have native hardware available...but I have zero knowledge of how it works. @vrothberg knows more about this. |
The issue with buildah bud --arch ... |
Dang. Those are the kinds of things that seem to get to be slow *and arrive at 99% before suddenly failing. Maybe is there an arch-sensitive dnf downloader we could use to pre-populate all/most of the needed packages locally, before running the build? Makes for an "interesting" Containerfile...but might drastically improve performance. |
Would love to talk to the dnf guys here to see if this is something that could be done on local arch and mounted into the container. |
On F32, edit: The another edit: There is a |
Oh! Wait, maybe the docs are lying, because I found
So, if we could do something like that to seed the cache (even w/o using a container like I did), then run the emulated |
Nice work, we have -v $VCD:$VCD:O for this use case, which should handle everything perfectly. |
From my side, I finished sample Github action to build buildah stable version. Build and push for 4 archs took 36m https://github.com/barthy1/buildah/runs/1839925493?check_suite_focus=true |
@barthy1 my apologies for the slow attention, my attention is divided across many fronts 😞 Looking now... |
@cevich np, it's not a PR so far. Just some demonstration of build Github action. |
...some minor suggestions: Line 35: Use Overall it looks really good actually. The 36-minute full-build time isn't that bad actually, considering it would only happen on branches and cron-schedule (i.e. nobody's waiting for it). Unless you're working on something further, this looks ready to me for a PR. I'm happy to setup the robot accounts and github-action secrets once we have a PR. |
This condition is done actually to push the images only when it's on branches and cron-schedule. For other case it would be just build (to make sure that build actually works) without push. The end of your comment makes me think that it's better to run this step only when we want to push (
I am going to add one more part to current setup to build |
Thanks for the clarification. Ya, I think that might be beneficial, people like waiting even less than machines 😄
This is where things with github-actions can make people loose their minds. IIRC, some workflows (like cron) only operate from the worflow yaml on the default branch. Others (pull request) will run on branches (if the yaml is there). Regardless, when a new release of buildah happens, the workflow yaml will appear on multiple branches, but only sometimes be used 😖 I would suggest splitting up the YAML into multiple files, based on the different |
hmm, I guess I was not clear enough. This can be done in one workflow using matrix to reuse almost everything accept path to Dockerfile and tags |
Oh I gotcha, yeah that's no problem. |
The PR is created - #3006 |
Ahh yes, "that" problem 😞 |
Sorry I am late to the discussion. I actually worked with Cirrus CI on enabling multi-arch workers/Persistent Workers. You should be able to add any architecture(arm64, ppc64le, s390x, amd64) to their platform. Once the workers are configured to and you should be able to deploy jobs. You can see more information in this issue: cirruslabs/cirrus-ci-docs#263 The persistent workers worked very well. If Thank you @barthy1 outlining everything! @rhatdan Let me know if you need help/want access to hardware. |
@barthy1 first off, TYVM for your fine work here. |
@TomSweeneyRedHat hmm, on my local test machine |
just tested the behaviour in github actions. |
at least confirmed that now podman can be used with Github actions easily :) |
@james-crowley I caught that feature the other week, very cool! Thanks for helping with that! As badly designed/immature as github-actions is, and the slowness of emulation, the implementation (in this case) is quite compact. Mainly we're using Github-Actions here because it happened first and @barthy1 already volunteered, not technical superiority. So I certainly won't write-off moving this over to native hardware under Cirrus-CI eventually, esp. if hardware is volunteered 😁 I would very much prefer to stay on one, common automation platform anyway. |
@cevich feel free just to stop working on my PR, if you think you can have Cirrus-CI setup with native hardware fast. |
I don't think it will be "fast". We would need to script all the build, tag, and push aspects + test that it all works at scale, using a brand-new Cirrus-CI feature. Whereas you've got something already (in your PR) completely "scripted" and (it sounds like) already tested. Despite it being non-optimized and on the non-preferred Github Actions platform, "working and tested" is nearly always better than "theoretical and untested" and most certainly better than the current single-arch "cron jobs on a laptop" situation. I've considered the "Sunken Cost Fallacy", but I think in this case it's fine to go out with what you have in your PR. Call it a "prototype" or "proof-of-concept" if you like. Then we plan on followup development of an optimized setup on Cirrus + Native hardware. The main reason is...during the development of the optimized setup, however long that takes, the community can benefit from having automated multi-arch images built. It can also act as a fall-back, in case native hardware + Cirrus doesn't work out in the end. Does that make sense? (I'm okay with being wrong about this) |
Just stumbled on this issue and not sure if my information is relevant now for for future researchers... Cirrus can build multi-arch images and use buildx. @cevich here is the packer template for the image with QEMU. |
Thanks @fkorotkov, I'll keep this in my back-pocket. For this specific issue, we've got this mostly working in github-actions but I'm so very much not a fan. Our container-tools image build-logic has grown well beyond what simple buildx can easily accommodate. Meanwhile, github-actions has proven itself several times, as overly complex, restrictive, unreadable, and unmaintainable by non-experts. So I'm currently working to re-implement as simple bash scripts, we can then run on our Cirrus-CI VMs. Since I'm going that way anyway, moving over to our own container tooling also makes sense. See also #3268 |
This issue is created to track the discussion about best ways to build multi-arch images for buildah.
So far several CI tools were discussed:
Conclusion: Needs more investigation, probably
buildah bud --arch ..
is a solution, still needs to setup everything from scratchConclusion: depends on community opinion?? if Travis should be back on the table for buildah
Conclusion: easy to use, but new CI tool
Long term approach - Cirrus-CI should be the right way to do everything.
Short term approach - probably, Github Actions as easiest way to prepare the code.
Start of discussion - containers/skopeo#1104 (comment)
cc @cevich @TomSweeneyRedHat @rhatdan
The text was updated successfully, but these errors were encountered: