Batch 4: Cloud Ansible AWS & Azure Docker & Podman Apache & NGINX ← Full TOC

← AWS Index

🔵 Azure Core Services — Azure VMs, Blob, SQL, Functions, AKS, App Service

Microsoft Azure is the second-largest cloud provider, dominant in enterprise Microsoft shops. It integrates deeply with Active Directory, Office 365, and Windows Server. The Azure CLI (az) is the primary command-line tool.

📋 Reference

ItemSyntaxDescription
Resource GroupLogical container for Azure resourcesaz group create --name myRG --location eastus
Azure VMVirtual Machines — Linux or WindowsStandard_B1s free tier, Standard_D2s_v3 general
Azure Blob StorageObject storage equivalent to S3Hot/Cool/Archive tiers, LRS/GRS redundancy
Storage AccountContainer for blobs, files, queues, tablesaz storage account create --name myaccount
Azure FilesManaged SMB/NFS file shareMount on VMs, on-prem, containers
Azure SQL DatabaseManaged SQL Server PaaSDTU or vCore purchasing model
Azure Database for PostgreSQLManaged PostgreSQLFlexible Server for dev, Single Server for legacy
Cosmos DBGlobally distributed NoSQL — 5 APIsSQL, MongoDB, Cassandra, Gremlin, Table APIs
Azure FunctionsServerless compute — event-drivenConsumption plan (pay per execution) or Premium
App ServicePaaS for web apps — .NET, Java, Python, NodeB1 free tier, P1v3 for production
Azure Kubernetes ServiceManaged Kubernetesaz aks create — control plane managed by Azure
Container RegistryPrivate Docker registry (ACR)az acr create -- integrated with AKS
Azure Active DirectoryIdentity platform — SSO, MFA, RBACEntra ID in new naming; OAuth2, SAML, OpenID Connect
Managed IdentityLike AWS IAM roles for Azure resourcesSystem-assigned or user-assigned — no credentials needed
Key VaultSecrets, keys, and certificates managementLike AWS Secrets Manager + KMS combined
Virtual NetworkVNet — isolated network in AzureSubnets, NSGs, route tables, peering
NSGNetwork Security Group — virtual firewallInbound/outbound rules at subnet or NIC level
Azure Load BalancerLayer 4 TCP/UDP load balancingPublic or internal, Basic or Standard SKU
Application GatewayLayer 7 HTTP/S load balancer + WAFSSL termination, path-based routing, WAF
Azure CDNContent delivery networkAkamai, Verizon, or Microsoft CDN profiles
Azure DNSManaged DNS serviceHost public or private zones
MonitorAzure monitoring — metrics, logs, alertsLog Analytics workspace for centralized logging
Cost ManagementAnalyze and budget Azure spendingBudgets with alerts, cost analysis by resource/tag
ARM TemplatesAzure Resource Manager — JSON IaC templatesLike CloudFormation for Azure — deploy with az deployment
BicepSimplified ARM template languageTranspiles to ARM JSON — much more readable

💡 Example

# Azure CLI — Essential Commands
# Setup: curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
# Login: az login

# ── Resource Groups ───────────────────────────────────────────
az group create --name mywebuniversity-rg --location eastus
az group list --output table
az group delete --name mywebuniversity-rg --yes --no-wait

# ── Virtual Machines ─────────────────────────────────────────
az vm create \
  --resource-group mywebuniversity-rg \
  --name webserver \
  --image Ubuntu2204 \
  --size Standard_B1s \
  --admin-username azureuser \
  --generate-ssh-keys \
  --public-ip-sku Standard

az vm list --resource-group mywebuniversity-rg --output table
az vm start  --resource-group mywebuniversity-rg --name webserver
az vm stop   --resource-group mywebuniversity-rg --name webserver
az vm delete --resource-group mywebuniversity-rg --name webserver --yes

# Open port 80
az vm open-port --resource-group mywebuniversity-rg --name webserver --port 80

# ── Blob Storage ─────────────────────────────────────────────
az storage account create \
  --name mywebuniversitystorage \
  --resource-group mywebuniversity-rg \
  --location eastus \
  --sku Standard_LRS \
  --kind StorageV2

az storage container create \
  --name content \
  --account-name mywebuniversitystorage \
  --public-access blob

az storage blob upload \
  --account-name mywebuniversitystorage \
  --container-name content \
  --name index.html \
  --file ./index.html

az storage blob list \
  --account-name mywebuniversitystorage \
  --container-name content \
  --output table

# Static website
az storage blob service-properties update \
  --account-name mywebuniversitystorage \
  --static-website --index-document index.html

# ── Azure Database for PostgreSQL ────────────────────────────
az postgres flexible-server create \
  --resource-group mywebuniversity-rg \
  --name mywebuniversity-db \
  --location eastus \
  --admin-user admin \
  --admin-password SecurePass123! \
  --sku-name Standard_B1ms \
  --storage-size 32 \
  --version 16

az postgres flexible-server list --output table
az postgres flexible-server connect \
  --name mywebuniversity-db \
  --admin-user admin

# ── Azure Functions ───────────────────────────────────────────
az functionapp create \
  --resource-group mywebuniversity-rg \
  --consumption-plan-location eastus \
  --runtime python \
  --runtime-version 3.11 \
  --functions-version 4 \
  --name mywebuniversity-func \
  --storage-account mywebuniversitystorage

# ── AKS ──────────────────────────────────────────────────────
az aks create \
  --resource-group mywebuniversity-rg \
  --name mywebuniversity-aks \
  --node-count 2 \
  --node-vm-size Standard_B2s \
  --generate-ssh-keys \
  --enable-managed-identity

az aks get-credentials --resource-group mywebuniversity-rg --name mywebuniversity-aks
kubectl get nodes

← AWS Core Services  |  🏠 Index