Introduction to Cloud Computing and GCP
# CHAPTER 1
Introduction to Cloud Computing and GCP
1. Introduction
Welcome to the modern era of infrastructure! Ten years ago, if you wanted to launch a website, you had to buy a physical server, plug it into a wall, install an operating system, and pray it didn't overheat. Today, you can rent a supercomputer from Google for pennies an hour. In this chapter, we will demystify the buzzwords surrounding Cloud Computing and introduce you to the Google Cloud Platform (GCP)—the exact same infrastructure that powers Google Search and YouTube.2. Learning Objectives
By the end of this chapter, you will be able to:- Define Cloud Computing and explain its core benefits.
- Differentiate between IaaS, PaaS, and SaaS cloud models.
- Understand Google Cloud's global infrastructure (Regions vs. Zones).
- Navigate the Google Cloud Console.
- Comprehend the basics of GCP's pay-as-you-go pricing model.
3. Beginner-Friendly Explanation
Imagine you need a car to get to work.- On-Premise (The Old Way): You buy a car. You pay for the car, the insurance, the gas, the maintenance, and a garage to store it. Even when you are sleeping and the car is parked, you are still paying for it.
- Cloud Computing (The New Way): You use Uber. You only pay for the exact distance you travel. When you step out of the car, you stop paying. You don't care about maintenance, gas, or parking.
Cloud computing is renting computers (servers, databases, networks) over the internet on a "pay-as-you-go" basis.
4. The Cloud Service Models
You will hear these three acronyms constantly:- 1. IaaS (Infrastructure as a Service): Google rents you raw, empty servers. You have to install the OS and the software yourself. (Example: GCP Compute Engine). *Maximum control, maximum effort.*
- 2. PaaS (Platform as a Service): Google gives you a pre-configured environment. You just upload your Python or Node.js code, and Google runs it. (Example: GCP App Engine). *Medium control, medium effort.*
- 3. SaaS (Software as a Service): Google provides a fully finished, ready-to-use application. (Example: Gmail, Google Docs). *Zero control, zero effort.*
5. GCP Global Infrastructure
Google does not have one massive computer in California. They have massive data centers spread across the globe.-
Regions: A specific geographical location (e.g.,
us-central1in Iowa,europe-west1in Belgium).
-
Zones: Isolated areas *within* a region (e.g.,
us-central1-a,us-central1-b).
*Why do we care?* If a tornado destroys Zone A, your application stays online because you strategically placed a backup server in Zone B!
6. The Google Cloud Console
The GCP Console is the web-based graphical interface where you will spend most of your time. It is located atconsole.cloud.google.com. It is divided into:
- Top Bar: Search bar (the fastest way to find a service) and the Cloud Shell icon (a built-in terminal).
- Left Navigation Menu: The "Hamburger Menu" contains every single service GCP offers (Compute, Storage, Networking, etc.).
- Main Dashboard: Shows your current project, billing estimates, and API request charts.
7. Mini Project: Create Your Account and Explore
Let's get our hands dirty by creating your cloud account.Step-by-Step Tutorial:
-
1.
Go to
cloud.google.comand click "Get started for free".
- 2. Sign in with a Gmail account.
- 3. You will be asked for a credit card. Do not panic. Google requires this to prove you are not a robot creating spam accounts. They will give you $300 in free credits and will *never* automatically charge your card when the credits run out without your explicit permission.
-
4.
Once in the dashboard, click the project dropdown at the top (next to the Google Cloud logo) and create a New Project named
my-first-gcp-project.
- 5. Use the top search bar to search for "Compute Engine" and click on it. (We won't build anything yet, just explore the interface!).
8. Real-World Scenarios
A retail startup is preparing for a massive Black Friday sale. Instead of buying $50,000 worth of physical servers that will sit unused for the other 11 months of the year, they use Google Cloud. On Thursday, they rent 100 servers (IaaS). On Saturday, when the sale is over, they delete 98 servers, instantly stopping the billing.9. Best Practices
- Projects are Everything: In GCP, every single resource (a server, a database, a network) MUST belong to a Project. Projects act as isolated containers for billing and permissions. Never mix production servers and testing servers in the same project!
10. Cost Optimization Tips
- Turn it off! Cloud billing is calculated by the second. If you build a test server on a Friday and leave it running over the weekend without using it, you are throwing money away. Always delete resources when you are done practicing.
11. CLI Examples
While we use the web console as beginners, professionals use the Google Cloud CLI (gcloud).
To list all the projects you own via terminal:
12. Exercises
- 1. Explain the difference between a GCP Region and a GCP Zone.
- 2. If you want to host a WordPress blog but do not want to manage OS updates or security patches, should you use IaaS, PaaS, or SaaS?
13. FAQs
Q: Is GCP better than AWS or Azure? A: All three are incredible. AWS has the biggest market share. Azure is popular in Microsoft-heavy corporate environments. GCP is famously beloved by developers for its clean interface, superior data analytics (BigQuery), and world-class Kubernetes integration (GKE).14. Interview Questions
- Q: Contrast the shared responsibility models of Infrastructure as a Service (IaaS) and Platform as a Service (PaaS).
- Q: Explain the concept of High Availability. How do GCP Regions and Zones facilitate the design of highly available architectures?