Skip to content

Instantly share code, notes, and snippets.

@nov05
Created May 11, 2026 09:15
Show Gist options
  • Select an option

  • Save nov05/fd9ce5e120406ad1784a78e8af3c8d9f to your computer and use it in GitHub Desktop.

Select an option

Save nov05/fd9ce5e120406ad1784a78e8af3c8d9f to your computer and use it in GitHub Desktop.

🟒 The Basics of Google Cloud Compute: Challenge Lab (ARC120)

https://www.skills.google/games/7174/labs/44441 https://github.com/nov05/gcp-skills-boost/commit/7633628bcd35af87a8e2d5b794ccfeb97317575d

βœ… Test result

Welcome to Cloud Shell! Type "help" to get started, or type "gemini" to try prompting with Gemini CLI.
Your Cloud Platform project in this session is set to qwiklabs-gcp-00-529586269018.
Use `gcloud config set project [PROJECT_ID]` to change to a different project.
student_04_6567dc6e0519@cloudshell:~ (qwiklabs-gcp-00-529586269018)$ rm -f abhishekARC120.sh
curl -LO https://raw.githubusercontent.com/nov05/gcp-skills-boost/refs/heads/dev/The%20Basics%20of%20Google%20Cloud%20Compute%3A%20Challenge%20Lab/abhishekARC120.sh
sudo chmod +x abhishekARC120.sh
./abhishekARC120.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7030  100  7030    0     0  31319      0 --:--:-- --:--:-- --:--:-- 31383
Starting Execution

**********************************************************************
* Welcome to Dr. Abhishek Cloud Tutorial!                            *
*                                                                    *
* Please do like, share and subscribe to the channel:                *
* https://www.youtube.com/@drabhishek.5460/videos                    *
*                                                                    *
* Thank you for your support!                                        *
**********************************************************************

Fetching Project Details...
πŸ”Ή  Project ID: qwiklabs-gcp-00-529586269018
πŸ”Ή  Zone detected: us-west1-b
πŸ”Ή  Region detected: us-west1

Configuration Summary:
  Project ID: qwiklabs-gcp-00-529586269018
  Zone: us-west1-b
  Region: us-west1

Task 1: Creating Cloud Storage bucket...
Google recommends using Gcloud storage CLI (https://docs.cloud.google.com/storage/docs/discover-object-storage-gcloud) instead of gsutil. Please refer to migration guide (https://docs.cloud.google.com/storage/docs/gsutil-transition-to-gcloud) for assistance.
Creating gs://qwiklabs-gcp-00-529586269018-bucket/...
βœ…  Bucket created: qwiklabs-gcp-00-529586269018-bucket

Task 2: Creating Compute Engine instance...
Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-00-529586269018/zones/us-west1-b/instances/my-instance].
NAME: my-instance
ZONE: us-west1-b
MACHINE_TYPE: e2-medium
PREEMPTIBLE: 
INTERNAL_IP: 10.138.0.2
EXTERNAL_IP: 8.229.113.177
STATUS: RUNNING
βœ…  Instance 'my-instance' created

Creating persistent disk mydisk...
Created [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-00-529586269018/zones/us-west1-b/disks/mydisk].
NAME: mydisk
ZONE: us-west1-b
SIZE_GB: 200
TYPE: pd-standard
STATUS: READY

New disks are unformatted. You must format and mount a disk before it
can be used. You can find instructions on how to do this at:

For Linux: https://cloud.google.com/compute/docs/disks/format-mount-disk-linux
For Windows: https://cloud.google.com/compute/docs/disks/format-mount-disk-windows

βœ…  Disk 'mydisk' created

Attaching disk to instance...
Updated [https://www.googleapis.com/compute/v1/projects/qwiklabs-gcp-00-529586269018/zones/us-west1-b/instances/my-instance].
βœ…  Disk attached to instance

Waiting for instance to be ready...

Task 3: Installing NGINX web server...
Copying installation script to instance...
WARNING: The private SSH key file for gcloud does not exist.
WARNING: The public SSH key file for gcloud does not exist.
WARNING: You do not have an SSH key for gcloud.
WARNING: SSH keygen will be executed to generate a key.
Generating public/private rsa key pair.
Your identification has been saved in /home/student_04_6567dc6e0519/.ssh/google_compute_engine
Your public key has been saved in /home/student_04_6567dc6e0519/.ssh/google_compute_engine.pub
The key fingerprint is:
SHA256:3lm+cBbNeh3f8Kt4EXYqZFqBeVvH7lMJL6/wSiOpUhY student_04_6567dc6e0519@cs-845483092920-default
The key's randomart image is:
+---[RSA 3072]----+
|          o   .  |
|         o o o o |
|          . + = .|
|       E   = * =.|
|        S = + @..|
|       + o.* = B+|
|      o .o+oO + *|
|     .  . o+o*  .|
|      ..   o+... |
+----[SHA256]-----+
Warning: Permanently added 'compute.5326105942262817418' (ED25519) to the list of known hosts.
prepare_disk.sh                                                                                                                                              100%  148   116.1KB/s   00:00    
Installing NGINX on instance...

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 file:/etc/apt/mirrors/debian.list Mirrorlist [30 B]
Get:5 file:/etc/apt/mirrors/debian-security.list Mirrorlist [39 B]
Get:7 https://packages.cloud.google.com/apt google-compute-engine-bookworm-stable InRelease [1321 B]
Hit:2 https://deb.debian.org/debian bookworm InRelease
Get:3 https://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:4 https://deb.debian.org/debian bookworm-backports InRelease [59.4 kB]
Get:6 https://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Hit:8 https://packages.cloud.google.com/apt cloud-sdk-bookworm InRelease
Get:9 https://deb.debian.org/debian bookworm-backports/main Sources.diff/Index [63.3 kB]
Get:10 https://deb.debian.org/debian bookworm-backports/main amd64 Packages.diff/Index [63.3 kB]
Get:11 https://deb.debian.org/debian bookworm-backports/main Translation-en.diff/Index [63.3 kB]
Get:15 https://deb.debian.org/debian bookworm-backports/main Sources T-2026-05-11-0202.39-F-2026-05-06-0202.02.pdiff [16.1 kB]
Get:16 https://deb.debian.org/debian bookworm-backports/main amd64 Packages T-2026-05-10-2000.41-F-2026-05-06-0801.51.pdiff [5541 B]
Get:15 https://deb.debian.org/debian bookworm-backports/main Sources T-2026-05-11-0202.39-F-2026-05-06-0202.02.pdiff [16.1 kB]
Get:17 https://deb.debian.org/debian bookworm-backports/main Translation-en T-2026-05-10-1400.48-F-2026-05-09-2018.59.pdiff [3665 B]
Get:16 https://deb.debian.org/debian bookworm-backports/main amd64 Packages T-2026-05-10-2000.41-F-2026-05-06-0801.51.pdiff [5541 B]
Get:17 https://deb.debian.org/debian bookworm-backports/main Translation-en T-2026-05-10-1400.48-F-2026-05-09-2018.59.pdiff [3665 B]
Get:12 https://deb.debian.org/debian-security bookworm-security/main Sources [199 kB]
Get:13 https://deb.debian.org/debian-security bookworm-security/main amd64 Packages [303 kB]
Get:14 https://deb.debian.org/debian-security bookworm-security/main Translation-en [186 kB]
Fetched 1068 kB in 1s (910 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  nginx-common
Suggested packages:
  fcgiwrap nginx-doc ssl-cert
The following NEW packages will be installed:
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (you may need to install the Term::ReadLine module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype
Created symlink /etc/systemd/system/multi-user.target.wants/nginx.service β†’ /lib/systemd/system/nginx.service.
Setting up nginx (1.22.1-9+deb12u4) ...
Upgrading binary: nginx.
Processing triggers for man-db (2.11.2-2) ...
Synchronizing state of nginx.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable nginx
NGINX installation completed


==================================================
./abhishekARC120.sh: line 183: syntax error near unexpected token `('
./abhishekARC120.sh: line 183: `echo "  Task 1: Cloud Storage bucket created (${BUCKET_NAME})"'
student_04_6567dc6e0519@cloudshell:~ (qwiklabs-gcp-00-529586269018)$ 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment