Get Started with Pub/Sub: Challenge Lab - ARC113

A passionate full-stack developer from @ePlus.DEV
Search for a command to run...

A passionate full-stack developer from @ePlus.DEV
No comments yet. Be the first to comment.
Quick and practical tips to help users optimize tasks, improve skills, and solve common problems effectively across various areas like tech, lifestyle, productivity, and more.
Challenge overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary OpenAI công bố mười kết quả mới cho các bài toán lâu năm trong toán h

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary OpenAI công bố mười kết quả mới cho các bài toán lâu năm trong toán h

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary GitHub thử nghiệm policy theo enterprise team, cho phép cấp thêm mode

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary OpenAI giảm mạnh giá GPT-5.6 Luna và Terra, đồng thời chuyển Priority

In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.
When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.
To score 100% you must successfully complete all tasks within the time period!
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.
Note: Once the lab environment has been fully provisioned, the tasks will become visible. The tasks that are assigned to you are independent, so you are free to perform the tasks in any order you want.
You're a junior cloud engineer who is just starting out in your career. So far you have been helping teams create and manage Google Cloud resources.
You are expected to have the skills and knowledge for the tasks that follow.
Cloud Pub/Sub is a fully-managed, asynchronous messaging service that allows you to distribute messages to subscribers in real time via independent applications.
For this challenge, you may get task to use Cloud Scheduler to configure scheduled units of work, which are known as cron jobs. Once scheduled, Cloud Scheduler can then publish your messages to the relevant Cloud Pub/Sub topic for distribution to end users.
In addition to that, you may get task to create Pub/Sub Schema, Snapshot and need to setup the Pub/Sub Lite.
Each task is described in detail below, good luck!
Create Pub/Sub schema
Create a pub/sub Schema with the schema id named as 'city-temp-schema' and use the schema configuration as below:
{ "type" : "record", "name" : "Avro", "fields" : [ { "name" : "city", "type" : "string" }, { "name" : "temperature", "type" : "double" }, { "name" : "pressure", "type" : "int" }, { "name" : "time_position", "type" : "string" } ] } |
Click Check my progress to verify the objective.
Verify Task
Create Pub/Sub topic using schema
Create a pub/sub topic 'temp-topic' with precreated schema id named as 'temperature-schema'.
Note: In case you're unable to view pre-created resources as per the task description,"your Google Cloud resources are still being provisioned, please refresh the page and try again in a few minutes." If you do, just wait a short time and reload your page. |
Click Check my progress to verify the objective.
Verify Task
Create a trigger cloud function with Pub/Sub topic
1. Create a trigger cloud function 'gcf-pubsub' with the Cloud Run Function environment for the pub/sub topic named as gcf-topic.
Note: In case you're unable to view pre-created resources as per the task description,"your Google Cloud resources are still being provisioned, please refresh the page and try again in a few minutes." If you do, just wait a short time and reload your page. |
Click Check my progress to verify the objective.
Run the following in cloudshell
export REGION=$(gcloud config get-value compute/region)
Task 1. Set up Cloud Pub/Sub.
Task 2. Create a Cloud Scheduler job.
Task 3. Verify the results in Cloud Pub/Sub.
curl -LO https://raw.githubusercontent.com/Itsabhishek7py/GoogleCloudSkillsboost/refs/heads/main/Get%20Started%20with%20PubSub%3A%20Challenge%20Lab/abhishek1.sh
sudo chmod +x abhishek1.sh
./abhishek1.sh
Task 1. Create Pub/Sub schema.
Task 2. Create Pub/Sub topic using schema.
Task 3. Create a trigger cloud function with Pub/Sub topic
curl -LO https://raw.githubusercontent.com/Itsabhishek7py/GoogleCloudSkillsboost/refs/heads/main/Get%20Started%20with%20PubSub%3A%20Challenge%20Lab/abhishek2.sh
sudo chmod +x abhishek2.sh
./abhishek2.sh
Task 1. Publish a message to the topic.
Task 2. View the message.
Task 3. Create a Pub/Sub Snapshot for Pub/Sub topic.
curl -LO https://raw.githubusercontent.com/Itsabhishek7py/GoogleCloudSkillsboost/refs/heads/main/Get%20Started%20with%20PubSub%3A%20Challenge%20Lab/abhishek3.sh
sudo chmod +x abhishek3.sh
./abhishek3.sh