Skip to content

Multi platform build and standalone native executable enhancement #5539

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

Closed
wants to merge 16 commits into from

Conversation

francescotimperi
Copy link
Contributor

Description

I am a contributor of the Apache OpenServerless (incubating) project and we aim to provide multiplatofrm Openwhisk 2 images and native executable for the standalone component. This PR contributes the few tweaks we had to do inside the OpenWhisk codebase for being able to successfully use the native-image CLI from our build projects.

The changes are not modifying any components, just providing some changes into the building config and Dockerfile.

Related issue and scope

  • I opened an issue to propose and discuss this change (#????)

My changes affect the following components

  • API
  • Controller
  • Message Bus (e.g., Kafka)
  • Loadbalancer
  • Scheduler
  • Invoker
  • Intrinsic actions (e.g., sequences, conductors)
  • Data stores (e.g., CouchDB)
  • Tests
  • [ X] Deployment
  • CLI
  • [ X] General tooling
  • Documentation

Types of changes

  • Bug fix (generally a non-breaking change which closes an issue).
  • [ X] Enhancement or new feature (adds new functionality).
  • Breaking change (a bug fix or enhancement which changes existing behavior).

Checklist:

  • [ X] I signed an Apache CLA.
  • [ X] I reviewed the style guides and followed the recommendations (Travis CI will check :).
  • I added tests to cover my changes.
  • My changes require further changes to the documentation.
  • I updated the documentation where necessary.

@@ -15,7 +15,7 @@
# limitations under the License.
#
# if you change version of openjsk, also update tools/github/setup.sh to download the corresponding jdk
FROM adoptopenjdk/openjdk11-openj9:x86_64-alpine-jdk-11.0.12_7_openj9-0.27.0
Copy link
Member

Choose a reason for hiding this comment

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

Please use an image from eclipse-temurin instead.

Perhaps one of these would work?
https://hub.docker.com/_/eclipse-temurin/tags?name=11

Copy link
Contributor Author

Choose a reason for hiding this comment

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

from the available list I believe that this could be a good one eclipse-temurin:23.0.1_11-jre-alpine, as it is a multiplatform image and based on alpine linux therefore the rest of the Dockerfile should continue working. I will give a try.

I would like to ask why the current official OpenWhisk images are not miultiplatform (if I checked the good ones) and your opinion about the possibility to generate native executable, at least for the standalone.

As Apache OpenServerless project we are interested in contributing the required changes to have everything generated from the official repo, at least for the multiplatform images.

Copy link
Member

Choose a reason for hiding this comment

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

from the available list I believe that this could be a good one eclipse-temurin:23.0.1_11-jre-alpine, as it is a multiplatform image and based on alpine linux therefore the rest of the Dockerfile should continue working. I will give a try.

Great, thanks!

I would like to ask why the current official OpenWhisk images are not miultiplatform (if I checked the good ones) and your opinion about the possibility to generate native executable, at least for the standalone.

Legacy... most of our Dockerfile infrastructure predates multiplatform images being widely used.

As Apache OpenServerless project we are interested in contributing the required changes to have everything generated from the official repo, at least for the multiplatform images.

Sounds good.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dgrove-oss I finally used this multi arch base image for the common/scala project

FROM eclipse-temurin:21-jre-alpine-3.21

I added to the PR these improvements/changes:

  • I update the various gradle files to remove multiple deprecations warnings.
  • I have also updated the deprecated maven plugin to the maven-publish one.
  • I added a dockerMultiArchBuild boolean flag to create multi arch images (without the need of using the Dockerfile.arm file)
  • I modified the tools/jenkins/apache build script to make use of the -P dockerMultiArchBuild=true flag

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for doing this. Sorry for the slow response. I will make time to take a look this week.

@francescotimperi francescotimperi marked this pull request as draft May 15, 2025 17:26
@francescotimperi francescotimperi marked this pull request as ready for review May 20, 2025 16:42
@francescotimperi
Copy link
Contributor Author

@dgrove-oss I going to close this PR to create a new one supporting JDK 17 builds

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.

2 participants