Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I run f1-micro instances on App Engine Flexible as of May 2017?

I know there are many such questions asked, but App Engine tends to have changed between each time I set up a new project, often without proper documentation.

Earlier, during the (vm: true)-times, I used to run f1-micro instances with the following setting, that is no longer accepted:

beta_settings:
  machine_type: f1-micro

Answers, such as this one, suggests that it was possible to achieve the same through the resources-setting earlier.

But when I try this now (with 0.18 on memory_gb), I get the following error message:

Error creating Deployment Manager deployment, status: 1, error: Memory GB (0.58) per VCPUs must be between 0.90 and 6.50.

I have to increase the memory option to around 0.5 to actually get it to deploy. Earlier I would then go to look at the Compute Engine resources to check which machine type was actually running. But the App Engine Flexible instances seems to have been removed from that view. I can't find this information anywhere in the online console. The closest thing I got was enabling Debug-mode on the instance, SSH-ing into it, and running:

curl --header "Metadata-Flavor:Google" http://metadata.google.internal/computeMetadata/v1/instance/machine-type

And I get the result:

projects/349377138382/machineTypes/custom-1-1024

..indicating that it's a custom machine type running. I have plenty of small services running, and feel I have no transparency about what resources I am using. At times I wonder if it's made this way on purpose, to force people into spending more than necessary.

Am I blind here, or are there any neat tricks to get the advertised machine types running, and to verify that visually through the tools provided?

like image 379
benwixen Avatar asked Oct 30 '22 08:10

benwixen


1 Answers

App Engine flexible currently only supports custom machine types based on the resource declaration in app.yaml. As you've seen there are some limitations on the range of valid resources. There's no 'trick' to force a specific machine type.

Regards, Zach

like image 155
Zach Fewtrell Avatar answered Nov 12 '22 13:11

Zach Fewtrell