hands-on lab

Build and Deploy a Container Application with Google Cloud Run

Intermediate
40m
2,449
4.3/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab description

Cloud Run is a managed compute platform that automatically scales your stateless containers. Google Cloud Run is a serverless service, meaning you only need to think about your code; you write it, you test it and then you can deploy it by using Cloud Run. Everything related to the platform: CPU, memory, and networking are managed by Cloud Run. Because Cloud Run uses containers you don't need to worry about whether your preferred programming language is supported or handling dependencies. Everything is in the container and just runs. In this Lab, you will build a Docker image that refers to a simple Python application by using Cloud Build, then you will deploy the application by using Cloud Run. You will also monitor and get logs of your application by using the Cloud Run Console.

Learning Objectives

Upon completion of this Lab you will be able to:

  • Deploy a container application to Google Cloud Run
  • Monitor a running application by using Cloud Run Console

Intended Audience

This Lab is intended for:

  • Google Cloud Associate Cloud Engineer (ACE) certification candidates
  • Individuals who want to improve their skills in the serverless deployment area by using Google services
  • Solutions Architects who want to move their container applications to serverless

Prerequisites

Basic knowledge of Docker is a plus but it is not required.

Updates

March 29th, 2022 - Updated the instructions and screenshots to reflect the latest UI

January 8th, 2020 - Updated lab to use a GCE instance rather than Cloud Shell to avoid availability issues

December 24th, 2020 - Updated Cloud Build command to account for cases when the Cloud Shell project is not configured

December 23rd, 2019 - Updated instructions and screenshots to reflect the latest console experience

Environment before
Environment after
About the author
Avatar
Stefano Cascavilla
Junior Data Engineer
Students
39,675
Labs
106
Courses
2
Learning paths
10

Stefano studies Computer Science and is passionate about technology. He loves working with Cloud services and learning all the best practices for them. Google Cloud Platform and Amazon Web Services are the cloud providers he prefers. He is a Google Cloud Certified Associate Cloud Engineer. Node.js is the programming language he always uses to code. When he's not involved in studying or working, Stefano loves riding his motorbike and exploring new places.

Covered topics
Lab steps
Signing In to the Google Cloud Console
Creating a Sample Python Application
Containerizing a Python Application using Cloud Build
Deploying a Containerized Application to Cloud Run
Monitoring and Getting Logs Using the Cloud Run Console