-
Notifications
You must be signed in to change notification settings - Fork 350
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
Multi-architecture support #1238
Comments
This issue has been automatically marked as stale due to 90 days of inactivity. |
Any updates for this task? Can I help with something? |
@robertonav20 you may have a look at the tasks in the issue description if you're willing to have a look at the implementation. A draft PR with some PoC may be useful to experiment and reason about the pros and cons. |
Hi @squakez, I must modify makefile and dockerfile for camel-k-operator and use the correct java base image for camel quarkus application. I apologize but I haven't strong skill with go language, I try to do my best. Can you give me an advice? |
I think you can start having a look at the builder package which is the one in charge to take care for building images and pushing to registry. |
Hi @squakez,
Now I'm trying to use buildah library instead buildKit, it's more friendly than buildkit, but it's the same I got error during build
you can find the my code here https://github.com/robertonav20/camel-k/... i will update you if i fix the problem |
Hi,
I thinked to use quarkus-mandrel-base-image for arm64 but isn't available for now (quarkusio/quarkus-images@21e25a3)
So, for the first part can i submit pr? For the integration-kit image, I cannot find a solution to build and push a working image because there are a problem dependency (read the previous comment). |
Thanks for running those experiments and reporting the feedback. About the multi-architecture Java image, I guess we may wait for that to be officially available. We will align to Quarkus platform, so, that one will become eventually available. However, you can create a new action beside |
It makes sense to me. +1. |
So, @squakez suggest a command makes-arch to build for other platform, we can make the same thing with dockerfile because the base image isn't available. It makes sense if that image doesn't available soon, are you right? I checked the GitHub action, here https://github.com/marketplace/actions/build-and-push-docker-images can be found the official docker GitHub action of docker which support buildx, so I think it's possible use it. Anyway, It's a pleasure help the community.... For now I try to build an integration kit multi arch with buildah strategy. It's possible just update buildah version to 1.23.3 because the latest version support arm64 arch... Stay tuned I will give some feedback soon |
As i say previously, i build and execute an integration kit inside rpi4 8gb with architecture arm64 with the use of buildah, below the modifies:
All image are available here https://hub.docker.com/repository/docker/robnav24241/camel-k operator and integration-kit |
Nice work. Ideally those architecture values should be "parameter-ized" so that the user can provide that information somewhere (ie, in the |
@squakez sorry, I don't understand why should be parameterized? Can you describe me? |
Yeah, I am thinking on a generic situation where you have multiple nodes in your cluster, and the operator is running on any non-ARM architecture. Then you have a special node in ARM architecture where you are willing to run the Integrations. In such case, having that value as a parameter would help. |
Ok Great! Thanks! Anyway, i saw the
Then can be map Architecture when necessary just like this
PublishTask struct is shared by all builders for this reason i choosed her @squakez @oscerd @astefanutti @phantomjinx do you agree? |
You can have a look at some refactoring we've done recently here #3032 - We've introduced a generic |
Ok @squakez, i understand your advice but i dont know how to use PublishStrategyOptions. Can you give me and example to fill that structure from cmd? |
Sure, you can have a look at #3032 where we used that for the "Kaniko" options. We may mimick that and include any "Buildah" option as well. |
Hi @squakez, yes i have a look yesterday, below i describe the code: Inside the package builder i add
Here you can find the mapping to buildah builder
Then map architecture attribute to buildah command. I see a difference between #3032 and this task, that task introduce a command parameter for install, but in our case we must manage the architecture of build for integration kit, so it's necessary introduce this parameter inside run command My questions are:
I'm hope you understand my questions. Thanks in advance |
Any build configuration should be included into the IntegrationPlatform, not exposed in the camel-k/pkg/apis/camel/v1/build_types.go Line 107 in fe997b9
and passing them from IntegrationPlatform.PublishStrategyOptions as we're doing for Kaniko settings. Once they are in the BuildahTask, you should be able to use them. |
Ok thanks, i understand your advice and i fix the code just like this.
In this way you can manage the But, i don't understand how to works
If i undertstand well, with install command you can pass Thanks in advance! 😄 |
Nice, that fits perfectly into the design. I think those parameters must be provided by the user editing the IntegrationPlatform (manually) ie |
Hi @barius to build integration kits arm64 it's necessary use buildah as build-strategy you can follow the pr open from this ticket |
@robertonav20 |
Confirm that the PR works! |
Ok great you can find the full guide here https://github.com/robertonav20/camel-k/blob/main/docs/modules/ROOT/pages/configuration/multi-architecture.adoc |
Ah I see, great! However it uses Graal. Don't know what the difference between mandrel and graal so I'm waiting for the official release :) For now everything works for me and I don't have much time testing it out :P |
Partially available in #3309 |
Can we close this issue? |
No, I think that although partially available with your development, this issue need some more work to be fully completed. |
Although Buildah is perfectly fine with regards to building kit images, when Istio auto-injection is enabled, the camel-k builder always wait for the Istio container to complete (which will never happen), and triggers the default 5 min timeout (though Buildah finished in around 1~2 min and after the timeout the build still succeeds). Don't know if this is the expected behavior, or if I should open another issue with it. |
@barius please better open a new issue and which version is affected (I suppose the nightly build). |
@squakez now the is available the multi image of Here the quay.io repository Ref. to the closed issue quarkusio/quarkus-images#83 |
Cool! Thanks for the heads up. Feel free to have a look yourself while this is not picked up for development. |
Edit: It seems I was being captain obvious. Is there anything I can help with? For future googlers, the following error in your pod's logs: |
I guess the last message from @robertonav20 could be a good point from where to continue with the development of this issue. |
So, based on the assumptions:
I have submitted #3820 |
Foreshadowing quote was exactly that. I'm afraid i'll break the build because with multi-arch images we can't rely on the local image store (see docker/buildx#59). I've worked around it and hope that none of the processes rely on 'the image just being there'. Also, I see a 'docker build' step for a 'bundle'. What is that 'bundle', and do I need to fix that too? |
Edit: this was wrong. |
|
Integration tests are failing due to:
I don't really understand this - I cant find a version reference of GraalVM in the source. |
Known issue #3817 |
Current status: ready for polishing. All pipeline errors are due to #3817 or timeouts that are also already known. Next up: parameterize the build archs. |
Current status: retracted the PR because of the amount of noise. The main branch is broken at the moment so i'll wait for things to green up again and then i'll continue getting this thing done. |
As we're planning to rework the way we build the images, I think we should take the opportunity to include the multi-architecture support as well. |
At the moment, Camel K binaries and images are available for amd64 architecture only.
Following up on #1215, it would be useful to publish multi-architecture images, so that Camel K can be used on a wider range of architectures. Based on a recent PoC, I've identify the following tasks:
The text was updated successfully, but these errors were encountered: