Giter VIP home page Giter VIP logo

Comments (16)

tdiesler avatar tdiesler commented on June 14, 2024 2

You can assign this to me - I wanted to look at this base image issue anyway
Depends on #5200

from camel-k.

squakez avatar squakez commented on June 14, 2024

This is already documented: https://camel.apache.org/camel-k/2.2.x/installation/advanced/multi-architecture.html

from camel-k.

christophd avatar christophd commented on June 14, 2024

Thanks for pointing to the docs - I was not aware of this.

But having to use the sha256 digest prevents us from getting the very latest updates from an image stream arm64v8/eclipse-temurin:17, right? When there is a new update pushed to arm64v8/eclipse-temurin:17 we need to manually adjust the base image digest on the base image.

Do we know why we need to use the digest in the base image here? Maybe @gansheer?

from camel-k.

gansheer avatar gansheer commented on June 14, 2024

That only happens in ARM I think. For some reason it looks by default for amd64 image and can't find it, but when you give the digest it pull the image you configured. I wonder if we have the same issue with spectrum.

Maybe this #5200 will fix the need for sha256 digest in image name for ARM arch.

from camel-k.

tdiesler avatar tdiesler commented on June 14, 2024

At build time, we extract the base image digest from the manifest, like this ...

ARM64_DIGEST := $(shell docker manifest inspect eclipse-temurin:17 | jq -r '.manifests[] | select(.platform.architecture == "arm64") | .digest')

We then use that base image, if no other was explicitly defined

$ kamel install --olm=false --operator-image apache/camel-k:2.3.0-SNAPSHOT

Using linux/arm64 base image: eclipse-temurin:17@sha256:321ac6af97a11d5aa5a580d1635ab6f945582b00eea1fe672f0cbb437b4293c8
Camel K installed in namespace default 

PR: #5246

from camel-k.

tdiesler avatar tdiesler commented on June 14, 2024

In this second attempt, we simply tell Jib to consider multiple platforms for the FROM image

-Djib.from.platforms=linux/amd64,linux/arm64 -Djib.from.image=eclipse-temurin:17

I also upgraded to jib-3.4.1

from camel-k.

gansheer avatar gansheer commented on June 14, 2024

In this second attempt, we simply tell Jib to consider multiple platforms for the FROM image

-Djib.from.platforms=linux/amd64,linux/arm64 -Djib.from.image=eclipse-temurin:17

I also upgraded to jib-3.4.1

That's nice !

I guess that means by default we will create images compatible with both platforms.

from camel-k.

tdiesler avatar tdiesler commented on June 14, 2024

@christophd could you perhaps verify whether this branch works for you?
If you want the multiarch operator commit as well, its this branch

make images

should build the arm64 image it you are on arm64

from camel-k.

tdiesler avatar tdiesler commented on June 14, 2024

I guess that means by default we will create images compatible with both platforms.

Not sure that this is actually true. For now I assume that the integration image (singular) is now fixed to run on the platform that invokes the build. Whether and how that image is also portable to other archs would be another issue, with lots of testing and documentation to be done

In short, this PR is just a fix to the issue at hand - no (positive) side effects implied

from camel-k.

christophd avatar christophd commented on June 14, 2024

Sorry, I have to reopen this issue as all integration builds fail on host with arm64 architecture.

This is the error I get in the Camel K operator with 2.3.0-SNAPSHOT built from main branch:

{"level":"error","ts":"2024-03-27T08:11:04Z","logger":"camel-k.maven.build","msg":"Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.4.1:build (default-cli) on project camel-k-integration: Failed to create, open, or parse global Jib config file; see https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#where-is-the-global-jib-configuration-file-and-how-i-can-configure-it to fix or you may need to delete /.config/google-cloud-tools-java/jib/config.json -> [Help 1]","stacktrace":"github.com/apache/camel-k/v2/pkg/util/log.Logger.Error\n\tgithub.com/apache/camel-k/v2/pkg/util/log/log.go:81\ngithub.com/apache/camel-k/v2/pkg/util/maven.normalizeLog\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:83\ngithub.com/apache/camel-k/v2/pkg/util/maven.MavenLogHandler\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:54\ngithub.com/apache/camel-k/v2/pkg/util.scan\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:76\ngithub.com/apache/camel-k/v2/pkg/util.RunAndLog.func1\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:55\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/[email protected]/errgroup/errgroup.go:78"}
{"level":"error","ts":"2024-03-27T08:11:04Z","logger":"camel-k.maven.build","msg":"","stacktrace":"github.com/apache/camel-k/v2/pkg/util/log.Logger.Error\n\tgithub.com/apache/camel-k/v2/pkg/util/log/log.go:81\ngithub.com/apache/camel-k/v2/pkg/util/maven.normalizeLog\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:83\ngithub.com/apache/camel-k/v2/pkg/util/maven.MavenLogHandler\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:54\ngithub.com/apache/camel-k/v2/pkg/util.scan\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:76\ngithub.com/apache/camel-k/v2/pkg/util.RunAndLog.func1\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:55\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/[email protected]/errgroup/errgroup.go:78"}
{"level":"error","ts":"2024-03-27T08:11:04Z","logger":"camel-k.maven.build","msg":"To see the full stack trace of the errors, re-run Maven with the -e switch.","stacktrace":"github.com/apache/camel-k/v2/pkg/util/log.Logger.Error\n\tgithub.com/apache/camel-k/v2/pkg/util/log/log.go:81\ngithub.com/apache/camel-k/v2/pkg/util/maven.normalizeLog\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:83\ngithub.com/apache/camel-k/v2/pkg/util/maven.MavenLogHandler\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:54\ngithub.com/apache/camel-k/v2/pkg/util.scan\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:76\ngithub.com/apache/camel-k/v2/pkg/util.RunAndLog.func1\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:55\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/[email protected]/errgroup/errgroup.go:78"}
{"level":"error","ts":"2024-03-27T08:11:04Z","logger":"camel-k.maven.build","msg":"Re-run Maven using the -X switch to enable full debug logging.","stacktrace":"github.com/apache/camel-k/v2/pkg/util/log.Logger.Error\n\tgithub.com/apache/camel-k/v2/pkg/util/log/log.go:81\ngithub.com/apache/camel-k/v2/pkg/util/maven.normalizeLog\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:83\ngithub.com/apache/camel-k/v2/pkg/util/maven.MavenLogHandler\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:54\ngithub.com/apache/camel-k/v2/pkg/util.scan\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:76\ngithub.com/apache/camel-k/v2/pkg/util.RunAndLog.func1\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:55\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/[email protected]/errgroup/errgroup.go:78"}
{"level":"error","ts":"2024-03-27T08:11:04Z","logger":"camel-k.maven.build","msg":"","stacktrace":"github.com/apache/camel-k/v2/pkg/util/log.Logger.Error\n\tgithub.com/apache/camel-k/v2/pkg/util/log/log.go:81\ngithub.com/apache/camel-k/v2/pkg/util/maven.normalizeLog\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:83\ngithub.com/apache/camel-k/v2/pkg/util/maven.MavenLogHandler\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:54\ngithub.com/apache/camel-k/v2/pkg/util.scan\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:76\ngithub.com/apache/camel-k/v2/pkg/util.RunAndLog.func1\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:55\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/[email protected]/errgroup/errgroup.go:78"}
{"level":"error","ts":"2024-03-27T08:11:04Z","logger":"camel-k.maven.build","msg":"For more information about the errors and possible solutions, please read the following articles:","stacktrace":"github.com/apache/camel-k/v2/pkg/util/log.Logger.Error\n\tgithub.com/apache/camel-k/v2/pkg/util/log/log.go:81\ngithub.com/apache/camel-k/v2/pkg/util/maven.normalizeLog\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:83\ngithub.com/apache/camel-k/v2/pkg/util/maven.MavenLogHandler\n\tgithub.com/apache/camel-k/v2/pkg/util/maven/maven_log.go:54\ngithub.com/apache/camel-k/v2/pkg/util.scan\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:76\ngithub.com/apache/camel-k/v2/pkg/util.RunAndLog.func1\n\tgithub.com/apache/camel-k/v2/pkg/util/command.go:55\ngolang.org/x/sync/errgroup.(*Group).Go.func1\n\tgolang.org/x/[email protected]/errgroup/errgroup.go:78"}

I am running on Minikube on a Mac M1 arm64.

What I did to build the Camel K image is make images and install the operator with:

kamel install --global --operator-image docker.io/apache/camel-k:2.3.0-SNAPSHOT-arm64 --base-image eclipse-temurin:17@sha256:321ac6af97a11d5aa5a580d1635ab6f945582b00eea1fe672f0cbb437b4293c8

I also tried to use the base image arm64v8/eclipse-temurin:17 with same result

from camel-k.

squakez avatar squakez commented on June 14, 2024

docker.io/apache/camel-k:2.3.0-SNAPSHOT-arm64 is no longer valid. I think you need to install normal docker.io/apache/camel-k:2.3.0-SNAPSHOT. The cluster will pick the correct platform from the manifest. We amended the previous documentation https://camel.apache.org/camel-k/next/installation/advanced/multi-architecture.html

from camel-k.

squakez avatar squakez commented on June 14, 2024

Also, mind that when you make images you should not run --operator-image docker.io/apache..., otherwise you'd be using the image published in docker instead of your local own.

from camel-k.

christophd avatar christophd commented on June 14, 2024

docker.io/apache/camel-k:2.3.0-SNAPSHOT-arm64 is no longer valid

why is make images building this image then?

Also, mind that when you make images you should not run --operator-image docker.io/apache..., otherwise you'd be using the image published in docker instead of your local own.

I have switched to Podman recently and this is how the image gets pushed to the Minikube registry using the docker.io/ prefix. I need to use the prefix but I guess this is MacOS specific when using the Minikube VM

from camel-k.

christophd avatar christophd commented on June 14, 2024

docker.io/apache/camel-k:2.3.0-SNAPSHOT-arm64 image works good for me. This is not the issue. the issue is that the integration base image for arm64 architecture is not working with jib build in the operator

from camel-k.

squakez avatar squakez commented on June 14, 2024

Okey, I though you were using the old nightly. In general, given we're publishing the manifest now, I think the usage of suffix is no longer required as the decision is going to be delegated to the cluster.

from camel-k.

christophd avatar christophd commented on June 14, 2024

In the error I can see Failed to create, open, or parse global Jib config file as it expects a file in ~/.config/google-cloud-tools-java/jib/config.json. Jib will create that file if not present but I think the process lacks write permissions for that path.

We could add XDG_CONFIG_HOME env var and point this to a writable directory within the Docker image.

from camel-k.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.