在灵活环境中部署我的应用程序时,无法在App Engine灵活环境中设置错误测试版设置machine_type

时间:2017-01-28 22:24:23

标签: google-app-engine google-cloud-platform google-compute-engine

尝试使用灵活的环境部署我的应用引擎时,我收到错误。

ERROR: (gcloud.preview.app.deploy) INVALID_ARGUMENT: 
The beta setting machine_type cannot be set in an App Engine Flexible Environment deployment.

我的app.yaml在下面给出

runtime: nodejs
#vm: true
env: flex

# [END runtime]

network:
  instance_tag: app-tag
  name: network-tag

instance_class: F1
automatic_scaling:
  min_num_instances: 1
  max_num_instances: 2
  cool_down_period_sec: 60

beta_settings:
  machine_type: f1-micro

handlers:
- url: /.*
  script: IGNORED
  secure: always

# Temporary setting to keep gcloud from uploading node_modules
skip_files:
- ^node_modules$

也可以请任何人告诉我vm: trueenv: flex之间的区别是什么,因为它们都将应用引擎环境设置为灵活?

1 个答案:

答案 0 :(得分:1)

vm: true更改为env: flex后,您实际上切换到最新的英特尔版本,请参阅Upgrading to the Latest App Engine Flexible Environment Beta Release

不再以这种方式配置机器类型。相反,您可以通过其custom instance shape

配置resources
  

资源设置

     

这些设置控制计算资源。 App Engine分配了一个   machine type基于您的CPU和内存量   指定。保证机器的水平至少达到   您已指定的资源,可能还有更多。

     

您可以在资源设置中指定最多八个卷的tmpfs。   然后,您可以通过tmpfs和启用需要共享内存的工作负载   可以改进文件系统I / O.

     

例如:

resources:
  cpu: 2
  memory_gb: 1.3
  disk_size_gb: 10
  volumes:
  - name: ramdisk1
    volume_type: tmpfs
    size_gb: 0.5