要迁移到App Engine模块,请先测试版本? [英] Migrating to app engine modules, test versions first?

查看:82
本文介绍了要迁移到App Engine模块,请先测试版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的GAE当前未声明任何模块,我们希望将其转换为

Our GAE doesnt not currently declare any modules, and we'd like to convert it, as described here, and then add a 2nd module, for doing backend work

我对如何在测试环境(即测试版本")中测试新的模块化配置感到困惑,而没有将模块声明泄漏到我们的默认版本(称为"prod")中.我们正常的开发过程是将新代码部署到测试版本.例如在app.yaml中

I'm confused about how I can test the new modular configuration in a testing environment (i.e. a testing 'version') w/o the module declarations leaking into our default version (called 'prod'). Our normal development process is to deploy new code to a test version. e.g. in app.yaml

我们更改:

version: prod

version: testing

..然后部署.工作正常后,我们切换回version: prod并再次部署.但是,正如文档解释的那样,版本现在属于模块:

..and then deploy. Once it's working we switch back to version: prod and deploy again. However, as the docs explain it, versions now belong to modules:

因此,当我要测试是否有第二个模块时,该模块的声明似乎超出了版本"的范围,因此可能会影响其他版本(例如"prod").例如,我以前使用此app.yaml

So when I want to test having a 2nd module, it seem that the declaration of the module is above the scope of the 'version', and therefore might have affects on other versions (e.g. 'prod'). For example, I previously deployed to app engine with this app.yaml

application: simple-sample
version: prod
runtime: python27

然后,我将我的应用重新配置为使用工作人员"模块,并且我有两个Yaml文件:

Then I reconfigure my app to use a 'worker' module, and I have two yaml files:

app.yaml

application: simple-sample
version: testing
runtime: python27

和worker.yaml

and worker.yaml

application: simple-sample
module: worker
version: testing
runtime: python27

当我部署该代码时,它将对当前以"prod"运行的版本产生影响吗? IE. 产品"现在会知道这些模块吗?根据上面的图表,似乎可以,但是如果是这样,我看不到如何测试转换.

When I deploy that code, is it going to have any effect on the version currently running as 'prod'? I.e. will 'prod' now be aware of the modules? Based on the above diagram, it seems that it would, but if that's the case, I can't see how I can test my conversion.

推荐答案

您当前的应用程序已作为默认模块运行.您应该可以使用 URL解析规则进行检查default-dot-appname.appspot.com,您应在其中获取应用程序的 prod 版本.

Your current application already runs as the default module. You should be able to check this using the url parsing rules at default-dot-appname.appspot.com, where you should get your app's prod version.

将应用程序转换为模块时,必须在新的app.yaml文件中指定此默认模块名称.然后,您将拥有自己的 test 版本,该版本不会干扰您的旧版本.

When you convert your application to modules you'll have to specify this default module name in the new app.yaml file. And you'll have your test version on it, which should not interfere with your older version.

准备就绪后,可以以 prod 版本推出转换后的应用程序,覆盖旧应用程序,也可以以 prod_new 推出新版本. >并将其标记为GAE控制台中的默认应用程序版本(允许您保留未转换的应用程序 prod 版本,该版本通过prod-dot-default-dot-appname提供.appspot.com) .

When you're ready, you can either roll out the converted app at the prod version, overwriting the old app or you can roll out a new version, say prod_new and mark this as the default app version in the GAE console (which allows you to keep the not converted app prod version around, served at prod-dot-default-dot-appname. appspot.com).

这篇关于要迁移到App Engine模块,请先测试版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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