Info and docs
Services and Versions
Can have multiple versions of multiple services (AKA modules)
- Default service served at
- Other services:
https://<service name>-dot-<project id>.appspot.com/
- Specific versions:
https://<version>-dot-<service name>-dot-<project id>.appspot.com/
Microservices with app engine: https://cloud.google.com/appengine/docs/standard/python/microservices-on-app-engine –> gradle modules == services?? https://github.com/GoogleCloudPlatform/appengine-modules-sample-java
- Migrating Services from the Standard Environment to the Flexible Environment
- App Engine Flexible Environment for Users of App Engine Standard Environment
- Python 2.7
- Java 7, 8
- PHP 5.5
- Standard environment has
google.appengineAPIs (not available in the flexible environment) for typical service requirements like the Google CLoud Datastore, though you can use the Google Cloud client libraries instead for increased portability.
- Sandboxed (no local file system access, only whitelisted binary libraries)
- Stateless lightweight HTTP services
The Flexible Environment allows SSH access, allows disk writes, and supports third-party binaries (also allows stack customization and background processes).
google.appengine APIs available, use the Google Cloud client libraries instead.
- Task queues
- Scheduled tasks
Standard environment can be configured with the
appengine-web.xml configuration file: https://cloud.google.com/appengine/docs/standard/java/config/appref
If there is an
appengine-web.xml file in project, then this is used to configure and deploy to the standard environment. TODO at least IntelliJ ignores app.yaml… might be IDE configuration issue though. And is this an IntelliJ-only construct???
To deploy to the flexible environment, you need to remove the appengine-web.xml file and create an app.yaml file instead with env set to flex.
Minimal app.yaml in root directory of a java project:
For standard environment, change env value to
If service is left out, then the app will be deployed as the
Apparently the handlers section is not necessary for flex environment.
Commented out bits are default values assigned by GCP.
TODO image of result, point out different env. for different versions
- If Google App Engine Flexible framework is not autodetected, right-click on project -> Add Framework Support and check “Google App Engine Flexible” TODO cannot see it there though!
- File > Settings > Build, Execution, Deployment > Clouds -> Add new deployment profile by clicking +
- File -> Project Structure -> Facets -> Google App Engine Flexible -> Configure path to app.yaml or generate a new app.yaml
File -> Project Structure -> Artifacts -> + -> Web Application: Archive -> for ‘
TODO Unable to change deployment mode to
Using the gcloud CLI tool
gcloud app deploy [--no-promote] app.yaml
gcloud help app deploy
TODO possible to use appengine-web.xml instead of app.yaml from cli?
Samples & Tutorials
Tutorial in Cloud Console using Cloud Shell
git clone https://github.com/GoogleCloudPlatform/appengine-try-java.git
mvn appengine:run mvn appengine:deploy
Using the GCP Client library
See tutorials for supported languages on GitHub.
TODO Using the app engine features (any available outside app engine, like task queues etc?)