【问题标题】:'gcloud app deploy' command not working“gcloud app deploy”命令不起作用
【发布时间】:2018-07-12 15:10:41
【问题描述】:

我安装了一个 python 版本的谷歌应用引擎,我在控制台中创建了一个新项目。我按照终端中的说明在工作目录中使用命令gcloud app deploy,然后出现此错误:

ERROR: The [application] field is specified in file 
[/Users/fengxinlin/project/app.yaml]. This field is not used by 
gcloud and must be removed. Project name should instead be specified 
either by `gcloud config set project MY_PROJECT` or by setting the `-
-project` flag on individual command executions.
ERROR: (gcloud.app.deploy) Errors occurred while parsing the App 
Engine app configuration.

然后我尝试gcloud config set project [one of my project],然后我再次gcloud app deploy,我得到同样的错误,我的命令有什么问题吗?

【问题讨论】:

    标签: google-app-engine


    【解决方案1】:

    现在我解决了这个问题,答案就在错误消息中:在我的 app.yaml 文件中,从 yaml 文件中删除 applicationversion 行。那么就不会有这样的错误了。

    【讨论】:

    • 为什么 gcloud 不允许/处理 app.yaml 中的“应用程序”和“版本”,如果没有作为参数提供?
    【解决方案2】:

    对我来说,这是我需要的命令:

    gcloud app deploy --project project_name --version preprod --verbosity=info app.yaml index.yaml
    

    我添加此答案的目的是要注意,使用 appcfg 将使用参数:应用程序和版本,在 app.yaml 中,但 appcfg 不能使用参数来设置其他实例类和缩放(如下)。所以如果您返回 appcfg 只是为了让这些参数(版本和应用程序)正常工作,请小心

    instance_class: F2
    automatic_scaling:
      min_idle_instances: automatic
      max_idle_instances: automatic
      min_pending_latency: 30ms
      max_pending_latency: automatic
      max_concurrent_requests: 50
    

    我必须将 ssl 更新为:

    - name: ssl
      version: "2.7.11"
    

    因为显然存在应用程序引擎错误并且它不适用于

    - name: ssl
          version: "latest"
    

    【讨论】:

      【解决方案3】:

      在之前运行以下命令:gcloud app deloy:摆脱让很多像你我这样的用户感到沮丧的内部错误。

      gcloud config set app/use_deprecated_preparation True
      

      【讨论】:

        猜你喜欢
        • 2020-12-08
        • 1970-01-01
        • 2018-11-12
        • 2021-09-16
        • 1970-01-01
        • 1970-01-01
        • 2021-03-26
        • 1970-01-01
        • 2017-06-04
        相关资源
        最近更新 更多