chapter 1.1 Creating Your Personal Google Cloud Platform (GCP) Account and Setting Up a Virtual Machine (VM)
How to Create Your Personal GCP (Google Cloud Platform) Account:
Step 1: Go to www.console.cloud.google.com.
Step 2: Sign in with your Gmail account.
Step 3: Activate the free $300 credits provided by GCP to encourage learning GCP. These credits are typically enough for learning GCP services.
Step 4: While activating, add the required information to activate the offer.
Congratulations! After completing these steps, you will be able to access the GCP console.
Now, let's proceed with creating a virtual machine (VM) instance on GCP:
Select a Project:
Go to your GCP console.
Select or create a GCP project.
Create a VM Instance:
Navigate to "Compute Engine" and select "VM instances."
Create a VM instance with the following characteristics:
Boot Disk:
Change the space to 15 GB.
Use a new standard persistent disk. These disks do not require high I/O performance or very low latency and are less expensive.
Machine Type (e2 medium):
2 vCPUs
4GB memory
1 core
Used for general purposes
Firewall:
Allow HTTPS traffic (allows secure web traffic).
Allow HTTP traffic (allows more common incoming traffic).
Access Scopes:
- Allow default scopes (default GCP access settings selected).
Now, create the VM instance by clicking the "Create" button. This VM instance is not using your local computer; it is using GCP's data center infrastructure.
Cloud Firewalls:
Cloud providers offer cloud-based firewall services to protect virtual machines and resources hosted in the cloud.
These firewalls are configured and managed through the cloud provider's interface.
After creating a VM instance, you can proceed to create a new firewall rule:
Firewall Rule Settings:
Name: inbound-sample-ssh
Select port as TCP points 22
IPv4 address: 0.0.0.0/0 (It means it is a wildcard, allowing any IP address or all destinations to be reachable).
Now, you need to SSH (Secure Shell) into your VM. SSH is a protocol that provides a secure and encrypted way to access and manage remote computers. When you SSH into a VM, all communication between your local computer and the VM is encrypted.
Understanding Compute Instances, Persistent Disks, and Firewall:
Compute Instance in a Zone (Zone in a Region):
Compute instances are virtual machines running your applications.
Different sizes of compute instances are available based on your needs.
They are owned by GCP, so you cannot directly make changes to these instances like you would with your own servers.
Persistent Disks:
VMs need storage to store and run applications. This storage is known as persistent disks.
SSD (Solid State Drive) persistent disks are commonly used.
Firewall:
Firewalls decide which applications on the instance can be accessed by which IP addresses.
They control access to your VM instances, allowing multiple users to have access to the application.
How to Create a VM:
Search for "Compute Engine."
Select "Create VM instance" and set the settings according to your needs.