-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
ARM64 images built and Available on AWX repository #14643
Comments
whilst we wait https://gitlab.com/nofusscomputing/projects/ansible/awx-arm and for automagic arm builds and https://hub.docker.com/r/nofusscomputing/awx for the location of builds |
@jon-nfc awesome work, thanks for this information. A lot of interest around arm64 builds. I think integrating this into our CI would take some work, and we'd probably need some outside contributors willing to take up that work Basically someone needs to port the steps you outlined into our GH workflows to build the target image and push to quay |
G'day @fosterseth,
The amount of work is not as much as seems, to make the changes for the build to be multi-arch took no more than an hour (only due to having to learn layout) and from my side getting the gitlab builds to work another 10-15mins work. I'm leaning towards the conversion for github to take around the same. Although as mentioned in OP, I'm not familiar with Gthub CI/CD. I'm happy to raise a PR to conduct the required changes. Although I will require someone with Github CI/CD knowledge to check my work as I will have to learn how to use/implement it. The latter will increase the time to implement the changes. Who's a good POC for this knowledge and to code review the PR?
On what I've seen so far, the changes are relatively small. Time will only be increased due to having to wait for confirmation the workflows work/complete. |
haven't forgotten about this issue, however am going to wait before a PR as the work from the following should be easily portable to this repo as these repos appear to share a similar workflow |
+1 |
1 similar comment
+1 |
waiting for this as well |
Is this also to fix the built awx-ee images? Those are still failing deployment to an ARM64 cluster. Is there any work needed, to make that work? |
+1 |
Hi @jon-nfc, I'm definitely interested in this PR :) |
working on it... |
Thank you @TheRealHaoLiu, I removed my custom image, it works well ! (tested with latest AWX Operator version 2.15.0) |
Please confirm the following
Feature type
New Feature
Feature Summary
The feature I'm requesting is officially built ARM images. I note that support has been added to build the images yourself, however not an option for a lot of people out there.
Implementation of this proposal requires no additional infrastructure, just some minor changes to the build commands.
Currently docker has buildx. This tool enables cross-platform building of containers for countless architectures. best of all, this occurs within a single build command,
docker buildx build --platform=
. Using this command instead of the originaldocker build
. cross-compiles for each of the platforms listed and places all images within the same manifest. In addition, you can prepend--push
to push all built images and the manifest to the container registry.I currently use this method to cross-compile all of my container images.
What requires changing
docker build command.
notes:
--platforms=linux/amd64,linux/arm64
this will build both amd64 and arm64 together and place them in a single manifest--push
this will push everything together to the container registryEvery
FROM
declaration within dockerfilesnotes:
ARG TARGETPLATFORM=linux/amd64,linux/arm64
setsTARGETPLATFORM
variable to have a default value if not specified at runtimeFROM --platform=$TARGETPLATFORM
tells docker to use the specified architecture for the container. if this value is omitted from theFROM
declaration, the build systems architecture is used.For cross compilation to work packages binfmt-support and qemu-user-static (these are the debian package name). Both together allow the running of binaries of a different architecture. Or you can do the build from a docker container (the method I use), which contains everything required fro the cross-compilation to work. Prior to building you have to activate modules in the kernal for other binaries to run.
update-binfmts --enable
I'm not familiar of how the github CI/CD pipelines work, however I am successfully doing cross-compilation within the gitlab ecosystem. their runners are all AMD64. You maybe able to convert this stripped down gitlab ci job. Original here
summary:
nofusscomputing/docker-buildx-qemu:dev
where all commands are run from, including buildsetuptools
andwheel
wheel are required if the package requires compilationupdate-binfmts --enable
enable kernal modulesdocker buildx create --driver=docker-container --driver-opt image=moby/buildkit:v0.11.6 --use
sets up buildx to use buildkitdocker buildx build {etc}...
all in one command to cross-compile build, manifest creation and push to a container registry .inspect
shows the manifest and containing images.I'm happy to assist or if ok, start a PR. However the latter I will require someone with Github action knowledge to walk me through adjusting.
Select the relevant components
Steps to reproduce
.
Current results
.
Sugested feature result
That https://quay.io/repository/ansible/awx contains both amd64 and arm64 images. Yes, I know different repos, same same for the operator and ansible-ee images.
Additional information
No response
The text was updated successfully, but these errors were encountered: