The Basics of Google Cloud Compute: Challenge Lab


 

Here's a step-by-step walkthrough for all three tasks. You can do this via the Console (Cloud Shell commands included as a faster alternative for each step).

Task 1: Create the Cloud Storage bucket

Console:

  1. Go to Cloud Storage → Buckets → Create
  2. Name: qwiklabs-gcp-01-f44fa838a767-bucket
  3. Location type: Multi-region → select US
  4. Leave storage class as Standard, access control as default
  5. Click Create

Or via Cloud Shell:

bash
gcloud storage buckets create gs://qwiklabs-gcp-01-f44fa838a767-bucket --location=US

Click Check my progress after it's created.


Task 2: Create the VM + persistent disk

Step A — Create the VM

Console:

  1. Go to Compute Engine → VM instances → Create Instance
  2. Name: my-instance
  3. Region: us-west1, Zone: us-west1-a
  4. Machine configuration: Series E2, Machine type e2-medium
  5. Boot disk → Click Change:
    • Operating system: Debian
    • Version: Debian GNU/Linux 12 (bookworm)
    • Boot disk type: Balanced persistent disk
    • Size: 10 GB
    • Click Select
  6. Under Firewall, check Allow HTTP traffic
  7. Click Create

Or via Cloud Shell:

bash
gcloud compute instances create my-instance \
  --zone=us-west1-a \
  --machine-type=e2-medium \
  --image-family=debian-12 \
  --image-project=debian-cloud \
  --boot-disk-type=pd-balanced \
  --boot-disk-size=10GB \
  --tags=http-server

Step B — Create the persistent disk

Console:

  1. Go to Compute Engine → Disks → Create Disk
  2. Name: mydisk
  3. Region: us-west1, Zone: us-west1-a (must match instance zone)
  4. Disk type: Standard/Balanced (either works, requirement doesn't specify)
  5. Size: 200 GB
  6. Click Create

Or via Cloud Shell:

bash
gcloud compute disks create mydisk \
  --size=200GB \
  --zone=us-west1-a

Step C — Attach the disk to the instance

Console:

  1. Go to Compute Engine → VM instances
  2. Click my-instance → click Edit
  3. Under Additional disks, click Attach existing disk
  4. Select mydisk
  5. Click Save

Or via Cloud Shell:

bash
gcloud compute instances attach-disk my-instance \
  --disk=mydisk \
  --zone=us-west1-a

Click Check my progress after attaching.

Note: attaching the disk doesn't format/mount it — that's not required by the task, just attachment. If you want it usable inside the OS, you'd need to SSH in, format it, and mount it, but the lab only asks you to attach it.


Task 3: Install NGINX

  1. In the Console, go to Compute Engine → VM instances
  2. Click the SSH button next to my-instance to open a browser SSH session
  3. Run the following commands:
bash
sudo apt-get update
sudo apt-get install -y nginx
sudo systemctl status nginx
  1. Confirm the output shows active (running). If it's not started:
bash
sudo systemctl start nginx
sudo systemctl enable nginx

Click Check my progress.


Test the web app

  1. Go back to Compute Engine → VM instances
  2. Click the External IP link next to my-instance (or copy it into a new tab as http://EXTERNAL_IP/)
  3. You should see the "Welcome to nginx!" default page

If it doesn't load:

  • Confirm you selected Allow HTTP traffic on the VM (edit the instance and check the firewall checkbox if missed — this creates a firewall rule allowing port 80 from tag http-server)
  • Confirm NGINX is running (sudo systemctl status nginx)

That covers all three tasks and the final verification. Let me know if any "Check my progress" step comes back red and I can help troubleshoot.

Post a Comment

Ad Space

Responsive Advertisement