Skip to content
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

Add multi-arch builds for hawtio-online-example images #47

Merged
merged 4 commits into from
Nov 1, 2024

Conversation

dale-fu
Copy link
Contributor

@dale-fu dale-fu commented Oct 1, 2024

Adding multi-arch images for arm64, ppc64le and s390x.

  • Rebase to main
  • Build multi-arch images for quarkus using quarkus-container-image-jib extension
  • Build multi-arch images for springboot using kubernetes-maven-plugin (using ubi9/openjdk-xx images from RH)

@dale-fu dale-fu force-pushed the multiarch-build branch 2 times, most recently from 4f658c1 to e504d9d Compare October 1, 2024 20:41
Copy link
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dale-fu Thanks for your contribution! However, there are many unrelated commits, which make it hard to review. I'd expect only 1-2 commits in the pull req. Could you please try rebasing to the latest main again cleanly only with the commits you're really making? Thank you.

README.md Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
Comment on lines 48 to 50
docker buildx build -t quay.io/hawtio/jkube-java-${{ matrix.java }}:latest \
--platform linux/amd64,linux/arm64,linux/ppc64le,linux/s390x \
--provenance=false \
--push target/image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will need to be pushed to quay right? Still not very happy with having to build our own images for building - it should be provided for SB when it's officially supported.

.github/workflows/build.yml Outdated Show resolved Hide resolved
@dale-fu dale-fu changed the base branch from multiarch-build to main October 2, 2024 13:05
@dale-fu dale-fu changed the title Add multi-arch builds for hawtio-online-example images [DRAFT] Add multi-arch builds for hawtio-online-example images Oct 2, 2024
@dale-fu
Copy link
Contributor Author

dale-fu commented Oct 2, 2024

@dale-fu Thanks for your contribution! However, there are many unrelated commits, which make it hard to review. I'd expect only 1-2 commits in the pull req. Could you please try rebasing to the latest main again cleanly only with the commits you're really making? Thank you.

I have switched this request to merge into the main, this should remove all of the extra commits. The multiarch-build branch wasn't synced with main.

@dale-fu dale-fu force-pushed the multiarch-build branch 2 times, most recently from 72a4f6d to 54cdf14 Compare October 2, 2024 18:03
@dale-fu
Copy link
Contributor Author

dale-fu commented Oct 2, 2024

I have updated the PR by replacing the default jkube-java-xx with the openjdk s2i image provided by RH which is available on all 4 platforms. This should remove the need to build multiarch versions of jkube-java-xx. I tested the hawtio-online-example-camel-springboot images locally and it seems to "work". But I need assistance with how it interact hawtio test suite before merging as there always seem to be an timeout issue with the test suite regarding the modified springboot image.

@tadayosi
Copy link
Member

tadayosi commented Oct 3, 2024

@dale-fu Looks great now. Unfortunately, it's diverging from main again. Could you rebase it with main and resolve conflicts?

@dale-fu
Copy link
Contributor Author

dale-fu commented Oct 3, 2024

@dale-fu Looks great now. Unfortunately, it's diverging from main again. Could you rebase it with main and resolve conflicts?

Rebased and resolved the conflicts, but I will still need assistance with testing the modified springboot image going forward.

Copy link
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks great to me.

@tadayosi
Copy link
Member

tadayosi commented Oct 4, 2024

@dale-fu

I will still need assistance with testing the modified springboot image going forward.

What should we assist you on this?

@mmuzikar @phantomjinx You might want to review this (again) before merging.

@dale-fu
Copy link
Contributor Author

dale-fu commented Oct 9, 2024

@dale-fu

I will still need assistance with testing the modified springboot image going forward.

What should we assist you on this?

@mmuzikar @phantomjinx You might want to review this (again) before merging.

@tadayosi I think the major difference between the jkube-java-xx and Red Hat's openjdk-xx image is probably the missing jolokia agent in the Red Hat images. I would probably need assistance on getting that set up with the modified Spring Boot example image. This could be one of the reason why this image is not working correctly with the OpenShift test suite.

@tadayosi tadayosi requested a review from phantomjinx October 10, 2024 04:07
@tadayosi
Copy link
Member

If I'm not mistaken, I think @phantomjinx also developed a Spring Boot example for OpenShift. @phantomjinx Do you have an OpenShift example?

@phantomjinx
Copy link
Member

If I'm not mistaken, I think @phantomjinx also developed a Spring Boot example for OpenShift. @phantomjinx Do you have an OpenShift example?

I have submitted a camel-quarkus example that uses maven and the quarkus OpenShift deployment extension - here.

I also have created a camel-helloworld example for Springboot, which is directed towards submitting to OpenShift.

Do they help?

@dale-fu
Copy link
Contributor Author

dale-fu commented Oct 11, 2024

If I'm not mistaken, I think @phantomjinx also developed a Spring Boot example for OpenShift. @phantomjinx Do you have an OpenShift example?

I have submitted a camel-quarkus example that uses maven and the quarkus OpenShift deployment extension - here.

I also have created a camel-helloworld example for Springboot, which is directed towards submitting to OpenShift.

Do they help?

I think I'm mostly focusing on multi-arching the hawtio-online-example-camel-springboot as this PR already has the hawtio-online-example-camel-quarkus multi-arched. For this, we need to change the default base image that the spring boot image is using from jkube-java-xx to ubi9/openjdk-xx which is done in this PR. But with this change though, we need to manually set up the jolokia agent similar to how it was done with the quarkus image, this is where I'm stuck for now.

@dale-fu dale-fu changed the title [DRAFT] Add multi-arch builds for hawtio-online-example images Add multi-arch builds for hawtio-online-example images Oct 31, 2024
@dale-fu
Copy link
Contributor Author

dale-fu commented Oct 31, 2024

I have made changed to the SpringBoot image to use the Red Hat OpenJDK base images that is multi-arch and added the jolokia agent into the container.

Copy link
Member

@tadayosi tadayosi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good to me now. Let's merge it.

@tadayosi tadayosi merged commit bb8b4a0 into hawtio:main Nov 1, 2024
2 checks passed
@dale-fu dale-fu deleted the multiarch-build branch November 1, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Container images don't seem to be deployable to cluster on arm64 architecture
4 participants