BCS601 �Cloud Computing �(With integrated Lab)
2024-2025
Title and Content Layout with List
1 | Creating a Virtual Machine: Configure and deploy a virtual machine with specific CPU and memory requirements in Google Cloud. OR Exploring AWS CloudShell and the AWS Cloud9 IDE |
2 | Getting Started with Cloud Shell and gcloud: Discover the use of gcloud commands to manage Google Cloud resources from Cloud Shell. OR Working with Amazon S3Orchestrating Serverless Functions with AWS Step Functions |
3 | Cloud Functions: Create and deploy a Cloud Function to automate a specific task based on a Cloud Storage event. OR Working with Amazon DynamoDB |
4 | App Engine: Deploy a web application on App Engine with automatic scaling enabled. OR Developing REST APIs with Amazon API Gateway |
5 | Cloud Storage: Qwikstart: Google Cloud Storage provides scalable and secure object storage for managing data, accessible via the Cloud Console or gsutil CLI. OR Creating Lambda Functions Using the AWS SDK for Python |
6 | Cloud SQL for MySQL: Discover how Google Cloud SQL for MySQL provide automated management and high availability for MySQL databases? OR Migrating a Web Application to Docker Containers |
7 | Cloud Pub/Sub: Experiment how Google Cloud Pub/Sub facilitate real-time messaging and communication between distributed applications. OR Caching Application Data with ElastiCache, Caching with Amazon CloudFronT, Caching Strategies |
8 | Multiple VPC Networks: Explore benefits of using multiple VPC networks in Google Cloud for organizing and isolating resources. OR Implementing CloudFront for Caching and Application Security |
9 | Cloud Monitoring: Discover how Cloud Monitoring help in tracking and analyzing the performance and health of cloud resources? OR Orchestrating Serverless Functions with AWS Step Functions |
10 | Kubernetes Engine: Qwik Start: Deploy a containerized application to a Kubernetes Engine cluster. OR Automating Application Deployment Using a CI/CD Pipeline |
Complex Experiments (Not for CIE)�
Cloud Shell
Lab 2 : Getting Started with Cloud Shell and gcloud: Discover the use of gcloud commands to manage Google Cloud resources from Cloud Shell.
How cloud shell works?
Authorizing with Cloud Shell
Pre-configured environment variables
Available Tools
Type | Tool |
Linux shell interpreters | bash�sh |
Linux utilities | Standard Debian system utilities |
gcloud CLI and tools | App Engine SDK�Google Cloud CLI including the gcloud CLI�gsutil for Cloud Storage |
Text editors | Emacs�Vim�Nano |
Build and package tools | Gradle�Helm�Make�Maven�Bazel�npm�nvm�pip�Composer |
Source control tools | Git�Mercurial� |
Additional tools | Docker�iPython�MySQL client�gRPC compiler�TensorFlow�Terraform |
Language | Version |
Java | JRE/JDK 17 (OpenJDK) |
Go | Latest |
Python | 3.12 |
Node.js | LTS |
Ruby | 3.2 |
PHP | 8.3 |
.NET Core | SDKs 6.0, 7.0, and 8.0 |
Activate Cloud Shell
1. Answer the following questions about Google Cloud
Ephemeral Mode
Adjust the display window
Authorize
Set/List project
preethisheba_h@cloudshell:~$ gcloud config list project
[core]
project (unset)
Your active configuration is: [cloudshell-25811]
preethisheba_h@cloudshell:~$ $HOME
-bash: /home/preethisheba_h: Is a directory
preethisheba_h@cloudshell:~$ gcloud config set project light-depot-450506-c6
Updated property [core/project].
preethisheba_h@cloudshell:~ (light-depot-450506-c6)$ gcloud config list project
[core]
project = light-depot-450506-c6
Your active configuration is: [cloudshell-25811]
preethisheba_h@cloudshell:~ (light-depot-450506-c6)$
Getting Help
Using gcloud commands
preethisheba_h@cloudshell:~ (light-depot-450506-c6)$ gcloud config list
[accessibility]
screen_reader = True
[component_manager]
disable_update_check = True
[compute]
gce_metadata_read_timeout_sec = 30
[core]
account = preethisheba.h@cmrit.ac.in
disable_usage_reporting = False
project = light-depot-450506-c6
[metrics]
environment = devshell
Your active configuration is: [cloudshell-25811]
Create a Compute Engine from gshell
preethisheba_h@cloudshell:~ (light-depot-450506-c6)$ gcloud init
Welcome! This command will take you through the configuration of gcloud.
…
Pick configuration to use:
[1] Re-initialize this configuration [cloudshell-25811] with new settings
[2] Create a new configuration
Please enter your numeric choice: 1
Your current configuration has been set to: [cloudshell-25811]
…
Checking network connection...done.
Reachability Check passed.
Network diagnostic passed (1/1 checks passed).
---
Select an account:
[1] preethisheba.h@cmrit.ac.in
[2] Sign in with a new Google Account
[3] Skip this step
Please enter your numeric choice: 1
You are signed in as: [preethisheba.h@cmrit.ac.in].
Pick cloud project to use:
[1] light-depot-450506-c6
[2] Enter a project ID
[3] Create a new project
Please enter numeric choice or text value (must exactly match list item): 1
Your current project has been set to: [light-depot-450506-c6].
Do you want to configure a default Compute Region and Zone? (Y/n)? Y
Which Google Compute Engine zone would you like to use as project default?
If you do not specify a zone via a command line flag while working with Compute Engine resources,
the default is assumed.
[7] us-central1-c
[8] us-central1-a
[13] us-west1-a
Please enter numeric choice or text value (must exactly match list item): 7
Gcloud compute instances create
Machine family
Machine family, series, type
Predefined machine types�
Shared-core machine types�
Machine family and series recommendations
General-purpose workloads | |||
N4, N2, N2D, N1 | C4A, C4, C3, C3D | E2 | Tau T2D, Tau T2A |
Balanced price/performance across a wide range of machine types | Consistently high performance for a variety of workloads | Day-to-day computing at a lower cost | Best per-core performance/cost for scale-out workloads |
Medium traffic web and app servers Containerized microservices Business intelligence apps Virtual desktops CRM applications Development and test environments Batch processing Storage and archive | High traffic web and app servers DatabasesIn-memory caches Ad servers Game Servers Data analytics Media streaming and transcoding CPU-based ML training and inference | Low-traffic web servers Back office apps Containerized microservices Microservices Virtual desktops Development and test environments | Scale-out workloads Web serving Containerized microservices Media transcoding Large-scale Java applications |
Gcloud compute instances create
E2 shared-core
Create VM using gcloud CLI
preethisheba_h@cloudshell:~ (light-depot-450506-c6)$ gcloud compute instances create my-vm \
--machine-type=e2-micro
NAME: my-vm
ZONE: us-central1-c
MACHINE_TYPE: e2-micro
PREEMPTIBLE:
INTERNAL_IP: 10.128.0.5
EXTERNAL_IP: 34.66.137.168
Starting and stopping your instance
View VM details and status
$ gcloud compute instances list
NAME: my-vm
ZONE: us-central1-c
MACHINE_TYPE: e2-micro
PREEMPTIBLE:
INTERNAL_IP: 10.128.0.5
EXTERNAL_IP: 34.66.137.168
STATUS: RUNNING
$gcloud compute instances describe my-vm
canIpForward: false
cpuPlatform: Intel Broadwell
creationTimestamp: '2025-02-15T04:35:10.002-08:00'
deletionProtection: false
disks:
- architecture: X86_64
autoDelete: true
boot: true
deviceName: persistent-disk-0
diskSizeGb: '10'
Connect to a VM
gcloud compute ssh my-vm
Updating project ssh metadata...working.Updated
Updating project ssh metadata...done.
Waiting for SSH key to propagate.
Warning: Permanently added 'compute.1285378715733014290' (ED25519) to the list of known hosts.
Linux my-vm 6.1.0-29-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.123-1 (2025-01-02) x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
preethisheba_h@my-vm:~$ whoami
preethisheba_h
preethisheba_h@my-vm:~$ lscpu
Shutdown a VM
preethisheba_h@my-vm:$ exit
logout
Connection to 34.66.137.168 closed.
gcloud beta compute instances stop my-vm --discard-local-ssd=true
Viva