Toshimaru's Blog

Basic gcloud Commands for Google App Engine

Let’s see basic gcloud commands for Google App Engine.

Install gcloud command on MacOS

$ brew cask install google-cloud-sdk

If you’re not a MacOS user, please visit here.

Local Development is useful for local development.

$ app.yaml

If command not found on MacOS, create a symbolic link.

$ ln -s /usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/ /usr/local/bin/


$ gcloud app deploy

This command deploys your application to Google App Engine.

Deploy Log Sample

$ gcloud app deploy --project {your_project_name}
Services to deploy:

descriptor:      [/your/project/path/app.yaml]
source:          [/your/project/path]
target project:  [your_project_name]
target service:  [default]
target version:  [20190517t173453]
target url:      []

Do you want to continue (Y/n)?  Y

Beginning deployment of service [default]...
╠═ Uploading 2 files to Google Cloud Storage                ═╣
File upload done.
Updating service [default]...done.
Setting traffic split for service [default]...done.
Deployed service [default] to []

Browse App

$ gcloud app browse

This command opens your application url( on the browser.

See log

You can watch your application log.

$ gcloud app logs tail -s default

Cron deployment

If you want to deploy your cron, run the following command.

$ gcloud app deploy cron.yaml

list projects

You can list your own projects on GCP.

$ gcloud projects list
project-name project     xxxxxxx
project-name project     xxxxxxx
project-name project     xxxxxxx

Specifying Project

You can specify project by adding below option.

Load more