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

Quarkus native support #108

Open
cmasonrh opened this issue Jan 16, 2023 · 3 comments
Open

Quarkus native support #108

cmasonrh opened this issue Jan 16, 2023 · 3 comments

Comments

@cmasonrh
Copy link

We have a client that is interested in performing Quarkus native builds for running in OpenShift since that is now a supported RedHat configuration(https://access.redhat.com/documentation/en-us/red_hat_build_of_quarkus/rhbq-documentation-2-13/guide/0f24d6b4-7032-4601-99cb-fbdefec89f6d). However it does not appear that the ploigos-tool-maven images (even the jdk17 ones) support native builds as we get the following error

​[error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Cannot find the native-image in the GRAALVM_HOME, JAVA_HOME and System PATH. Install it using gu install native-image

Is there any plans to add support for Quarkus native builds to Ploigos? Would you welcome changes to the tool-maven images to add said support?

@GregJohnStewart
Copy link

https://quarkus.io/guides/building-native-image

If podman/docker is available, should be trivial to support as it can pull/start a preconfigured native build environment with that.

Otherwise/ either way, might want a separate pipeline flow for Native to ensure the right env setup happens, commands, etc but probably wouldn't be hard?

It has also been a while since I touched Ploigos, and only then for a short time, but I know the Quarkus Native side :)

@cmasonrh
Copy link
Author

I wanted to get feedback on the approach I was currently taking with Quarkus native builds. ie does it seem like a feasible approach? Will the image build be acceptable even though it diverges from the standard and in some cases would duplicate steps?

Approach

The supported way of building Quarkus native images is to build them inside of a container that contains the JDK and well as Mandrel. However since we would be running the native build inside of a Ploigos container this would require a container within a container approach doesn't seem like a workable solution.

The Mandrel images that are used for those native build however seem to install the JDK source and Mandrel from an unknown location. Scripts in the DockerFile seem to setup the packages, however they are unavailable from the standard UBI8 repos or any other repo I can find. They are available via ftp though it seems.

The propose approach, instead of using the ploigos-tool-maven image as a base image for the Quarkus native build, would create a Ploigos too image from Mandrel image. Then the packages required by Ploigos (as per ploigos-base) and those for Maven (as per ploigos-tool-maven) would be installed on top Mandrel image. The JDK packages normally added before Maven will be left out since the JDK is present in the Mandrel image.

I'm trying to maintain a supportable with this solution but it does seem to go counter to the way Ploigos is currently maintaining images.

@cmasonrh
Copy link
Author

Due to lack of time I'll be stepping away from working on this if someone else want's to pick it up.

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

No branches or pull requests

2 participants