Deployment¶
Google Cloud Environment Setup¶
Create a Google Cloud project
Create a Cloud Storage bucket
GS_BUCKET_NAME
- Google Cloud Storage bucket name
Create a Cloud SQL MySQL 2nd generation instance
Note the
DATABASE_INSTANCE_CONNECTION_NAME
Create a database user
Create a database
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
Create an App Engine app
App Engine Deployment¶
Create the following environment variables:
Create
app.yaml
by running$ python app.yaml.py
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 thescripts
directory. It does set up operations before deployment and clean up after deployment.