9

Reading this doc it says "You must initially deploy a version of your app to the default service before you can create and deploy subsequent services."

I don't understand this because I thought the GAE microservices were separate things as in: enter image description here

But it seems this is not an accurate depiction of how GAE microservices work? Is there like a master controller "default" service that sets top level config or does some kind of routing? If I'm just running a bunch of non web apps (meaning apps that wil run on a scheduled and process data) and a frontend "app" for accepting web requests isn't necessary than why do I still need to create the default service?

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
red888
  • 27,709
  • 55
  • 204
  • 392

2 Answers2

15

The reason is that there are also several app-level configs, applicable to all services/modules:

Some of these configs can have trouble if not deployed after/together with the default service. And some services may have dependencies on the app-level configs.

The requirement of deploying default first is simply a measure to reduce the risk of initial deployment problems. Subsequent deployments no longer have this restriction (since default is already deployed)

Yes, the default service is mandatory (sort of like a kitchen sink for all kinds of stuff, for example requests not matching any dispatch rule are sent to the default service). So just declare one of your non-web apps the default one (it doesn't matter what the default service actually does).

Somehow related (mostly for the examples): Can a default service/module in a Google App Engine app be a sibling of a non-default one in terms of folder structure?

Community
  • 1
  • 1
Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • 1
    OK your explanation makes a lot more sense than how google's docs usually introduce the concept. Also, the name "default" app makes more sense to me now (it literally contains the "default" settings for the rest of the services). can I have like an empty default app? Maybe not empty, but a default app that isn't used as an "app" at all and just has those top level default configs? – red888 Feb 21 '17 at 21:14
  • You can try and see how it goes - worst case you *might* end up adding a few code snippets. – Dan Cornilescu Feb 21 '17 at 23:22
  • I have another question about if the default app has to be deployed to appspot.com or if it can exist hidden in background: http://stackoverflow.com/questions/42397788/does-my-default-app-have-to-be-deployed-to-appspot-com – red888 Feb 22 '17 at 17:01
-4

You can deploy a default app by initializing a default AppEngine application in your project by running ./init_appengine.sh

[init_appengine.sh]