Get Started with Pub/Sub: Challenge Lab - ARC113

Get Started with Pub/Sub: Challenge Lab - ARC113

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 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!

Task 1

Set up Cloud Pub/Sub

1. Create a Cloud Pub/Sub topic 'cloud-pubsub-topic'.

2. Create a Cloud Pub/Sub subscription 'cloud-pubsub-subscription' for a given topic 'cloud-pubsub-topic'.

Click Check my progress to verify the objective.

Verify Task

Check my progress

Task 2

Create a Cloud Scheduler job

1. Create a Cloud Scheduler job using the following details:

ParameterConfiguration
Namecron-scheduler-job
LocationRegion from the Lab Details panel which is located at the left side of the lab instructions
ScheduleSends a message to your Cloud Pub/Sub topic every minute
Topiccron-job-pubsub-topic
Message bodyHello World!

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

Check my progress

Task 3

Verify the results in Cloud Pub/Sub

1. For this task, you need to verify that Cloud Pub/Sub is able to pull the messages you have published via Cloud Scheduler with the following command:

gcloud pubsub subscriptions pull cron-job-pubsub-subscription --limit 5

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

Check my progress


Answer of Lab

export REGION=us-east1
curl -LO raw.githubusercontent.com/quiccklabs/Labs_solutions/master/Get%20Started%20with%20PubSub%20Challenge%20Lab/quicklabarc113.sh
sudo chmod +x quicklabarc113.sh
./quicklabarc113.sh

Congratulations!