Skip to content

Latest commit

 

History

History

GSP315_Perform-Foundational-Infrastructure-Tasks-in-Google-Cloud

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

GSP315 —— Perform Foundational Infrastructure Tasks in Google Cloud

GSP313 —— Create and Manage Cloud Resources
Table of Contents (🔎 Click to expand/collapse)
Quest Outline (🔎 Click to expand/collapse)
Level Code Name Note
Introductory GSP073 Cloud Storage: Qwik Start - Cloud Console EN
Introductory GSP074 Cloud Storage: Qwik Start - CLI/SDK EN
Introductory GSP064 Cloud IAM: Qwik Start EN
Introductory GSP089 Cloud Monitoring: Qwik Start EN
Introductory GSP081 Cloud Functions: Qwik Start - Console EN
Introductory GSP080 Cloud Functions: Qwik Start - Command Line EN
Introductory GSP096 Google Cloud Pub/Sub: Qwik Start - Console
Introductory GSP095 Google Cloud Pub/Sub: Qwik Start - Command Line
Introductory GSP094 Google Cloud Pub/Sub: Qwik Start - Python
Fundamental GSP315 Perform Foundational Infrastructure Tasks in Google Cloud: Challenge Lab

Overview

This lab is recommended for students who have enrolled in the Foundational Infrastructure Tasks in Google Cloud quest.

Challenge Scenario

You are just starting your junior cloud engineer role with Jooli inc. So far you have been helping teams create and manage Google Cloud resources.

You are expected to have the skills and knowledge for these tasks so don’t expect step-by-step guides.

Your challenge

You are now asked to help a newly formed development team with some of their initial work on a new project around storing and organizing photographs, called memories. You have been asked to assist the memories team with initial configuration for their application development environment; you receive the following request to complete the following tasks:

  • Create a bucket for storing the photographs.
  • Create a Pub/Sub topic that will be used by a Cloud Function you create.
  • Create a Cloud Function.
  • Remove the previous cloud engineer’s access from the memories project.

Some Jooli Inc. standards you should follow:

  • Create all resources in the us-east1 region and us-east1-b zone, unless otherwise directed.
  • Use the project VPCs.
  • Naming is normally team-resource, e.g. an instance could be named kraken-webserver1
  • Allocate cost effective resource sizes. Projects are monitored and excessive resource use will result in the containing project's termination (and possibly yours), so beware. This is the guidance the monitoring team is willing to share; unless directed, use f1-micro for small Linux VMs and n1-standard-1 for Windows or other applications such as Kubernetes nodes.

Task 1: Create a bucket

Description

You need to create a bucket for the storage of the photographs.

Solution (Graphical User Interface)

  1. Click Navigation Menu > Cloud Storage > Browser.
  2. Click CREATE BUCKET.
  3. Fill up the fields.
    • Use the unique bucket name. e.g. <PROJECT_NAME>
    • Region: us-east1
    • Zone: us-east1-b
  4. Click CREATE.

Solution (Command Line Interface)

$ gsutil mb -p <PROJECT_ID> -c "STANDARD" -l "US-EAST1" -b on gs://<BUCKET_NAME>

Task 2: Create a Pub/Sub topic

Description

Create a Pub/Sub topic for the Cloud Function to send messages.

Solution (Graphical User Interface)

Solution (Command Line Interface)

References

Task 3: Create the thumbnail Cloud Function

Description

Create a Cloud Function that executes every time an object is created in the bucket you created in task 1. The function is written in Node.js 10. Make sure you set the Entry point (Function to execute) to thumbnail and Trigger to Cloud Storage.

You must upload one JPG or PNG image into the bucket, we will verify the thumbnail was created (after creating the function successfully). Use any JPG or PNG image, or use this image; download the image to your machine and then upload that file to your bucket. You will see a thumbnail image appear shortly afterwards (use REFRESH in the bucket details).

Solution (Graphical User Interface)

Solution (Command Line Interface)

Task 4: Remove the previous cloud engineer

Description

You will see that there are two users, one is your account (with the role of Owner) and the other is the previous cloud engineer (with the role of Viewer). We like to keep our security tight, so please remove the previous cloud engineer’s access to the project.

Solution (Graphical User Interface)

Solution (Command Line Interface)