Deploying an App Engine Application

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

Google Cloud App Engine provides a solid, easy-to-access platform for a wide range of web apps. Its interoperability with other Google Cloud services, such as Cloud Datastore, enhances its effectiveness. In this hands-on lab, we’ll deploy an app to App Engine that allows users to enter details into a NoSQL database, Cloud Datastore, and displays the proper HTML template and CSS. The process requires that we customize the `config.py` file before deploying the app.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Enable APIs and clone GitHub repository.
  1. From the main navigation, visit the APIs & Services > Libraries page, and search for "Datastore".
  2. Select the Cloud Datastore API.
  3. If the API is not available, click Enable.
  4. Repeat the process to enable the Cloud Build API and Container Registry API
  5. Activate the Cloud Shell.
  6. When it spins up, create the necessary bucket (bucket name must be unique):
    gsutil mb -c regional -l us-east1 gs://[BUCKET_NAME]
    gsutil iam ch allUsers:objectViewer gs://[BUCKET_NAME]
  7. Clone the GitHub repository:
    git clone https://github.com/linuxacademy/content-gc-essentials
  8. Change directory to the content-gc-essentials/app-engine-lab folder.
Configure `config.py` file.
  1. From the Cloud Shell Editor, open config.py in the app-engine-lab folder.
  2. Change PROJECT_ID to the current project, as shown in the Cloud Shell.
  3. Change the "CLOUD_STORAGE_BUCKET" variable value to your unique bucket name.
  4. Save the file.
Deploy the app.
  1. In the Cloud Shell, enter the following code:
    gcloud config set app/cloud_build_timeout 6000s
    gcloud app deploy
  2. When prompted, choose the us-east1 region.
Test the app.
  1. In the Cloud Shell, enter the following code:
    gcloud app browse
  2. If the browser window does not open, click the generated link.

Additional Resources

You’ve been asked to deploy the latest version of your company’s new app, LA Music Gallery, on Google Cloud App Engine. The app allows a user to enter details about a music album, including the name of both the artist and the album, as well as the HTML and CSS to present the app. To accomplish this, the app, written in Python, stores data in Cloud Datastore using App Engine’s standard environment.

You’ll need to accomplish the following steps to complete your task:

  1. Ensure required APIs are available.
  2. Clone a GitHub repo to acquire the files.
  3. Properly configure the application by modifying a YAML file.
  4. Deploy the app to App Engine in the proper region.
  5. Test the app.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?