Migrating to app engine modules, test versions fir

2019-09-02 03:16发布

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

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

we change:

version: prod

to

version: testing

..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:

modules structure

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

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

and worker.yaml

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

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.

1条回答
疯言疯语
2楼-- · 2019-09-02 03:39

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.

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.

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).

查看更多
登录 后发表回答