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

Use Oracle GraalVM as a JVM #431

Open
dmikusa opened this issue Dec 6, 2023 · 6 comments
Open

Use Oracle GraalVM as a JVM #431

dmikusa opened this issue Dec 6, 2023 · 6 comments
Labels
type:enhancement A general enhancement

Comments

@dmikusa
Copy link
Contributor

dmikusa commented Dec 6, 2023

Describe the Enhancement

Presently, the choice to use Oracle GraalVM is only supported when building native images. It should be usable as a JVM too.

Possible Solution

TBD

Motivation

Folks want to use Oracle GraalVM as a JVM too because it's fast and great. We want to support this use case also.

@dmikusa dmikusa added the type:enhancement A general enhancement label Dec 6, 2023
@schrepfler
Copy link

Hi @dmikusa, I noticed all 5 tasks that would enable this ticket have been ticked and change has been merged, does this mean ticket can be closed or it means the work on it can begin?

@dmikusa
Copy link
Contributor Author

dmikusa commented Oct 11, 2024

paketo-buildpacks/oracle#144 is for adding Oracle GraalVM to do native image builds. This story is to add Oracle GraalVM to use it as a JVM. This still needs work because there is a conflict between Oracle JDK and Oracle GraalVM. We need a way in the buildpack to pick between them.

@schrepfler
Copy link

Understand, looking forward to this. We're users of Oracle Cloud so would like to take advantage of free GraalVM usage in prod however we're building our apps strictly with build packs via maven spring boot plugin so this is a major blocker for us even though we can take advantage of its characteristics for Scala and Kotlin.

@dmikusa
Copy link
Contributor Author

dmikusa commented Oct 14, 2024

I hear you, sorry. This one is a little tricky as we don't have a way to expose it at the moment. I reached out to the other @paketo-buildpacks/java-maintainers to get their thoughts on some possible ways to implement this. I'll follow up when we've had a chance to discuss and we can go from there.

@schrepfler
Copy link

Sure thing, no worries 🤞 ! If you need some user perspective, consider this would likely help GraalVM's adoption as using the spring boot maven plugin to build the docker images is probably the main way how people build spring boot production images so it can be quite an enabler towards it's adoption.

@dmikusa
Copy link
Contributor Author

dmikusa commented Oct 16, 2024

Ok, so what we discussed is doing this.

We have an env variable BP_JVM_TYPE which can be JRE or JDK, so we will extend that to include an option GRAALVM as another type. Selecting that new option would mean the buildpack fetches the GraalVM binary, installs it, and uses that as a JDK.

For Oracle CNB, that is obvious. It’ll grab Oracle GraalVM instead of Oracle free JDK. For Bellsoft CNB, it would do the same thing with their NIK distribution. For GraalVM CNB, it would as well, but that buildpack already uses GraalVM as the JDK so it would basically be an alias to JDK for that buildpack.

This needs implemented in libjvm, so I'm going to move this issue over there.

@dmikusa dmikusa transferred this issue from paketo-buildpacks/oracle Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants