将节点应用程序部署到谷歌应用程序引擎标准环境中

时间:2023-01-17 15:42:17

Until december 2016, I was able to deploy node applications to Google App Engine standard environment with an app.yaml looking like this:

在2016年12月之前,我可以使用App .yaml将节点应用部署到谷歌App Engine标准环境中:

runtime: nodejs
vm: true
api_version: 1
manual_scaling:
  instances: 1

Now, when I do this to deploy to a new project, I get this error message:

现在,当我这样做以部署到一个新项目时,我得到了这个错误消息:

ERROR: (gcloud.app.deploy) INVALID_ARGUMENT: Deployments to App Engine Flexible require 'env: flex' in app.yaml. The 'vm:true' setting has been deprecated.

错误:(gcloud.app.deploy) INVALID_ARGUMENT:部署到App Engine Flexible需要在App .yaml中使用“env: flex”。“vm:true”设置已被弃用。

But I'm still able to deploy with this configuration for existing projects.

但是我仍然可以使用这个配置来部署现有的项目。

Has something changed recently in Google App Engine for Node.js ? (I don't know when reading the error message if standard environment is deprecated, or if for some reason it considers I chose to deploy to a flexible environment, and so I can't use vm:true because this option is deprecated for flexible environments).

最近谷歌的Node应用引擎发生了一些变化。js ?(我不知道什么时候读取错误消息,如果不赞成使用标准环境,或者出于某种原因,它认为我选择部署到一个灵活的环境中,所以我不能使用vm:true,因为这个选项在灵活的环境中不赞成)。

1 个解决方案

#1


3  

The vm: true indicates you were actually deploying to the flexible environment (an earlier version). The standard environment never supported node.js apps, see https://cloud.google.com/appengine/docs.

vm: true表明您实际上部署到了灵活的环境(较早的版本)。标准环境从不支持节点。js应用程序,参见https://cloud.google.com/appengine/docs。

Yes, there was a change in the flexible environment (all languages, not only node.js). See Upgrading to the Latest App Engine Flexible Environment Beta Release. From there, explaining why your existing apps still work:

是的,灵活的环境(所有语言,不仅仅是node.js)发生了变化。参见升级到最新的应用引擎灵活的环境测试版。从这里开始,解释为什么你现有的应用程序仍然有效:

Applications created with vm:true

应用程序创建vm:真的

All applications created in the vm:true environment will continue to work for at least 6 months after the App Engine flexible environment becomes generally available. At that point, all customers need to switch to the env:flex environment.

所有在vm中创建的应用程序:在应用程序引擎灵活的环境变得普遍可用后,真实环境将继续工作至少6个月。此时,所有客户都需要切换到env:flex环境。

UPDATE:

更新:

Node.JS is currently available in the standard environment as well, see:

节点。JS目前也可在标准环境中使用,参见:

#1


3  

The vm: true indicates you were actually deploying to the flexible environment (an earlier version). The standard environment never supported node.js apps, see https://cloud.google.com/appengine/docs.

vm: true表明您实际上部署到了灵活的环境(较早的版本)。标准环境从不支持节点。js应用程序,参见https://cloud.google.com/appengine/docs。

Yes, there was a change in the flexible environment (all languages, not only node.js). See Upgrading to the Latest App Engine Flexible Environment Beta Release. From there, explaining why your existing apps still work:

是的,灵活的环境(所有语言,不仅仅是node.js)发生了变化。参见升级到最新的应用引擎灵活的环境测试版。从这里开始,解释为什么你现有的应用程序仍然有效:

Applications created with vm:true

应用程序创建vm:真的

All applications created in the vm:true environment will continue to work for at least 6 months after the App Engine flexible environment becomes generally available. At that point, all customers need to switch to the env:flex environment.

所有在vm中创建的应用程序:在应用程序引擎灵活的环境变得普遍可用后,真实环境将继续工作至少6个月。此时,所有客户都需要切换到env:flex环境。

UPDATE:

更新:

Node.JS is currently available in the standard environment as well, see:

节点。JS目前也可在标准环境中使用,参见: