Difference between 'goapp deploy' and 'appcf.py' to deploy my app on Google App Engine?

huangapple go评论98阅读模式
英文:

Difference between 'goapp deploy' and 'appcf.py' to deploy my app on Google App Engine?

问题

我不理解以下两个命令的区别:

goapp deploy -application <YOUR_PROJECT_ID> myapp/

appcfg.py -A <YOUR_PROJECT_ID_> -V v1 update myapp/

这两个命令在尝试在Google App Engine上部署我的应用程序时有何区别?能有人给我解释一下吗?

英文:

I don't understand the difference between

goapp deploy -application &lt;YOUR_PROJECT_ID&gt; myapp/

and

appcfg.py -A &lt;YOUR_PROJECT_ID_&gt; -V v1 update myapp/

when trying to deploy my app in google app engine. Can somebody enlighten me please?

答案1

得分: 3

上传、下载和管理Go应用程序中有详细说明:

> goapp deploy 包装了SDK中提供的appcfg.py Python工具。如果需要更多对部署的控制,也可以直接调用该工具。

goapp deploy 等同于 appcfg.py update myapp/

这些命令会自动从 app.yaml 中获取应用程序ID和其他配置信息。你可以使用 goapp-application 参数,或者 appcfg.py-A 参数来覆盖应用程序ID。


所以 goapp deploy 在底层调用了 appcfg.py,它是一个方便隐藏 appcfg.py 的方法。

goapp deploy -application &lt;YOUR_PROJECT_ID&gt; myapp/

部署位于 myapp 文件夹中的应用程序。配置将从 myapp/app.yaml 文件中读取。该命令还会覆盖应用程序ID(如果在 app.yaml 中存在),并使用 &lt;YOUR_PROJECT_ID&gt;

appcfg.py -A &lt;YOUR_PROJECT_ID&gt; -V v1 update myapp/

这也会部署应用程序,但 -V 会覆盖 myapp/app.yaml 中可能存在的版本,并使用版本 v1-A 用于覆盖 app.yaml 中的ID,在这种情况下将使用 &lt;YOUR_PROJECT_ID&gt;

英文:

Documented in Uploading, Downloading, and Managing a Go App:

> goapp deploy wraps the appcfg.py python tool provided in the SDK. You can also invoke this tool directly if you need greater control over the deployment.

goapp deploy is equivalent to appcfg.py update myapp/.

These commands get application ID and other configuration from app.yaml automatically. You can use -application param of goapp, or -A of appcfg.py to override the application ID.


So goapp deploy calls appcfg.py under the hood, it is a convenient method to hide appcfg.py.

goapp deploy -application &lt;YOUR_PROJECT_ID&gt; myapp/

Deploys the application located in the myapp folder. Configuration will be read from the app.yaml file that must be at myapp/app.yaml. The command also overrides the application ID (if present in app.yaml), and &lt;YOUR_PROJECT_ID&gt; will be used instead.

appcfg.py -A &lt;YOUR_PROJECT_ID&gt; -V v1 update myapp/

This also deploys the application, but the -V overrides the version that may be present in myapp/app.yaml, and will use the version v1. -A is used to override the ID from app.yaml, will be &lt;YOUR_PROJECT_ID&gt; in this case.

答案2

得分: 1

goapp是一个通用工具,用于整个Go-on-App-Engine工作流程,从构建到部署;您可以使用相同的工具来安装依赖项(get),构建您的应用程序,本地运行(serve),然后部署它(以及运行测试、格式化代码等)。

其中一些工具包装了其他工具:goapp fmt可能只是包装了gofmt,而goapp deploy只是包装了appcfg.py update(请参阅文档)。

英文:

goapp is a general tool for the whole Go-on-App-Engine workflow from build to deployment; you can use the same tool to install dependences (get), build your app, run locally (serve) and then deploy it (as well as run tests, format code, etc).

Some of these wrap other tools: goapp fmt probably just wraps gofmt, whilst goapp deploy just wraps appcfg.py update (see docs)

huangapple
  • 本文由 发表于 2016年3月30日 01:28:31
  • 转载请务必保留本文链接:https://go.coder-hub.com/36291105.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定