-
Notifications
You must be signed in to change notification settings - Fork 116
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 Quarkus devfile #144
Add Quarkus devfile #144
Conversation
devfiles/quarkus/devfile.yaml
Outdated
- | ||
type: dockerimage | ||
alias: maven | ||
image: quay.io/eclipse/che-java8-maven:nightly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should include the ability to run the native compilation to this devfile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please clarify why do we need that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With Quarkus, you have a way to produce a tiny native executable https://quarkus.io/guides/building-native-image
for instance:
https://github.com/sunix/che-quarkus-demo/blob/8f4f4fa8e09158853e9cd900c0fe93cac18da484/devfile.yaml#L109-L121
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like GraalVM Native Image generation requires at least 2Gi RAM to perform a native image build. So, if we give this value + 1,5Gi for Quarkus VS Code plugin (Java LS, Quarkus LS, Java Debugger) container, it'd be more than 3Gi - it is too much for che.openshift.io
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To me we have to produce a devfile for che. Not che.openshift.io.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
upstream devfile registry is used on Hosted Che, so all the devfiles in the registry must be compatible with Hosted Che. Otherwise, we need to come up with Hosted Che specific devfile registry (smth. that should be avoided)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like GraalVM Native Image generation requires at least 2Gi RAM to perform a native image build. So, if we give this value + 1,5Gi for Quarkus VS Code plugin (Java LS, Quarkus LS, Java Debugger) container, it'd be more than 3Gi - it is too much for che.openshift.io
Could you give a try in a single container with vscode ext for java/quarkus and mvn/graalvm/jdk8 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will it be compatible with Hosted Che (3GB ram)?
|
@ibuziuk except building a native executable, it should |
Not including native executable compilation would show only 1/3 of the value of Che for quarkus developers. IMHO |
It is possible to execute native compilation but it'll be failed with OOM on hosted Che, that's why I didn't add commands into devfile. If the user will have more OOM for Che it could add such commands into the workspace or just execute them in the dev terminal |
If the goal of hosted Che is to show the value of Che to potential/possible users, for a Quarkus devfile, we need to have Quarkus + native compilation. If we don't have that, there is no value compared to a VSCode or another IDE. We need to reconsider the 3Go limitation and give 4 or 5Gigs at least if we cannot optimize it. |
isn't it smth you have already raised on the planning? This is a PM decision, so, for now, all the devfiles should be compatible with the 3Gb RAM limits available on Hosted Che - https://www.eclipse.org/che/docs/che-7/hosted-che/#terms-of-service_hosted-che |
Signed-off-by: svor <vsvydenk@redhat.com>
IMO native compilation is a deploy step most of the time (with the caveat there are some minor incompatibilities). If I was developing a quarkus app, I my flow would be something like
Native compilation in the workspace is a "nice to have" but not essential, since generally native compilation is something you would do once, at the end of preparing a PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a few suggestions.
Signed-off-by: svor <vsvydenk@redhat.com>
Yes this is nice to have but essential to show the value of Che: this is what is hard to have if you are working on a Quarkus app on a traditional Desktop environment. The current devfile is easy to setup with VSCode + quarkus ext... so what is the point to use Che ? |
Signed-off-by: svor <vsvydenk@redhat.com>
Looks like all of Angel's concerns have been addressed; which only leaves @ibuziuk 's question of 3G vs. 4-5G as the required memory footprint. Meanwhile upstream the quarkus jdk8 plugin PR is approved: eclipse-che/che-plugin-registry#291 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Personally, I'm against adding native compilation as a default, since adding 2Gi
to the runtime memory requirements for this workspace is too high a cost for something that generally won't be executed often. I would like to see native compilation added when Che supports something like a short-lived builder container, so that just running the workspace doesn't take 2Gi
of quota that is unused 90% of the time.
Folks, we should not make merging this PR dependent on the native compilation commands. In the short run, we cannot increase memory on hosted Che. In the short run, we cannot run a separate devfile registry for hosted che.
@slemeur make a decision, please. |
My $0.02 based on existing CRW 2.1 requirements (eg., https://issues.redhat.com/browse/CRW-586 and https://issues.redhat.com/browse/CRW-329 ) ... #3 isn't an option - Quarkus support is required for CRW 2.1, and being able to dogfood it in some way in Che 7.7 and in Hosted Che is IMHO a valuable way to ensure it's working downstream too. #2 seems like the best approach - failing gracefully is an important part of UX when running on disparate clusters. Error message on failure should include detailed call to action so workspace user knows they need to ask for more RAM from their cluster administrator. I would further tell the user that if they don't have access to their administrator, this functionality won't be available (eg., if they need 5G in Hosted Che, they're going to have a bad time.) |
I would go ahead and merge this PR as is. We can add native compile commands in the next sprint. |
+1 on the approach |
* Add quarkus devfile Signed-off-by: svor <vsvydenk@redhat.com>
* Added definitions for gwt ide versions since 6.19.0 6.19.0 7.0.0-beta-1.0 7.0.0-beta-2.0 7.0.0-beta-3.0 7.0.0-beta-4.0 next
Signed-off-by: svor vsvydenk@redhat.com
What does this PR do?
Adds a devfile to support Qurakus tools.
This devfile includes
2 components:
quay.io/quarkus/centos-quarkus-maven:19.2.1
which contains Java 8, Maven 3.6.0 and GraalVM 19.2.12 commands:
The application could be debugged by predefined debug configuration in case
mvn compile quarkus:dev
was executed before.This devfile doesn't include commands to run native compilation because it requires more than 3GB RAM for workspace in total and it's not available on Hosted Che.
What issues does this PR fix or reference?
eclipse-che/che#14506