jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.56k stars 4.02k forks source link

Jhipster gae gives errors with a clean jhipster project #10749

Closed Tonterias closed 4 years ago

Tonterias commented 5 years ago
Overview of the issue

I create a clean project in Jhipster and Google Cloud Platform. Then, I run jhipster gae and I get errors that I think I should not get. May be it is my fault, but I do not see how. It may be a problem with permissions, but it does not find the project on GCP either. If I have to do something before I start, i have no clue. If it is my fault, please let me know where is the documentation that explains how-to do it. Thanks

Motivation for or Use Case

I'm using a clean project

Reproduce the error

I sucessfully create a new project at GCP with no problems:

C:\Users\USUARIO\AppData\Local\Google\Cloud SDK>gcloud projects create jhipstergae-321 --set-as-default
Create in progress for [https://cloudresourcemanager.googleapis.com/v1/projects/jhipstergae-321].
Waiting for [operations/cp.5152513577397205577] to finish...done.
Enabling service [cloudapis.googleapis.com] on project [jhipstergae-321]...
Operation "operations/acf.f223305a-f054-42af-8a58-def023b715e5" finished successfully.
Updated property [core/project] to [jhipstergae-321].
C:\Users\USUARIO\AppData\Local\Google\Cloud SDK>gcloud projects describe jhipstergae-321
createTime: '2019-11-08T09:35:11.085Z'
lifecycleState: ACTIVE
name: jhipstergae-321
projectId: jhipstergae-321
projectNumber: '61641827385'

Then, I tried to run jhipster gae within a new created project (testgae):

D:\JHipster\testgae>jhipster gae
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:gae
INFO! Options: from-cli: true
Welcome to Google App Engine Generator
? Google Cloud Project ID jhipstergae-321ERROR: (gcloud.projects.describe) User [XXXXX@gmail.com] does not have permission to access project [jhipstergae-321] (or it may not exist): The caller does not have permission
? Google Cloud Project ID jhipstergae-321
? In which Google App Engine location do you want to deploy ? europe-west3 - Frankfurt
ERROR: (gcloud.app.services.describe) NOT_FOUND: Could not find Application "jhipstergae-321".
? Google App Engine Service Name default
? Google App Engine Instance Class F4 - 2.4GHz, 1GB, Automatic Scaling
Instance Class "F4" can only be automatically scaled. Setting scaling type to automatic.
? How many instances minimum ? 1
? How many instances max (0 for unlimited) ? 1
? Initialize a new Cloud SQL instance (Y/N) ? Y
Γ— Error: Command failed: gcloud sql instances list  --format='value[separator=":"](project,region,name)' --project="jhipstergae-321"
ERROR: (gcloud.sql.instances.list) Name expected [:(settings.userLabels:alias=labels:label=LABELS) table(name,databaseVersion,firstof(gceZone,region):label=LOCATION,settings.tier,ip_addresses.filter("type:PRIMARY").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIMARY_ADDRESS,ip_addresses.filter("type:PRIVATE").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIVATE_ADDRESS,state:label=STATUS) *HERE* 'value[separator=:](project,region,name)'].

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: `gcloud sql instances list  --format='value[separator=":"](project,region,name)' --project="jhipstergae-321"`
}
? Google Cloud SQL Instance Name New Cloud SQL Instance
? Google Cloud SQL Instance Name testgae
? Google Cloud SQL User Name root
? Google Cloud SQL Password [hidden]
? Google Cloud SQL Database Name testgae
Configuring Google App Engine Location "europe-west3"

Creating New Cloud SQL Instance

... Running: gcloud sql instances create "testgae" --region='europe-west3' --project=jhipstergae-321 --database-version="POSTGRES_9_6" --tier="db-g1-small"
Γ— Error: Command failed: gcloud sql instances create "testgae" --region='europe-west3' --project=jhipstergae-321 --database-version="POSTGRES_9_6" --tier="db-g1-small"
ERROR: (gcloud.sql.instances.create) HTTPError 400: Invalid request: Invalid value for region: 'europe-west3'.

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: `gcloud sql instances create "testgae" --region='europe-west3' --project=jhipstergae-321 --database-version="POSTGRES_9_6" --tier="db-g1-small"`
}
ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.
child_process.js:660
    throw err;
    ^

Error: Command failed: gcloud sql instances describe testgae --format="value(connectionName)" --project="jhipstergae-321"
ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.

    at checkExecSyncError (child_process.js:621:11)
    at execSync (child_process.js:657:15)
    at D:\JHipster\testgae\node_modules\generator-jhipster\generators\gae\index.js:609:52
    at ChildProcess.exithandler (child_process.js:302:5)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  status: 1,
  signal: null,
  output: [
    null,
    '',
    'ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.\r\n'
  ],
  pid: 8264,
  stdout: '',
  stderr: 'ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.\r\n'
}

D:\JHipster\testgae>

None

Nope

V6.4.1

Entity configuration(s) entityName.json files generated in the .jhipster directory

No entities

Browsers and Operating System
SudharakaP commented 5 years ago

@Tonterias : Currently I am working on the GAE subgenerator on a couple of different issues; I'll try to recreate this and will get back soon πŸ˜„

Tonterias commented 5 years ago

Please, @SudharakaP if you succeed in pushing a clean project (no entities) to GCP, I will be more than glad to help you document all the steps (make a post, a video or anything you want) because I'm really having a hard time trying to do it (and I guess I'm not alone). There is no documentation or video that shows how-to. Jon Ruddell, who always saves my day, does not feel confortable in this deployments.

I have been trying to deploy the new version of our open source project (https://www.spingular.com github: https://github.com/Tonterias/spingular640 dockerhub: https://hub.docker.com/r/galore/spingular) in GCP and I can't. jhipster gae and kubernetes are giving me a headache and do not work for me. If I can help you fixing these issues, please let me know.

SudharakaP commented 5 years ago

@Tonterias : Looking at your stack traces more closely, I believe the reason for the failure is the first error you are getting;

Google Cloud Project ID jhipstergae-321ERROR: (gcloud.projects.describe) User [XXXXX@gmail.com] does not have permission to access project [jhipstergae-321] (or it may not exist): The caller does not have permission

Notice that you have provided the Project ID as jhipstergae-321. Are you sure this is the project ID? Normally project ID has a longer number than 321. You can get the project ID in your GCP Dashboard under the Project Info section.

There are some other bugs and corner cases which I am aware of which you might run into even after correcting this Project ID. I am working on https://github.com/jhipster/generator-jhipster/pull/10420 and once that is merged (hopefully very soon; probably this week I'll be done with that) I think we should have a much better app engine generator :smile:

Tonterias commented 5 years ago

I believe so. That's why I copied the describe in the issue. It would not be the first time I'm wrong. Good bless Jon Ruddell for his patience! ;-D

C:\Users\USUARIO\AppData\Local\Google\Cloud SDK>gcloud projects describe jhipstergae-321 createTime: '2019-11-08T09:35:11.085Z' lifecycleState: ACTIVE name: jhipstergae-321 projectId: jhipstergae-321 projectNumber: '61641827385'

But anyway, if you are aware of other issues, I will let you work. Good luck and let me know when I can try it again.

Please, can you make a video of the whole process working when you fix it?

THANKS

SudharakaP commented 5 years ago

@Tonterias : You are correct; your project ID seems correct and same as name; but this error you are getting seems to be coming from the Cloud SDK not something to do with our generator. Could you execute gcloud projects describe jhipstergae-321 within the project directory (D:\JHipster\testgae) and show me the output ?

Tonterias commented 5 years ago

No problem @SudharakaP

D:\JHipster\spingular>gcloud projects describe jhipstergae-321 createTime: '2019-11-08T09:35:11.085Z' lifecycleState: DELETE_REQUESTED name: jhipstergae-321 projectId: jhipstergae-321 projectNumber: '61641827385'

I did deleted after testing it, but the info still is the same. Anything else

Tonterias commented 5 years ago

I updated to 6.5 and I got the same result:

D:\JHipster\testgae65>gcloud projects describe jhipstergae650
createTime: '2019-11-12T09:52:51.817Z'
lifecycleState: ACTIVE
name: jhipstergae650
projectId: jhipstergae650
projectNumber: '558588454917'
D:\JHipster\testgae65>jhipster gae
INFO! Using JHipster version installed locally in current project's node_modules
INFO! Executing jhipster:gae
INFO! Options: from-cli: true
Welcome to Google App Engine Generator
? Google Cloud Project ID jhipstergae650
? In which Google App Engine location do you want to deploy ? europe-west3 - Frankfurt
ERROR: (gcloud.app.services.describe) NOT_FOUND: Could not find Application "jhipstergae650".
? Google App Engine Service Name default
? Google App Engine Instance Class F1 - 600MHz, 256MB, Automatic Scaling
Instance Class "F1" can only be automatically scaled. Setting scaling type to automatic.
? How many instances minimum ? 1
? How many instances max (0 for unlimited) ? 2
? Initialize a new Cloud SQL instance (Y/N) ? Y
Γ— Error: Command failed: gcloud sql instances list  --format='value[separator=":"](project,region,name)' --project="jhipstergae650"
ERROR: (gcloud.sql.instances.list) Name expected [:(settings.userLabels:alias=labels:label=LABELS) table(name,databaseVersion,firstof(gceZone,region):label=LOCATION,settings.tier,ip_addresses.filter("type:PRIMARY").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIMARY_ADDRESS,ip_addresses.filter("type:PRIVATE").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIVATE_ADDRESS,state:label=STATUS) *HERE* 'value[separator=:](project,region,name)'].

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: `gcloud sql instances list  --format='value[separator=":"](project,region,name)' --project="jhipstergae650"`
}
? Google Cloud SQL Instance Name New Cloud SQL Instance
? Google Cloud SQL Instance Name testgae65
? Google Cloud SQL User Name root
? Google Cloud SQL Password [hidden]
? Google Cloud SQL Database Name testgae65
Configuring Google App Engine Location "europe-west3"

Creating New Cloud SQL Instance

... Running: gcloud sql instances create "testgae65" --region='europe-west3' --project=jhipstergae650 --database-version="POSTGRES_9_6" --tier="db-g1-small"
Γ— Error: Command failed: gcloud sql instances create "testgae65" --region='europe-west3' --project=jhipstergae650 --database-version="POSTGRES_9_6" --tier="db-g1-small"
ERROR: (gcloud.sql.instances.create) HTTPError 400: Invalid request: Invalid value for region: 'europe-west3'.

    at ChildProcess.exithandler (child_process.js:295:12)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  killed: false,
  code: 1,
  signal: null,
  cmd: `gcloud sql instances create "testgae65" --region='europe-west3' --project=jhipstergae650 --database-version="POSTGRES_9_6" --tier="db-g1-small"`
}
ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.
child_process.js:660
    throw err;
    ^

Error: Command failed: gcloud sql instances describe testgae65 --format="value(connectionName)" --project="jhipstergae650"
ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.

    at checkExecSyncError (child_process.js:621:11)
    at execSync (child_process.js:657:15)
    at D:\JHipster\testgae65\node_modules\generator-jhipster\generators\gae\index.js:610:52
    at ChildProcess.exithandler (child_process.js:302:5)
    at ChildProcess.emit (events.js:210:5)
    at maybeClose (internal/child_process.js:1021:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
  status: 1,
  signal: null,
  output: [
    null,
    '',
    'ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.\r\n'
  ],
  pid: 20880,
  stdout: '',
  stderr: 'ERROR: (gcloud.sql.instances.describe) HTTPError 404: The Cloud SQL instance does not exist.\r\n'
}

There is also that little annoynig detail about using Y and not accepting y (that would be cool to fix).

SudharakaP commented 5 years ago

@Tonterias : I need to investigate more on this. I am on the verge of completing #10420 and once it's done I'll get back to this. I couldn't recreate this exactly and it might have to do with the fact I am on a Linux machine, let me try to do this on a Windows machine as well. πŸ˜„

Tonterias commented 5 years ago

Good luck and let me know if I can be of any help (you can remote control mine if you need to).

SudharakaP commented 5 years ago

@Tonterias : Could we try a re-installation of Cloud SDK please? Instructions are given at https://cloud.google.com/sdk/install. Seems like somehow the SDK is unable to get proper project details.

Tonterias commented 5 years ago

I reinstalled the SDK.

Here comes the first part:

D:\JHipster\testgae65>gcloud projects describe spingulargae1 createTime: '2019-11-14T22:19:22.716Z' lifecycleState: ACTIVE name: spingulargae1 projectId: spingulargae1 projectNumber: '402558806209'

Then comes this error: D:\JHipster\testgae65>jhipster gae INFO! Using JHipster version installed locally in current project's node_modules INFO! Executing jhipster:gae INFO! Options: from-cli: true Welcome to Google App Engine Generator

Installing App Engine Java SDK ... Running: gcloud components install app-engine-java --quiet Γ— Error: Command failed: gcloud components install app-engine-java --quiet

ERROR: Cannot use bundled Python installation to update Cloud SDK in non-interactive mode. Please run again in interactive mode.

If you really want to run in non-interactive mode, please run the following command before re-running this one:

FOR /F "delims=" %i in ( '""C:\Users\USUARIO\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud.cmd"" components copy-bundled-python' ) DO ( SET CLOUDSDK_PYTHON=%i )

(Substitute %%i for %i if in a .bat script.)

at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {

killed: false, code: 1, signal: null, cmd: 'gcloud components install app-engine-java --quiet' } ERROR! Installation failed. Please try to install the app-engine-java component manually via; gcloud components install app-engine-java

I followed the instructions and install the components.....

For the latest full release notes, please visit: https://cloud.google.com/sdk/release_notes

Do you want to continue (Y/n)? Y

============================================================

= Creating update staging area =

============================================================

= Installing: Cloud Datastore Emulator =

============================================================

= Installing: gRPC python library =

============================================================

= Installing: gRPC python library =

============================================================

= Installing: gcloud app Java Extensions =

============================================================

= Installing: gcloud app Python Extensions =

============================================================

= Creating backup and activating new installation =

============================================================

Performing post processing steps...done.

Update done!

So I try again with jhipster gae.... but it gave me problems D:\JHipster\testgae65>gcloud components install app-engine-java

Restarting command: $ gcloud components install app-engine-java

D:\JHipster\testgae65>jhipster gae INFO! Using JHipster version installed locally in current project's node_modules INFO! Executing jhipster:gae INFO! Options: from-cli: true Welcome to Google App Engine Generator Your active configuration is: [spingular] ? Google Cloud Project ID spingulargae1 ? In which Google App Engine location do you want to deploy ? us-east4 - Northern Virginia ERROR: (gcloud.app.services.describe) NOT_FOUND: Could not find Application "spingulargae1". ? Google App Engine Service Name default ? Google App Engine Instance Class F2 - 1.2GHz, 512MB, Automatic Scaling Instance Class "F2" can only be automatically scaled. Setting scaling type to automatic. ? How many instances minimum ? 1 ? How many instances max (0 for unlimited) ? 2 ? Initialize a new Cloud SQL instance (Y/N) ? Y Γ— Error: Command failed: gcloud sql instances list --format='valueseparator=":"' --project="spingulargae1" ERROR: (gcloud.sql.instances.list) Name expected [:(settings.userLabels:alias=labels:label=LABELS) table(name,databaseVersion,firstof(gceZone,region):label=LOCATION,settings.tier,ip_addresses.filter("type:PRIMARY").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIMARY_ADDRESS,ip_addresses.filter("type:PRIVATE").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIVATE_ADDRESS,state:label=STATUS) HERE 'valueseparator=:'].

at ChildProcess.exithandler (child_process.js:295:12)
at ChildProcess.emit (events.js:210:5)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {

killed: false, code: 1, signal: null, cmd: gcloud sql instances list --format='value[separator=":"](project,region,name)' --project="spingulargae1" } ? Google Cloud SQL Instance Name New Cloud SQL Instance ? Google Cloud SQL Instance Name testgae65 ? Google Cloud SQL User Name root ? Google Cloud SQL Password [hidden] ? Google Cloud SQL Database Name testgae65 Configuring Google App Engine Location "us-east4"

Creating New Cloud SQL Instance

... Running: gcloud sql instances create "testgae65" --region='us-east4' --project=spingulargae1 --database-version="POSTGRES_9_6" --tier="db-g1-small"

... and got stuck at this point (same result with another account)

SudharakaP commented 5 years ago

@Tonterias : Thanks; I am going to try to see if I can recreate this on a Windows machine; will get back to you in the next couple of days; I have to set up the machine; it's been a while I used it. :smile:

Tonterias commented 5 years ago

As I told you, you can remote mine if you need to

SudharakaP commented 5 years ago

@Tonterias : Thanks much. Let me first try it out in my machine and then if that doesn't work; we'll see about doing that. πŸ˜„

SudharakaP commented 5 years ago

I've managed to recreate the issue and I believe this is caused by the child_process.execSync calls. I have created a PR migrating to the more portable shelljs which we already use in some other places. I believe this should fix the issue. :smile:

SudharakaP commented 4 years ago

@Tonterias : Unfortunately sometimes we might have some dependencies when it comes to Windows especially related to the App Engine generator. Since I always use a Linux machine for development and we don't currently have test coverage for this part. Please feel free to let us know if you see any further issues. πŸ€” πŸ˜„

Tonterias commented 4 years ago

@SudharakaP Hi, I updated to v651 and the sdk too. I'm getting the same mistake again

I:\jhipster\testgae651>gcloud projects create testgae651 --set-as-default Create in progress for [https://cloudresourcemanager.googleapis.com/v1/projects/testgae651]. Waiting for [operations/cp.7481270106464626629] to finish...done. Enabling service [cloudapis.googleapis.com] on project [testgae651]... Operation "operations/acf.2ac42239-166a-4d86-8f1e-42e0e51368c8" finished successfully. Updated property [core/project] to [testgae651].

I:\jhipster\testgae651>gcloud projects describe testgae651 createTime: '2019-11-25T19:15:22.862Z' lifecycleState: ACTIVE name: testgae651 projectId: testgae651 projectNumber: '570298471971'

I:\jhipster\testgae651>jhipster gae INFO! Using JHipster version installed locally in current project's node_modules INFO! Executing jhipster:gae INFO! Options: from-cli: true Welcome to Google App Engine Generator ? Google Cloud Project ID testgae651 ? In which Google App Engine location do you want to deploy ? us-east1 - South Carolina ? Google App Engine Service Name default ? Google App Engine Instance Class F2 - 1.2GHz, 512MB, Automatic Scaling Instance Class "F2" can only be automatically scaled. Setting scaling type to automatic. ? How many instances minimum ? 1 ? How many instances max (0 for unlimited) ? 0 ? Initialize a new Cloud SQL instance (Y/N) ? Y Γ— ERROR: (gcloud.sql.instances.list) Name expected [:(settings.userLabels:alias=labels:label=LABELS) table(name,databaseVersion,firstof(gceZone,region):label=LOCATION,settings.tier,ip_addresses.filter("type:PRIMARY").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIMARY_ADDRESS,ip_addresses.filter("type:PRIVATE").map(1).extract(ip_address).flatten().yesno(no="-"):label=PRIVATE_ADDRESS,state:label=STATUS) HERE 'valueseparator=:'].

? Google Cloud SQL Instance Name (Use arrow keys)

New Cloud SQL Instance ........................................................

Do you want me to open a new issue? Does it work for you in your windows machine. Thanks

pascalgrimaud commented 4 years ago

@Tonterias : can I suggest you to try jhipster-devbox as it looks come from Windows environment

SudharakaP commented 4 years ago

@Tonterias : Thanks for the update. It seems that your previous error ERROR: (gcloud.app.services.describe) NOT_FOUND: is gone now; which is good. :+1: Now for the new error you have, please try Pascal's suggestion and let us know if you still see it. I'll try to recreate that as well on my end when I have some time :smile:

Tonterias commented 4 years ago

Thanks @pascalgrimaud @SudharakaP

I have never used that. I can try, but let me ask a few candid question to both of you before I start:

a) Does jhipster gae work on your Linux machines with a clean project? b) Have you make it work on your windows machines?

What do you think? I'm willing to help, don't forget that, I just want to make sense of what I'm trying to achieve here! ;-) Thanks to both of you

pascalgrimaud commented 4 years ago

I'm sorry but :

So I won't be able to test and help. I was suggesting that, just to help you, because the sub generators was mainly coded and tested with MacOS and Linux

Tonterias commented 4 years ago

Thanks @pascalgrimaud

Then, the question is: do you want to try a GCP account because I have an account at Google for spingular@gmail.com that has $300 and will expire on may. I have been waiting since May for this to work and it is going to expire..... Do you want me to give you access to that account so we can test it, thogether?

If it works on your Linux with the GCP account, then we can then we can try it on my Windows and I can also give you access to my machine (TeamViewer) and help you with it, but my lack of knowledge is a minus if I try it alone.

If you want to be sure about Linux and offer this to windows user as well, I do not see other way to do it (may be you do).

Whatever it helps, but I do not trust myself to do this alone!

SudharakaP commented 4 years ago

Thanks @pascalgrimaud @SudharakaP

I have never used that. I can try, but let me ask a few candid question to both of you before I start:

a) Does jhipster gae work on your Linux machines with a clean project? b) Have you make it work on your windows machines?

a) Yes I have, especially when I was working on, https://github.com/jhipster/generator-jhipster/pull/10420. If you could wait until this is merged I am sure things might improve a lot, since we've upgraded the GCP plugins as well.

b) I found the original issue you had; ERROR: (gcloud.app.services.describe) NOT_FOUND: using a Windows machine. But didn't deploy using that. I will see if I could recreate your second issue this evening.

Tonterias commented 4 years ago

Sure, I can wait one day (even months ;-). Please, let me know and if you take a few screenshots while you do it, it will be great. Good luck and take your time, @Sudharaka Thanks

SudharakaP commented 4 years ago

@Tonterias : I've checked and my guess is that the error you are running into will not be there in #10420. I've also made a few more commits for some corner cases I just identified. Below is an output of a successful run with changes from #10420. So I suggest waiting until the PR is merged; or cloning the generator and using the changes from that PR.

sudharaka@sudharaka-XPS-8700:~/IdeaProjects/GeneratedApplications/JHipsterGAE$ jhipster gae
INFO! Using JHipster version installed globally
INFO! Executing jhipster:gae
INFO! Options: from-cli: true
Welcome to Google App Engine Generator
? Google Cloud Project ID jhipstergaetesting
This project already has an App Engine location set, using location "us-central"
? Google App Engine Service Name default
? Google App Engine Instance Class F2 - 1.2GHz, 512MB, Automatic Scaling
Instance Class "F2" can only be automatically scaled. Setting scaling type to automatic.
? How many instances minimum ? 1
? How many instances max (0 for unlimited) ? 2
? Initialize a new Cloud SQL instance (Y/N) ? Y
? Google Cloud SQL Instance Name New Cloud SQL Instance
? Google Cloud SQL Instance Name jhipstergaetesters
? Google Cloud SQL User Name root
? Google Cloud SQL Password [hidden]
? Google Cloud SQL Database Name jhipstergaetesters

Creating New Cloud SQL Instance

... Running: gcloud sql instances create "jhipstergaetesters" --region='us-central' --project=jhipstergaetesting

Configuring Cloud SQL Login
... Running: gcloud sql users create "root" -i "jhipstergaetesters" --host="%" --password="jhipster" --project="jhipstergaetesting"

Creating Database jhipstergaetesters
... Running: gcloud sql databases create "jhipstergaetesters" --charset=utf8 -i "jhipstergaetesters" --project="jhipstergaetesting"

Creating Google App Engine deployment files
identical src/main/appengine/app.yaml
identical gradle/gae.gradle
identical build.gradle
   create src/main/resources/config/application-prod-gae.yml

Run App Engine DevServer Locally: ./gradlew appengineRun
Deploy to App Engine: ./gradlew thinResolve -Pgae -Pprod-gae && ./gradlew appengineDeploy -Pgae -Pprod-gae
INFO! Congratulations, JHipster execution is complete!
sudharaka@sudharaka-XPS-8700:~/IdeaProjects/GeneratedApplications/JHipsterGAE$ 
Tonterias commented 4 years ago

My mouth is watering when I see the whole thing working :-D Good job @SudharakaP I will wait for the next version and get back you then. Thanks

SudharakaP commented 4 years ago

@Tonterias : Yes, it does; without the PR I think there might be some issues around the Cloud SQL thing which we haven't tested very much. But I did a lot of testing of this Cloud SQL while doing the PR so I think it should have better support creating the databases. πŸ˜„

SudharakaP commented 4 years ago

@Tonterias : FYI, #10420 is merged and will be available in the next release.