简体   繁体   English

如何在Google App Engine上部署1个实例

[英]How to deploy 1 instance on Google App Engine

I need to deploy 1 instance of a simple Node.js application on Google App Engine, without any form of scaling. 我需要在Google App Engine上部署一个简单Node.js应用程序的1个实例,而无需进行任何扩展。

I have tried doing gcloud preview app deploy , but that creates many instances even after I try to shut them down. 我尝试过进行gcloud preview app deploy ,但是即使我尝试关闭它们也会创建许多实例。 My goal is to consume minimum resources by running only 1 instance. 我的目标是通过仅运行1个实例来消耗最少的资源。

I am using the simplest example: https://cloud.google.com/nodejs/getting-started/hello-world 我正在使用最简单的示例: https//cloud.google.com/nodejs/getting-started/hello-world

Add these two lines to your app.yaml file: 将这两行添加到您的app.yaml文件中:

manual_scaling:
  instances: 1

This will disable automatic scaling and set the maximum of instances to just one. 这将禁用自动缩放并将最大实例设置为一个。

You can specify the settings for scaling when your configure your app . 您可以在配置应用程序时指定缩放设置。 The Hello World example does not provide any scaling settings, so default values apply. “ Hello World”示例不提供任何缩放设置,因此将应用默认值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM