`gcloud app deploy`与`appcfg.py` [英] `gcloud app deploy` vs. `appcfg.py`

查看:189
本文介绍了`gcloud app deploy`与`appcfg.py`的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾经是 appcfg.py 的长期用户,我甚至在其上创建了一些bash脚本。


  1. 我们是否应该切换到 gcloud应用部署?是否会弃用 appcfg.py ?如果是,什么是时间轴?

  2. 为什么没有yaml文件向后兼容的宽限期?切换到 gcloud应用程序部署我得到: [应用程序]字段在文件[... / app.yaml]中指定。此
    字段未被gcloud使用,必须删除。项目名称应该是
    ,而不是由 gcloud config set project MY_PROJECT
    或通过设置 - project

    $

    错误:[版本]字段在文件[... / app.yaml]中指定。此
    字段未被gcloud使用,必须删除。版本是默认自动生成的
    ,但也可以通过在单个命令执行时设置 - version 标志来手动指定


    我在说这是因为这可以在模块/服务字段中实现:


    警告:应用程序.yaml文件中的module参数不推荐使用
    。请改用service参数。





    1. 通过 gcloud应用展开,上传 queue.yaml dispatch.yaml cron.yaml


    2. 两种部署应用程序的方式有什么不同?

      我对注意事项感兴趣,需要注意的事情如下:


      lockquote

      FLAGS --promote提升部署的版本以接收所有流量。默认情况下为真。


      这表示w / gcloud应用程序部署应用程序将被部署,新版本将被设置为活动...这与 appcfg.py 做的事情完全相反,因为您必须调用 set_default_version 才能将版本标记为活动状态。



      这提出了我的最后一个问题:如果我选择不使用


      $ gcloud config set app / promote_by_default false


      使用--no-promote禁用。

      我必须重新部署w /默认值我可以使它活跃?

      解决方案

      长话短说:


      1. gcloud app deploy 将成为未来部署的首选路径,目前受支持。在我们宣布弃用转换后大约一年。

      2. 在我们弃用 appcfg.py 之前,我们会有一个完整的迁移指南和所有的变化。我们不希望完全向后兼容,因为我们正抓住这个机会用旧工具修复一些瑕疵。

      3. 您可以运行 gcloud app deploy cron.yaml 等来部署备用YAML文件。

      4. 同样,我们计划在我们想要之前编写迁移指南强迫你转到新的工具。

      所以我认为你可以放弃这个,直到我们正式弃用 appcfg 工具 - gcloud应用程序确实适用于那些想要现在最新最闪亮的勇敢探险家。


      I've been a long time user of appcfg.py and I even build some bash scripts on top of it.

      1. Should we switch to gcloud app deploy? Will appcfg.py be deprecated? If yes what is the timeline?

      2. Why isn't there a grace period for backward compatibility of the yaml file? Switching to gcloud app deploy I get:

      The [application] field is specified in file [.../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.

      and

      ERROR: The [version] field is specified in file [.../app.yaml]. This field is not used by gcloud and must be removed. Versions are generated automatically by default but can also be manually specified by setting the --version flag on individual command executions.

      I am saying this as this was possible w/ the module/service field:

      WARNING: The "module" parameter in application .yaml files is deprecated. Please use the "service" parameter instead.

      1. How do you upload queue.yaml, dispatch.yaml and cron.yaml with gcloud app deploy?

      2. What are the differences between the 2 ways of deploying an app?

        I'm interested in caveats & things to watch for like:

      FLAGS --promote Promote the deployed version to receive all traffic. True by default.

      That means w/ gcloud app deploy the app will be deployed and the new version will be set as the active one... this is exactly the reverse way appcfg.py did things as there you would have to call set_default_version to mark a version as active.

      This raises my last question: if I opt to NOT make it active by using either

      $ gcloud config set app/promote_by_default false

      or

      Use --no-promote to disable.

      will I have to redeploy w/ default value so I can make it active?

      解决方案

      Long story short:

      1. gcloud app deploy is going to be the preferred path for deployments going forward, and is currently supported. You'll have about a year after we declare deprecation to transition.
      2. Before we deprecate appcfg.py, we'll have a full migration guide with all of the changes. We don't want full backwards compatibility, because we're seizing this chance to fix some warts with the old tooling.
      3. You can run gcloud app deploy cron.yaml and so on to deploy the alternate YAML files.
      4. Again, we're planning on writing a migration guide before we want to force you over to the new tooling.

      So I think you can punt on this until we've officially deprecated the appcfg tooling–gcloud app is really meant for brave explorers who want the newest and shiniest for now.

      这篇关于`gcloud app deploy`与`appcfg.py`的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆