← Back | Azure Cloud Fundamentals
Week 4
Week 4 · Cloud & DevOps

Azure Cloud Fundamentals

Microsoft Azure is the second largest cloud provider. Used by thousands of enterprises in India and worldwide. Understanding Azure opens doors to cloud engineering roles worth ₹12–25 LPA.

☁️ Microsoft Azure App Service Azure SQL
🧠
Concept
What is Cloud Computing?
Before cloud: Every company had a room full of servers. They had to buy hardware, maintain it, upgrade it, cool it, secure it. If traffic spiked, they were stuck. If traffic dropped, hardware was wasted.

Cloud computing = renting compute power, storage, and services from a company (Azure, AWS, GCP) that already manages the infrastructure. You pay only for what you use — like electricity or mobile data.

Key Benefits

  • Elasticity — scale up when traffic spikes, scale down when it drops
  • Pay-as-you-go — no upfront hardware cost, pay only for usage
  • Global reach — deploy in data centres across the world in minutes
  • Managed services — Azure manages OS patches, backups, high availability
  • Speed — provision a new server in 2 minutes, not 2 weeks
📦
Core Concept
IaaS, PaaS, and SaaS
The most asked cloud interview topic
Pizza analogy:
IaaS = buying ingredients, cooking at home. You manage everything.
PaaS = delivery pizza dough + toppings to your door. You just bake it (your app).
SaaS = ordering a delivered, ready pizza. You just eat it (no management).
ModelYou manageProvider managesAzure Example
IaaS — Infrastructure as a ServiceOS, Runtime, App, DataHardware, Network, StorageAzure Virtual Machines
PaaS — Platform as a ServiceApp, DataOS, Runtime, HardwareAzure App Service
SaaS — Software as a ServiceYour data onlyEverythingMicrosoft 365, Azure DevOps
For developers: You'll mostly work with PaaS services (App Service, Azure SQL, Azure Functions) — you deploy your code and Azure handles the infrastructure.
🖥️
Step 1
Azure Portal & Free Account
1

Create a free Azure account

Go to azure.microsoft.com/free and sign up. You get:
₹15,000 (USD 200) in credits for 30 days + 12 months of free popular services (App Service B1, SQL Database, etc.).

2

Explore the portal

Log in at portal.azure.com. Key areas: Home → All resources, Resource Groups, the search bar at the top (find any service quickly), and the Cost Management section.

Cost alert! Set up a budget alert immediately. Go to Cost Management + Billing → Budgets → Create. Set a monthly budget of ₹500 with email alerts at 80% and 100%.
🗺️
Overview
Key Azure Services for Java Developers
🚀

App Service

Host your Spring Boot app. Managed Tomcat, auto-scaling, HTTPS included.

🗄️

Azure SQL Database

Managed PostgreSQL or SQL Server. Automatic backups, scaling.

AKS

Azure Kubernetes Service. Managed Kubernetes cluster for containers.

📦

Container Registry

Store Docker images. Like Docker Hub but private, integrated with AKS.

Azure Functions

Serverless. Run code in response to events without managing servers.

🔑

Key Vault

Securely store secrets, API keys, and certificates. Never hardcode passwords.

📁
Concept
Resource Groups
A Resource Group is like a project folder on your computer. Everything for one project (App Service + SQL Database + Storage + Key Vault) lives in one Resource Group. When the project ends, you delete the Resource Group and all resources inside are deleted together — no orphaned resources, no surprise bills.
# Azure CLI — create a resource group az group create \ --name student-api-rg \ --location eastus # List all resource groups az group list --output table # Delete entire resource group (and all resources inside!) az group delete --name student-api-rg --yes
Naming convention: Use <project>-<environment>-rg. E.g., student-api-dev-rg, student-api-prod-rg. One resource group per environment.
🚀
Step 2
Deploy Spring Boot with Azure App Service
1

Build the JAR

mvn clean package -DskipTests # Creates: target/student-api-0.0.1-SNAPSHOT.jar
2

Create App Service via Azure CLI

# Create App Service Plan (defines the VM size) az appservice plan create \ --name student-api-plan \ --resource-group student-api-rg \ --sku B1 \ --is-linux # Create the Web App az webapp create \ --name student-api-app \ --resource-group student-api-rg \ --plan student-api-plan \ --runtime "JAVA:21-java21"
3

Deploy the JAR

az webapp deploy \ --resource-group student-api-rg \ --name student-api-app \ --src-path target/student-api-0.0.1-SNAPSHOT.jar \ --type jar

Your app is live at: https://student-api-app.azurewebsites.net

🗄️
Step 3
Azure SQL Database (PostgreSQL)
# Create Azure Database for PostgreSQL az postgres flexible-server create \ --resource-group student-api-rg \ --name student-api-db \ --location eastus \ --admin-user adminuser \ --admin-password YourSecurePassword123! \ --sku-name Standard_B1ms \ --storage-size 32
application-prod.properties (for production)
spring.datasource.url=jdbc:postgresql://student-api-db.postgres.database.azure.com:5432/postgres spring.datasource.username=adminuser@student-api-db spring.datasource.password=${DB_PASSWORD} # from Key Vault or env var spring.jpa.hibernate.ddl-auto=validate
Never hardcode passwords in application.properties! Use Azure Key Vault references or environment variables set in App Service Configuration → Application Settings.
🎯
Interview Prep
Common Interview Questions
QWhat is cloud computing? What are its types?

Cloud computing is the delivery of computing services (servers, storage, databases, networking, software) over the internet on a pay-as-you-go basis.

Public cloud — resources owned by cloud provider, shared among customers. (Azure, AWS, GCP)

Private cloud — dedicated infrastructure for one organisation. More control, more cost.

Hybrid cloud — combination of public and private. Sensitive data on private, scalable workloads on public.

QWhat is the difference between IaaS, PaaS, and SaaS?

IaaS (Infrastructure as a Service) — provides virtualised computing resources. You manage OS, runtime, apps. Example: Azure Virtual Machines. Like renting a blank computer in the cloud.

PaaS (Platform as a Service) — provides a platform to develop and deploy apps. Provider manages OS and runtime. You manage only your app and data. Example: Azure App Service, Google App Engine.

SaaS (Software as a Service) — fully managed software accessed via browser. You just use it. Example: Gmail, Salesforce, Microsoft 365.

QWhat is a Resource Group in Azure?

A Resource Group is a logical container that holds related Azure resources for an application or project. All resources that share the same lifecycle are grouped together.

Benefits: manage all resources as a unit (deploy, monitor, delete), apply access controls at group level, see aggregate costs per project, group by environment (dev-rg, prod-rg).

QWhat is Azure App Service?

Azure App Service is a PaaS offering for hosting web applications, REST APIs, and mobile backends. For Java developers, it manages Tomcat/Java runtime, HTTPS certificates, custom domains, auto-scaling, and deployment slots (staging → production).

You just deploy your JAR file — no server management needed. It can auto-scale horizontally based on CPU/memory thresholds.

QHow do you secure secrets like database passwords in a cloud application?

Never hardcode secrets in code or application.properties committed to Git. Use:

  • Azure Key Vault — store secrets, retrieve via managed identity (no passwords needed)
  • Environment variables — set in App Service → Configuration → Application Settings, injected at runtime
  • Managed Identity — allows App Service to authenticate to Azure SQL and Key Vault without any passwords at all (zero-trust)