################################ 11.0. 1 What is Cloud Computing? ################################ ======================================= The Simple Answer: From DVDs to Netflix ======================================= Imagine you want to watch a movie. You have two options: **Option 1: The Old Way (Buy a DVD)** - Go to a store, pay $20 to **own** a physical disc. - You are responsible for storing it, maintaining it, and protecting it from scratches. - If you want a new movie, you have to buy another disc. **Option 2: The New Way (Stream on Netflix)** - Pay a monthly fee for **access** to thousands of movies. - Watch instantly, from anywhere, on any device. - The provider (Netflix) handles all storage, updates, and maintenance. **Cloud computing is the "Netflix model" for technology.** Instead of buying and managing your own physical servers (the "DVDs"), you **rent** computing power, storage, and services from a cloud provider. You get instant access and only pay for what you use. ======================== The Technical Definition ======================== .. note:: **Cloud computing** is the on-demand delivery of IT resources over the Internet with pay-as-you-go pricing. Let's break that down: - **On-Demand**: Get resources in minutes, not months. No waiting for hardware to be ordered and installed. - **IT Resources**: All the building blocks you need—virtual servers, storage, databases, networking, AI services, and more. - **Over the Internet**: Access and manage your infrastructure from anywhere in the world. - **Pay-As-You-Go**: Pay only for what you use, like an electricity bill. Stop paying the moment you turn it off. ================================================ The Evolution: From Server Rooms to Global Scale ================================================ How did we get here? **1. The 1990s: The Server Room Era** - Every company had its own "server closet" with expensive, noisy hardware. - **You managed everything**: hardware, cooling, power, security, and software. - Scaling up meant buying more hardware, a slow and costly process. **2. The 2000s: The Virtualization Era** - **Virtual Machines (VMs)** allowed one physical server to run multiple virtual "computers." - This improved efficiency but didn't solve the core problem: you still owned and managed all the hardware. **3. 2006: The Cloud is Born** - Amazon Web Services (AWS) launched EC2 and S3, offering elastic compute and storage as services - This marked the shift from **owning hardware** to **renting services** - Key insight: Amazon's internal infrastructure for peak holiday traffic was underutilized most of the year .. note:: **Historical Context**: AWS wasn't the first cloud service (Salesforce launched in 1999), but EC2/S3 created the modern Infrastructure-as-a-Service model that dominates today. **4. Today: Cloud is the Standard** - Cloud is the default choice for new applications, from startups to global enterprises. - It powers everything from your favorite streaming services and mobile apps to banking and healthcare systems. ========================================== From Your Local Docker to the Global Cloud ========================================== This is where your journey connects. You've already mastered the core concepts that power the cloud. **Remember Your Docker & Kubernetes Workflow?** .. code-block:: text Your Local Machine: ┌────────────────────────────────────┐ │ 1. Write a Dockerfile │ │ 2. Build an image: `docker build` │ │ 3. Run a container: `docker run` │ │ 4. Orchestrate with `kubectl` │ └────────────────────────────────────┘ **Now, Let's Take it to the Cloud:** .. code-block:: text The Cloud-Native Workflow: ┌──────────────────────────────────────────┐ │ 1. Your code and Dockerfile (no changes!)│ │ 2. CI/CD pipeline builds the image │ │ 3. Image is pushed to a Cloud Registry │ │ 4. `kubectl apply` deploys to a cluster │ │ spanning multiple data centers │ └──────────────────────────────────────────┘ The cloud simply provides a globally-scaled, resilient, and managed environment to run the containers and Kubernetes deployments you already know how to build. ================================== Your Python CLI App: The Next Step ================================== Let's trace the path of the application you've been working on: **Current State (Your Laptop):** - A Python application running inside a Docker container. - Managed by `kubectl` and `minikube` or a similar local cluster. - Code is stored in a GitHub repository. **Cloud-Native State (Global Deployment):** - The **same application** and **same Docker image**. - A **GitHub Actions pipeline** automatically builds and tests your code. - The image is stored in a secure, private **cloud container registry** (like AWS ECR, Azure ACR, or Google Artifact Registry). - The container is deployed to a **managed Kubernetes service** (EKS, AKS, or GKE) that handles the complexity of running master nodes, scaling, and failover. - Your application is now accessible to users worldwide, protected by a cloud load balancer and firewall. .. note:: **Key Insight:** The cloud doesn't force you to relearn everything. It empowers you to apply your existing skills in Docker, Kubernetes, and CI/CD at a massive, global scale. You already have the keys—now you'll learn how to drive the car.