将OpenAPI规范重新部署到App Engine标准环境中 [英] Redeploying OpenAPI spec into App Engine standard environment

查看:73
本文介绍了将OpenAPI规范重新部署到App Engine标准环境中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在OpenAPI规范中进行一些更改时,不涉及代码中的任何更改,是否需要重新部署代码以及新规范?



当我使用 gcloud服务管理部署命令部署OpenAPI规范时,我重新输入了新的服务配置版本,我应该将其设置为 ENDPOINTS_SERVICE_VERSION app.yaml 文件中的参数。



我不确定,但它看起来我每次部署我的OpenAPI规范的新版本时都必须重新部署应用程序,即使应用程序代码没有更改,我仍然需要使用新的指向正确的服务配置版本, ENDPOINTS_SERVICE_VERSION 值,是吗?



如果是这样,那么它与 API部署的工作原理 AE Flex flex环境下的您可以使用gcloud service-management deploy命令来更新
,只需将它更改为
即可。 API规范,而无需重新部署后端API服务器
代码或可扩展服务代理。如果您是
更改仅配置的详细信息,则此功能非常有用。



当您更改API规范时,Service Control API支持
运行服务实例会接受更改,因为它的
取决于相同的服务配置。


也许有人可以帮助澄清在AE标准环境下它的工作原理如何?

解决方案

您是否在使用端点框架?如果是这样,那么当您创建新的服务配置版本时,您将不得不部署应用程序,因为如您所述, app.yaml 指定要使用哪个服务配置。

When I do some changes in OpenAPI spec, which don't involve any changes in the code, do I need to redeploy the code along with the new specification?

When I deploy OpenAPI spec with gcloud service-management deploy command I get back in it's output new service configuration version, which I should set to the ENDPOINTS_SERVICE_VERSION parameter in the app.yaml file.

I'm not sure but it looks like I have to redeploy the app every time I deploy a new version of my OpenAPI spec, even when the application code doesn't change I still need to point it to the right service configuration version with the new ENDPOINTS_SERVICE_VERSION value, is that right?

If so, then it's different from what is described in the How API Deployment Works document for AE flex environment under the "Redeployment" section, where it says the following:

You can use the gcloud service-management deploy command to update just the API specification without redeploying your backend API server code or the Extensible Service Proxy. This is useful if you are changing a configuration-only detail.

When you change the API specification, the Service Control API backing your running service instances will pick up the change because as it depends on the same service configuration.

Maybe someone could help to clarify how exactly it works in case of AE standard environment?

解决方案

Are you using the Endpoints Frameworks? If so, then you will have to deploy the app when you make a new service config version, because, as you mentioned, the app.yaml specifies which service config to use.

这篇关于将OpenAPI规范重新部署到App Engine标准环境中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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