Posts

GCP Compute Engine — Common VM Actions

  GCP Compute Engine — Common VM Actions 1. VM Metadata Every Compute Engine VM has a metadata server . Think of it as: Metadata server = a place where a VM can get information about itself. For example, a VM can retrieve information such as: VM name Zone Region Internal IP External IP Other instance information Why is this useful? It is especially useful with startup scripts and shutdown scripts . For example: VM starts ↓ Startup script runs ↓ Script asks Metadata Server: "What is my external IP?" ↓ Metadata Server returns the IP ↓ Script uses that IP The important part is that the script doesn't need you to manually enter the VM's IP address . Example Suppose you create 10 VMs. Instead of writing: VM1 → use 34.x.x.x VM2 → use 35.x.x.x VM3 → use 34.x.x.x you can create one reusable startup script : Get my external IP from metadata ↓ Use that IP to configure the application The same script can run on every VM. Key...

Disk Concept -Boot Disk and Persistent Disk

  Google Cloud — Easy Study Notes Essential Google Cloud Infrastructure: Foundation 1. What is Google Cloud? Google Cloud is basically a collection of computing, storage, networking, database, security and other IT services provided by Google. Instead of buying physical servers yourself, you can rent/use Google's infrastructure. Simple example Traditional company: Company ↓ Buy physical servers ↓ Install OS ↓ Configure network ↓ Maintain hardware ↓ Run application Google Cloud: You ↓ Choose Google Cloud service ↓ Configure it ↓ Run your application Google manages the underlying physical infrastructure. 2. Cloud Computing — Basic Idea Cloud computing means: Using computing resources over the internet instead of owning all the physical hardware yourself. You can get: CPU RAM Storage Network Databases Kubernetes Application platforms Security services when you need them. 3. Google Cloud Projects A Project is one of the most important concepts in Google Cloud. Think of a...

Compute Engine: CPU, Memory & Machine Types

GCP Study Notes — Compute Engine: CPU, Memory & Machine Types 1. Three ways to create/configure a VM When creating a Compute Engine VM, you can use: Google Cloud Console — GUI, easiest for beginners. Cloud Shell / gcloud CLI — useful for automation and repeatable commands. REST API — useful for programmatic and complex automation. Recommended approach If you're not sure about the CLI/API configuration: Create the VM once in the Console → then get the equivalent gcloud command or REST request. This helps because the Console gives you: Dropdowns for available machine types Valid CPU/memory combinations Correct configuration Less chance of typing mistakes 2. What is a Machine Type? A machine type defines the resources given to your VM. Mainly: vCPU → processing power Memory/RAM → temporary working space For example: VM ├── 4 vCPUs └── 16 GB RAM Think of it like buying a computer: vCPU = processor capacity Memory = RAM 3. Machine Family → Series → Machine Type This hierarch...