0
0
Azurecloud~5 mins

Cloud service models (IaaS, PaaS, SaaS) in Azure - Commands & Configuration

Choose your learning style9 modes available
Introduction
Cloud service models help you choose how much control and responsibility you want over your computing resources. They solve the problem of managing hardware, software, and applications by offering different levels of service.
When you want to rent virtual machines and control the operating system and software yourself (IaaS).
When you want to build and run applications without managing the underlying servers (PaaS).
When you want to use ready-made software online without installing anything (SaaS).
When you need to quickly scale your app without worrying about infrastructure.
When you want to focus on your app code and not on hardware or system updates.
Commands
This command creates a virtual machine in Azure, showing how you use IaaS to get full control over a server.
Terminal
az vm create --resource-group example-rg --name example-vm --image UbuntuLTS --admin-username azureuser --generate-ssh-keys
Expected OutputExpected
{ "fqdns": "", "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/example-rg/providers/Microsoft.Compute/virtualMachines/example-vm", "location": "eastus", "name": "example-vm", "powerState": "VM running", "resourceGroup": "example-rg", "zones": null }
--resource-group - Specifies the Azure resource group to use
--image - Chooses the operating system image for the VM
--generate-ssh-keys - Creates SSH keys for secure login
This command creates a web app using Azure App Service, demonstrating PaaS where you deploy apps without managing servers.
Terminal
az webapp create --resource-group example-rg --plan example-plan --name example-webapp --runtime "DOTNETCORE|6.0"
Expected OutputExpected
{ "id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/example-rg/providers/Microsoft.Web/sites/example-webapp", "name": "example-webapp", "state": "Running", "type": "Microsoft.Web/sites", "hostNames": ["example-webapp.azurewebsites.net"] }
--plan - Specifies the App Service plan that defines the compute resources
--runtime - Sets the runtime environment for the app
This command checks a user in Azure Active Directory, an example of SaaS where you use software services managed by Microsoft.
Terminal
az ad user show --id user@example.com
Expected OutputExpected
{ "accountEnabled": true, "displayName": "Example User", "mail": "user@example.com", "userPrincipalName": "user@example.com" }
--id - Specifies the user email or ID to look up
Key Concept

If you remember nothing else from this pattern, remember: IaaS gives you servers, PaaS gives you platforms to run apps, and SaaS gives you ready-to-use software.

Common Mistakes
Trying to manage servers in SaaS services
SaaS services are fully managed; you cannot control the underlying servers.
Use SaaS for software use only, and choose IaaS or PaaS if you need server or platform control.
Confusing PaaS with IaaS and trying to install system software
PaaS abstracts the server; you cannot install or manage system software.
Deploy your app code only on PaaS and use IaaS if you need full server control.
Summary
Use 'az vm create' to launch virtual machines with full control (IaaS).
Use 'az webapp create' to deploy apps without managing servers (PaaS).
Use Azure Active Directory or other SaaS services for ready-made software solutions.