Search code examples
google-app-enginegoogle-cloud-endpointsapp.yaml

How is my GAE app able to run without app.yaml?


Although I started development for Google App Engine using Endpoints a while ago, I hadn't noticed this - Google's ref. page for Project structure says this:

Your development file hierarchy should look like this:

MyDir/
  [pom.xml]
  [build.gradle]
  [index.yaml]
  [cron.yaml]
  [dispatch.yaml]
  src/main/
    appengine/
      app.yaml
    docker/
      [Dockerfile]
    java/
      com.example.mycode/
        MyCode.java
    webapp/
      [index.html]
      [jsp.jsp]
      WEB-INF/
        [web.xml]

You'll need to define an app.yaml file that looks like this:
...

Note that the app.yaml is deemed compulsory as per the docs. In my case, I spawned a backend module(through the Wizard) in Android Studio that builds on Gradle. I have been able to build and deploy this module on GAE successfully but now I needed to switch from automatic scaling to basic/manual scaling, I found this to be done through app.yaml file.

Here is the thing: I don't have an app.yaml in place and it works fine. Where is then the config info. that GAE requires to deploy the App.

Specifically,

  • app.yaml specifies the environment - Java. But, I found the java plugin in build.gradle for that. Aren't 2 config places for the same thing confusing?
  • Is it possible to ditch app.yaml entirely for equivalent config. in build.gradle?
  • Why is Google claiming app.yaml to be compulsory when I am able to do without it?

Solution

  • The App Engine Java runtime uses its own configuration schema in XML, while others are YAML.

    To set the scaling elements, follow the official reference.