-
Notifications
You must be signed in to change notification settings - Fork 908
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
Support for Multi-Arch Docker Images #10024
Comments
As discussed on #10016, those are not actually about the Docker images, although the work sometimes interleaves a bit!
Help with that would be much appreciated.
Yes, both things somehow ended up mostly on my plate.
Yes, although it depends on the effort from our side, and the maintenance burden. Somewhat related to that, one of the goals of the work in #10016 (that helps us migrate armhf builds off of qemu) is reducing our build times from six hours (armhf in qemu) to 20-30 minutes (armhf on hardware arm64), and we'd prefer that adding platforms does not bring back the six hour builds.
That would definitely solve the 'qemu' problem!
Complete story: https://github.com/PowerDNS/pdns/wiki/Automatic-testing In short: we test on CircleCI and GH Actions; we build packages on our Buildbot; Docker images are autobuilt by the Docker hub. We have removed all traces of Travis (except on older release branches) because of quality issues with the service. |
@Habbie I am happy to point you to those tools. Some scripts are from internal use, some are used in other open source projects I contributed too, and some are from the AdoptOpenJDK project. Let me grab the links and send them to you. Building on architecture is something I always try to encourage but it can be hard due to lack of resources. As you experienced emulation can cause slow downs and on rare occasions when working with low level languages like Looks like you have added a worker to your Buildbot server, https://builder.powerdns.com/#/workers ? Was this a server from AWS offering mentioned in #10016? If so, we could do a similar thing and give PowerDNS access to As of right now, there is no native integration with GitHub actions for Lastly, to get some testing going on |
Thanks!
Yes, we'd rather never go the qemu route again. We have some informal periodic builds on OpenBSD/arm64 and MacOS on M1, and they do find things. What you call 'serious issues with builds in low level languages' we do like to call 'bugs caught early' :D
I briefly added an arm64 worker there yesterday, then removed it again because our configuration was not ready for it.
The arm64 worker that we had there briefly was an AWS instance; we have not signed up for the free credits for that yet, but we might.
I kind of saw this coming from your first message. It would be much appreciated.
Ah! I shared with @pieterlexis the expectation that we could add them as GH Action Runners - can you explain why we couldn't do that today?
Please keep us posted :)
There are two things. (1) we have docker images, built from Dockerfile-* in the root of our repo. Using them should be as simple as There should be no need to change anything in pdns-builder for supporting different architectures, at least the way we are doing it now. |
@Habbie Do you have an email I can start the process getting you I took a look at your current GitHub actions attached to this repo, and I am not 100% sure how you are utilizing them. Could you clarify your process? GitHub Actions should work if you are using it to connect to another service to build Docker images. Like spinning up a VM on another cloud provider or calling another CI/CD platform like CircleCI/Traivs. As it currently stands the GitHub runner/agent to add your own workers to GitHub actions is coded Thanks for breaking down the process of the Docker builds and how packages are made! I am going to spend sometime today/tomorrow to confirm both work. And if not, I'll post back with some needed tweaks or hacks to enable Thanks for all the help so far! |
That email is current but private, please use peter.van.dijk@powerdns.com for this. (will respond to the rest later) |
Thanks for the email. I totally forgot to link you to some the build tools/scripts: https://github.com/jordan-cartwright-ibm/example-docker-manifest/tree/master/.ci This is one of the scripts we use in the open source community. Helps break down how multi-arch images are built and handled. While the example has There is also Buildx, https://docs.docker.com/buildx/working-with-buildx/, but it is still in "beta". Plus the default uses Another option is the official Docker Image build CI/CD which has access to a bunch of different architectures. But that would require PowerDNS to become an official image on DockerHub. |
@Habbie running into some issues build the Dockerfile, The error is:
I spoke with the developer of that PR. He mentioned building LuaJIT with that patch should work. Oddly enough other distros seems to have pulled in the unofficial patches like OpenSUSE and Fedora. That is as far as I got with I got a little further in the build for Lines 45 to 52 in 2d8d7e0
Throws an error:
From the error it seems to be missing a needed package |
We're well aware of this one - on arm64, it is available but broken. Our debian package builds have this:
Indeed our Dockerfile, that we only tested on amd64, does not make that distinction. It looks like both the Dockerfile and the Debian/Ubuntu (and RPM!) packaging should be aware of the right choice for more platforms.
The step with |
If you're asking about Docker images, we currently build those on the Docker Hub, but that limits us to amd64 (unless we accept qemu, which I don't like and also I don't think is fair on their free build service). With the addition of arm64, and pending this work, more platforms, we think it would make sense to move Docker image builds to GH Actions or Buildbot, with a preference for GH Actions I think.
Ah yes, I forgot about the runner requiring .NET. We'll have to see what makes the most sense for integration there. |
@Habbie I think GitHub actions might be a good idea to move too. Even then I think there probably exists a BuildBot action to kick of a remote job. So if you can build for
I tried adding I saw where you disabled the build dependency for Lastly, I know it the Dockerfile you had a couple comments about pulling in a tarball instead of building from source. Are you planning on moving that way for installs in Docker? I think installing a tarball thats pre-built might be a cleaner solution for the Docker installs. Or even pulling down and install the package via the OS's package manager. This way the install process from Docker and standard bare metal installs are similar. |
The comments are about source tarballs vs. the git tree. We have 3 products in our git tree (auth, dnsdist, recursor) that we distribute as 3 tarballs, where the dnsdist and recursor tarballs have a slightly different structure than the git tree. Right now, you cannot build dnsdist or recursor Docker images from their source tarballs, only from the git tree. The Docker images do not use our packages repositories on purpose, so that users can use the Dockerfiles to easily build custom or patched software. |
You could try removing |
@Habbie Thanks for the tip. I'll remove Ran into the same error with
@kpfleming Did you run into similar issues build for |
Got closer on
|
On my amd64 system, unixODBC is found in
I did not run into this issue building packages on arm64; I'll try a Docker image now. |
so that broken include(path) never manifested on other systems! |
My arm64 |
Our package builds (which is what @kpfleming tested) don't have the ODBC problem because |
I can build our Docker images on arm64 with master + https://gist.github.com/Habbie/bfc5aef067fd850a5137191534298ea9 |
|
Just opened this PR: protozero: make internal includes work #10030 I believe it should solve this problem for you. |
@Habbie The fixes you posted worked with slight modifications. For
For
Unfortunately, I think you could still keep the one Dockerfile but you would need to add some bash "magic" to determine if the arch is |
Thanks Jim, that's roughly the level of success I was expecting. All of this is solvable, indeed we'll need a bit of magic here and there. |
from a tip by @pieterlexis:
|
@Habbie That is a good tip! Just confirmed the path on |
I don't have a ppc64 to test on so I used
So yes, that works! |
https://hub.docker.com/r/powerdns/pdns-recursor-51/tags has our first official dual-arch image. Feedback would be very welcome! |
Short description
I would like to see the support for multi-arch images as PowerDNS starts to build out their Docker image offerings. Specifically, support for
s390x
andppc64le
would be extremely helpful.Usecase
I want to be able to deploy and utilize PowerDNS in any environment/system without worrying about the architecture I am running on. I do a lot of work on Linux on Z(s390x) and having a
s390x
image would be helpful.Description
I helped multiple open source communities with enabling multi-arch support for their Docker images using manifest. There are a couple build tools that make the heavy lifting easy but the Dockerfiles need to be design to be architecture aware.
I saw two issues/PRs open talking about multi-arch support:
#10016
#8655
@Habbie, you seem to be involved a lot in the Docker development and also enabling multiple architectures. Would supporting
s390x
andppc64le
be something you could be open too?Additionally, if you need access to
s390x
andppc64le
resources there are multiple ways I can assist with that. I did see mentioned of Travis CI in, #8655 , but do not see a lot use of the CI/CD in this repo. How are builds currently be handled?The text was updated successfully, but these errors were encountered: