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 Java11 support to Google App Engine Generator #10196

Closed
1 task done
SudharakaP opened this issue Aug 8, 2019 · 11 comments · Fixed by #10284
Closed
1 task done

Add Java11 support to Google App Engine Generator #10196

SudharakaP opened this issue Aug 8, 2019 · 11 comments · Fixed by #10284
Labels
area: enhancement 🔧 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: GCP $100 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@SudharakaP
Copy link
Member

SudharakaP commented Aug 8, 2019

Overview of the feature request

Currently the GAE generator can generate deployment files for java 8 (https://cloud.google.com/appengine/docs/standard/java/runtime). However starting recently GAE supports java 11 (https://cloud.google.com/appengine/docs/standard/java/runtime). I suggest we develop a branch of our GAE generator to support java 11. My idea is to initially give the user a choice of choosing between java 8 and 11 and generate the files based on the choice.

On another note it is possible to run our jhipster project on java 11 on GAE standard as I've done on >>this<< project. The only things we need is to remove the appengine-web.xml and add a app.yml. Complete migration summary is given here; https://cloud.google.com/appengine/docs/standard/java11/java-differences

If this is something useful, I can help with doing the PR for this. Do we need to fix the current GAE generator before attempting this?

Motivation for or Use Case

jhipster supports java 11 and recently we migrated the Travis build process to java 11 as well (#10175), it seems obvious that we need to add support for java 11 GAE generators at some point.

Related issues or PR

#10175, #9605

  • Checking this box is mandatory (this is just to show you read everything)
@pascalgrimaud
Copy link
Member

Do we need to fix the current GAE generator before attempting this?

I think we should.

About maintaining Java8, I wonder if we should. I'd prefer to focus on Java11 but it's just my opinion

@PierreBesson
Copy link
Contributor

Let's drop support for java 8, especially because it requires to package the app as war. We would be really pleased to receive a PR from you for this !

@SudharakaP
Copy link
Member Author

SudharakaP commented Aug 11, 2019

@PierreBesson @pascalgrimaud : I've created a quick fix for the GAE Java 8 generator (#10210). I also have a branch in my fork for GAE Java 11 as well (https://github.com/SudharakaP/generator-jhipster/tree/java11-gae-upgrade). I can merge this one which will drop support for GAE Java 8.

I was thinking to make some further improvements on this branch (for Java 11) to enhance the GAE generator. For example currently the GAE generator seems to force the user to create a Cloud SQL instance. This in my opinion should be given as a choice to the user. What do you think?

@pascalgrimaud
Copy link
Member

@SudharakaP : I'm not a GCP expert. If the user doesn't create the Cloud SQL, what is the alternative ? Will it still work out of the box ?

@SudharakaP
Copy link
Member Author

SudharakaP commented Aug 12, 2019

@pascalgrimaud : Yes, for example the user can connect to any other external database. For example one can host the db on Google Compute Engine instance (if he/she loves hosting it in Google infrastructure) or he can host it in any other cloud service provider. Cloud SQL only supports MySQL and PostgreSQL (https://cloud.google.com/sql/docs/) type databases. So if a user wants any other type of database they cannot use Cloud SQL.

We have a project where we use GAE with Mongo Atlas. There's no reason to create Cloud SQL instances when you do the deployment.

@pascalgrimaud
Copy link
Member

Good to know. Thanks for the explanation @SudharakaP
So yes, let's add 1 more question about Cloud SQL in the sub generator GAE, with default to yes, as what we currently have

@SudharakaP
Copy link
Member Author

SudharakaP commented Aug 12, 2019

@pascalgrimaud : Wonderful. Let me work on that. Probably this week, I'll do another pull request with the upgrade to Java 11. Just to be clear this will remove support for Java 8, which means that once this is merged the generator will create the configs as per Java 11 specification.

Or do we need to give a choice for the user to choose between Java 11 and Java 8?

@SudharakaP
Copy link
Member Author

@pascalgrimaud @PierreBesson : I've created a pull request for this as well (#10216). If you guys have any questions or issues feel free to let me know 😄

@PierreBesson
Copy link
Contributor

@pascalgrimaud I think this issue should have a bug bounty to reward @SudharakaP's hard work.

PierreBesson pushed a commit that referenced this issue Sep 1, 2019
* Explicitly use Java11 in travis deployment

* Convert the existing appengine-web.xml.ejs to app.yaml.ejs for gae java11 support

* Remove unnecessary logging file as per; https://cloud.google.com/appengine/docs/standard/java11/java-differences#logging

* Modify gradle bootWar task to exclude appengine-web.xml file

* Remove web.xml as java11 in gae runs as a jar file not on jetty

* Fix issues with the GAE generator (Java 8)

Fix #9605

* Add support to give the user a choice in choosing Cloud SQL

#10196

* Change the app engine values to reflect the second generation runtimes; https://cloud.google.com/appengine/docs/standard/#instance_classes

#10196

* Fix minor bug where I didn't record whether Cloud SQL instance is needed

#10196

* Fix minor bug where I didn't record whether Cloud SQL instance is needed

#10196

* Fix some bugs and add support for choosing Cloud SQL

#10196

* Revert the change to install openjdk through install-jdk scripts as per review

* Update google cloud plugins

#10216

* Update google cloud plugins; mistake with versions

#10216

* changes related to the code review
@pascalgrimaud pascalgrimaud added this to the 6.3.0 milestone Sep 10, 2019
@pascalgrimaud
Copy link
Member

@PierreBesson : agree with you

@SudharakaP : just added the bounty, can you claim it ?

@pascalgrimaud pascalgrimaud added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $100 https://www.jhipster.tech/bug-bounties/ labels Sep 14, 2019
@SudharakaP
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: enhancement 🔧 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ theme: GCP $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants