Deployment

Google Cloud Environment Setup

  1. Create a Google Cloud project

  2. Create a Cloud Storage bucket

  3. Create a Cloud SQL MySQL 2nd generation instance

  4. Create a database user

  5. Create a database

  6. Create 2 service accounts, create keys for them and save them in your local machine:

    • GOOGLE_APPLICATION_CREDENTIALS - a json file containing credentials for a Google Cloud service account with the following roles:

      • Storage Object Creator

      • Storage Object Viewer

    • APP_ENGINE_DEPLOYER_SERVICE_ACCOUNT_FILE- a json file containing credentials for a Google Cloud service account with the following roles:

      • App Engine Deployer

      • App Engine Service Admin

      • Cloud Build Editor

      • Storage Object Creator

      • Storage Object Viewer

  7. Create an App Engine app

App Engine Deployment

  1. Create the following environment variables:

  2. Create app.yaml by running $ python app.yaml.py

  3. Run .github/scripts/deploy-gae.sh in a Linux terminal.

    • Use Git bash or WSL if using Windows OS.

Notes

  • You need the Google Cloud SDK installed on your machine.

  • App Engine currently doesn’t support Pipfile. Instead of doing the deployment manually, we recommend you use the utility script for deployment: deploy_to_app_engine.sh stored in the scripts directory. It does set up operations before deployment and clean up after deployment.