简体   繁体   English

Go 上的新手 - AppEngine - 部署

[英]Newbe on Go - AppEngine - Deploy

I'm new using App Engine, and I would appreciate if someone can clarify this doubt:我是使用 App Engine 的新手,如果有人能澄清这个疑问,我将不胜感激:

How can I be sure that AppEngine in the cloud have the correct version of go I need to have in the cloud?如何确定云中的 AppEngine 具有我需要在云中拥有的正确版本的 go?

I have read some articles about installing and downloading the SDK for google on my local machine (and of course, I am able to install the version I need on my machine);我已经阅读了一些关于在我的本地机器上安装和下载用于 google 的 SDK 的文章(当然,我可以在我的机器上安装我需要的版本); but once I have generated my app in Go and I want to deploy it to App Engine in the cloud, how can I be sure Google infrastructure has the correct version?但是,一旦我在 Go 中生成了我的应用程序,并且我想将其部署到云中的 App Engine,我如何才能确定 Google 基础架构具有正确的版本?

I want to install Iris Web framework as part of the stack but it requires to go vers 1.14 or superior, Google App Engine standard only provides support for Google 1.11 and 1.12+ so I think I would need to go for the Google App Engine Flexible option, if that were the case, how can I be sure it has or support the Go version I need?... Or Is there some procedure to follow to install it? I want to install Iris Web framework as part of the stack but it requires to go vers 1.14 or superior, Google App Engine standard only provides support for Google 1.11 and 1.12+ so I think I would need to go for the Google App Engine Flexible option ,如果是这种情况,我如何确定它具有或支持我需要的 Go 版本?...或者是否有一些程序可以安装它?

Thanks in advance for your support预先感谢您的支持

The documentation at the time I am writing this says:我写这篇文章时的文档说:

The Go 1.12+ runtime supports the following major versions: Go 1.12, Go 1.13, Go 1.14, Go 1.15, and Go 1.16. The Go 1.12+ runtime supports the following major versions: Go 1.12, Go 1.13, Go 1.14, Go 1.15, and Go 1.16. Your app uses the latest stable release of the version that is specified in your app.yaml file.您的应用使用 app.yaml 文件中指定的最新稳定版本。 App Engine automatically updates to new patch revisions, but will not automatically update the major version. App Engine 会自动更新到新的补丁版本,但不会自动更新主要版本。

Here's an example version spec in app.yaml:这是 app.yaml 中的示例版本规范:

runtime: go115 

With the Flexible environment you have the ability to pin a version rather than using the latest available/supported.使用灵活的环境,您可以固定版本,而不是使用最新的可用/支持。 In order to do that, you will have to specify in your app.yaml file the exact version you would like it to be:为此,您必须在 app.yaml 文件中指定您希望的确切版本:

runtime: go1.14

If you specify only runtime: go it will pull the latest release available for Go language (which seems to be 1.19).如果您仅指定runtime: go ,它将提取可用于 Go 语言的最新版本(似乎是 1.19)。

For more information, please refer to this documentation: https://cloud.google.com/appengine/docs/flexible/go/reference/app-yaml#general有关更多信息,请参阅此文档: https://cloud.google.com/appengine/docs/flexible/go/reference/app-yaml#general

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

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