GoogleCloudPlatform / bank-of-anthos

Retail banking sample application showcasing Kubernetes and Google Cloud
https://cymbal-bank.fsi.cymbal.dev
Apache License 2.0
981 stars 580 forks source link

Create the monolith VM no N1 type already present in all region #1234

Open christianmarangoni opened 1 year ago

christianmarangoni commented 1 year ago

Please check the open issues for this repository to verify that the same issue/bug has not been already reported.

If you see the bug being already reported, please upvote and comment on the existing issue instead of opening a new one. If you notice a bug/issue which is not the same as yours but is related, create a new one and link to the existing bug/issue.

Describe the bug

During the step of make monolith-deploy this message is present if you choose a region where n1 gce instance instance is not present

ERROR: (gcloud.compute.instances.create) Could not fetch resource:
 - Invalid value for field 'resource.machineType': 'https://compute.googleapis.com/compute/v1/projects/bank-of-anthos-xxxx/zones/europe-west8-a/machineTypes/n1-standard-1'. Machine type with name 'n1-standard-1' does not exist in zone 'europe-west8-a'."

Use `gcloud compute machine-types list --zones` to see the available machine  types.
make: *** [Makefile:61: monolith-deploy] Error 

To Reproduce

Follow the steps in the guide of migration monolith here https://cloud.google.com/migrate/containers/docs/migrating-monolith-vm-overview-setup

  1. choose in the step 1 a zone like europe-west8 to export export ZONE=europe-west8-a
  2. Follow the step to step 3 of the guide
  3. Recive the errore during the make monolith-deploy
    
    ERROR: (gcloud.compute.instances.create) Could not fetch resource:
    - Invalid value for field 'resource.machineType': 'https://compute.googleapis.com/compute/v1/projects/bank-of-anthos-xxxx/zones/europe-west8-a/machineTypes/n1-standard-1'. Machine type with name 'n1-standard-1' does not exist in zone 'europe-west8-a'."

Use gcloud compute machine-types list --zones to see the available machine types. make: *** [Makefile:61: monolith-deploy] Error


### Logs  

ERROR: (gcloud.compute.instances.create) Could not fetch resource:

Use gcloud compute machine-types list --zones to see the available machine types. make: *** [Makefile:61: monolith-deploy] Error



### Screenshots 
Not applicable 

### Environment 
region europe-west8 and other region where n1 is not present
bourgeoisor commented 1 year ago

That machine type is hard-coded here: https://github.com/GoogleCloudPlatform/bank-of-anthos/blob/main/src/ledgermonolith/scripts/deploy-monolith.sh#L69

I'll have to spend some time thinking how I want to approach this. In the mean time, feel free to select another region that does support that machine type.

minherz commented 1 year ago

@bourgeoisor do we plan to take this forward?

bourgeoisor commented 1 year ago

I do want to make sure this process is smooth so either I'll fix it here, or will tweak relevant tutorials to mention this requirement. Let's keep this issue open in the meantime.