0

I will freely admit that I am a newbie to GCP App Engine. I am the inheritor of a complex configuration that seems to have grown organically with multiple chefs and no code to back it up and documentation? Hah! So, I am looking at a list of Custom domain names (App Engine -> Settings -> Custom domains) that are CNAMES with aliases that are similar to the Services in App Engine, except periods in the aliases seemingly translate to dashes in the services. When viewing the services I see many have Dispatch routes. There is no dispatch.yml file I have, however. I am trying to determine the connections here between the dots. So:

1) Do the periods get automatically mapped to dashes? 2) If the above is "no", then is there some other mapping of custom domain names to services? 3) How can I find the source of the Dispatch routes?

Kevin Buchs
  • 353
  • 1
  • 3
  • 20

1 Answers1

1
  1. No. A service name in App Engine can only contain numbers, letters and hyphens (can't contain ".").
  2. Requests can be routed using App Engine's default routing or using a dispatch file (which should be the case if the application has many services and custom domain mappings). Find all the relevant information of how requests are routed here. I recommend you to read that documentation extensively, as well as how to map custom domains in order to fully understand how this is done.
  3. In order to view the source files (app.yaml, dispatch.yaml, etc.) go to the Google Cloud Platform Console's App Engine services section and click on Tools -> Debug and you should see the dispatch.yaml file under the Deployed files section.

In order to understand how to structure the services and related resources in an App Engine application refer to this documentation. Please read it carefully in order to understand how web services are structured in App engine.

  • Daniel, thanks for the reply. It is somewhat counter-intuitive to drill down into a particular service and then look for the dispatch.yaml file. Under one service, I do find one such file, but it is not at the top level where the documentation says it should be placed. I remain confused as to the scope of the dispatch.yaml file, since I have entered through a particular services, but I will pick apart each service and see how the pieces fit together. This is tough. – Kevin Buchs Dec 16 '19 at 19:32
  • The scope of the `dispatch.yaml` is for the whole application and there should be only one under the [default service](https://cloud.google.com/appengine/docs/standard/python3/configuration-files#the_default_service) if you follow point 3 of the answer. The [documentation](https://cloud.google.com/appengine/docs/standard/python3/how-requests-are-routed#creating_a_dispatch_file) mentions: `The dispatch file should be placed either in the root of your project directory, or in the root directory of your default service.` But this refers to the local environment where the application is developed. – Daniel Ocando Dec 17 '19 at 10:42