0
0
GCPcloud~30 mins

Cloud Run for containerized services in GCP - Mini Project: Build & Apply

Choose your learning style9 modes available
Cloud Run for containerized services
📖 Scenario: You are a developer who wants to deploy a simple containerized web service on Google Cloud using Cloud Run. Cloud Run lets you run containers without managing servers, scaling automatically based on traffic.In this project, you will create the necessary configuration to deploy a container image to Cloud Run with basic settings.
🎯 Goal: Build a Cloud Run service configuration that deploys a container image with a specified service name, region, and allows unauthenticated access.
📋 What You'll Learn
Create a Cloud Run service configuration dictionary with the service name and container image
Add a region configuration variable for deployment location
Add the main deployment configuration including container port and environment variables
Complete the configuration by enabling unauthenticated access and setting the service to use the specified region
💡 Why This Matters
🌍 Real World
Cloud Run is widely used to deploy containerized applications quickly without managing servers. This project simulates setting up a basic Cloud Run service configuration.
💼 Career
Understanding how to configure and deploy services on Cloud Run is essential for cloud engineers and developers working with serverless container platforms.
Progress0 / 4 steps
1
Create initial Cloud Run service configuration
Create a dictionary called cloud_run_service with these exact entries: 'name': 'my-cloud-run-service' and 'image': 'gcr.io/my-project/my-container:latest'.
GCP
Need a hint?

Use a Python dictionary with keys 'name' and 'image' and assign the exact string values.

2
Add deployment region configuration
Create a variable called deployment_region and set it to the string 'us-central1' to specify the Cloud Run deployment region.
GCP
Need a hint?

Assign the exact string 'us-central1' to the variable deployment_region.

3
Add container port and environment variables
Add a key 'container_config' to the cloud_run_service dictionary. Its value should be another dictionary with 'port' set to 8080 and 'env' set to a dictionary with 'ENV' key and value 'production'.
GCP
Need a hint?

Update the cloud_run_service dictionary to include container_config with the specified port and environment variable.

4
Enable unauthenticated access and set region
Add two keys to the cloud_run_service dictionary: 'allow_unauthenticated' set to True and 'region' set to the variable deployment_region.
GCP
Need a hint?

Set 'allow_unauthenticated' to True and 'region' to deployment_region in the cloud_run_service dictionary.