Wednesday, June 12, 2024

Set Up and Configure a Cloud Environment in Google Cloud: Challenge Lab

Set Up

“Set Up and Configure a Cloud Environment in Google Cloud: Challenge Lab”


Task 1: Create development VPC manually
Create a VPC called griffin-dev-vpc with the following subnets only:

IP address block:
IP address block:
Click Check my progress to verify the objective.
Create development VPC manually

gsutil cp -r gs://cloud-training/gsp321/dm .

cd dm

nano prod-network.yaml

(here we have to change
region: us-east1)
^X and enter

gcloud deployment-manager deployments create griffin-prod --config prod-network.yaml

After this go to Navigation > Deployment Manger > Deployment 
click on griffin-prod … do nothing another checkpoint complete

Task3 Bastion host

Navigation > computer engine > VM instance

Click on create button after that 
Name : griffin-dev-db

scroll down to networking ..
Network tag = bastion

click on ‘add network interface’ button.

network = griffin-prod-vpc 
subnet same..
click on done

You will see two network interfaces

press create

now again navigate > VPC network > firewall
press create firewall rule

Name = allow-bastion-dev-ssh
Network = griffin-dev-vpc
Target Tag = bastion
source ip =
check on TCP and write 22

CREATE <- Click it 

At top click on create firewall rule for another rule

Name = allow-bastion-prod-ssh
Network = griffin-prod-vpc
Target Tag = bastion
source ip =
check on TCP and write 22

CREATE <- Click it

3rd checkpoint complete

task 4

Navigation > SQL >

create Instance

Choose my Sql

Instance ID = griffin-dev-db
Root Password = password
region – us-east1 (south..)
Zone – us-east1-b

press create
Finally created 🤩

press ‘connect using cloud shell’
then it will appear on shell

press enter and wait for 5 mintues..

enter password ..
this will appear
copy this and paste the below command : ( or copy from the lab )

GRANT ALL PRIVILEGES ON wordpress.* TO "wp_user"@"%" IDENTIFIED BY "stormwind_rules";


4th checkpoint clear

Task 5 :

navigation > kubernetes engine > cluster
press create cluster

name = griffin-dev
location type = zone = us-east1-b 

on left hand panel click :

Size = number of nodes =2

series = N1
machince = n1 std 4 (4vCPU)

Network = griffin-dev-vpc
node subnet = griffin-dev-wp

press create 

5th checkpoint compete

Task 6

on shell write 

gsutil cp -r gs://cloud-training/gsp321/wp-k8s .
cd wp-k8s/
nano wp-env.yaml

Now at the bottom change
username = wp_user
password = stormwind_rules
^X enter

now on kubernetes Engine > cluster
we have a row on griffin-dev press connet button RHS
then press ‘run on cloud shell’ 

after this write below command:
kubectl apply -f wp-env.yaml

then paste that
i.e “gcloud iam service-accounts keys create key.json \
kubectl create secret generic cloudsql-instance-credentials \
–from-file key.json”

checkpoint complete

Task 7

Navig > SQL >
press on griffin-dev-db 

In shell write:
nano wp-deployment.yaml
scroll down to

instances = [] = tcp:3306″, where [] is connection name from SQL overview 

^x enter

in shell write :
kubectl create -f wp-deployment.yaml
kubectl create -f wp-service.yaml

now on navigation > kubernetes Engine > service and Ingress
click on wordpress
click on external endpoints 

it will redirect to wordpress account

7th checkpoint complete

Task 8th

Navigation > monitoring > overview

LHS click on uptime check

    create uptime check

title = WordPress Uptime
Protocol = HTTP
Host Name = {i.p address} 
Path = /


then test

again next


8th checkpoint compete

Task 9

Navi > IAM & Admin > IAM
press Add+
copy paste username
new member = username
Role = Base > Editor
(Visited 540 times, 1 visits today)

Similar Posts