In this article we will see how can we solve the lab Perform Foundational Infrastructure Tasks in Google Cloud . if you look at the right side bar you will see some tasks mentioned . We have to complete those tasks one by one . Once the task is completed then we will earn a badge .
Task 1: Create a bucket
Task 2: Create a Pub/Sub topic
Task 3: Create the thumbnail Cloud Function
Task 4: Remove the previous cloud engineer
Task 1: Create a bucket solution :
2. Name your bucket > Enter GCP Project ID > Continue
3. Choose where to store your data > Region: us-east1 > Continue
4. Now you don't have to change anything Use default for the remaining
5. Now Click on Create
Task 2: Create a Pub/Sub topic solution :
1. Navigation menu > Pub/Sub > Topics
2. Create Topic > Name: Jooli > Create Topic
Task 3: Create the thumbnail Cloud Function solution :
1. Navigation menu > Cloud Functions > Create Function
2. Use the following config:
Name: CFJooli
Region: us-east1
Trigger: Cloud Storage
Event type: Finalize/Create
Bucket: BROWSE > Select the qwiklabs bucket
Leave remaining as default and then go to next.
Runtime: Node.js 10
Entry point: thumbnail
Then you have to replace the code for index.js and package.json.
From lab instructions, replace code for index.js and package.json
On line 15 of index.js replace the text REPLACE_WITH_YOUR_TOPIC with the topic you created in task 2.
Click Deploy
3. Download the image from URL and Upload it to the bucket created intask 1
Navigation menu > Cloud Storage > Browser > Select your bucket > Upload files
Refresh bucket
Task 4: Remove the previous cloud engineer solution :
1. Navigation menu > IAM & Admin > IAM
2. Search for the "Username 2" > Edit > Delete Role
Once it is done click on check my progress and you will see green tick on that.