简体   繁体   中英

Google app engine: Separating test and production version of cloud endpoints

I made a project on the google app engine, following the multi-class API endpoints tutorial in the official documentation.

I need multiple projects (frontends, mobile, server,..) to be able to make API calls onto these java end points.

This works, but using versions has proven difficult. I tried modifying the version in the appengine-web.xml. Using mvn appengine:update and endpoint generation, I can deploy to the default version on the cloud, but this ignores the version I specified in the xml.

Using appcfg, I can deploy to other versions but then they do not include my endpoints.

Without versions, I would need to use a seperate project for the development/test environment and one for the production environment.

Additionally, I want to use different versions for the data store, but I can't find a lot of information on this. Having a seperate data store for testing and production seems to require making a seperate project.

So is this the normal way to work with test environments? Test and deploy to a seperate project with a test data store? Or is there a way to create a development version and a production version and have their endpoints be seperately callable and make seperate data store calls.

Thanks and good day.

Although it is recommended to Provision GCP Projects for each of your development environments (eg Dev, Test, Prod.), this approach may be a bit overkill for a one man team working on a relatively simple app.

I believe you should take a look at Namespace API . It is being used to reliably serve different applications/customers from the same GAE instances. Currently supports only:

  • Datastore
  • Memcache
  • Task queue
  • Search

but I hope it will suit your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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