Deploy and manage Azure compute resources
Three hosting models and the one engine that deploys them
Microsoft uses the word compute for the hosting model for the resources that your application runs on. This domain covers three of them: virtual machines (VMs) are infrastructure as a service (IaaS), where Microsoft manages the infrastructure and you manage the VMs; containers means the two container services, Azure Container Instances, without any virtual machines to manage, and Azure Container Apps (App Service can also run a containerized app as a custom container, but that is an App Service scenario); and App Service, like Container Apps, is platform as a service (PaaS), a managed environment for deploying apps without managing VMs. All three are deployed through one deployment engine, Azure Resource Manager (ARM), which you drive with ARM templates (JSON files) and Bicep files (a shorter syntax converted to an ARM template). The classic trap is how capacity grows: autoscale for Virtual Machine Scale Sets (many VMs run from one configuration, the scale set model) or an App Service plan (the compute your apps run on), and scale rules for Container Apps replicas (an app's running copies), only add or remove instances (scale out and in) and never make an instance bigger (scale up), while you scale Container Instances out by adding more container groups (containers on one host that share a lifecycle, a network, and storage volumes) yourself, each managed individually unless you use the preview NGroups feature, which provides advanced capabilities for managing multiple related container groups. More CPU or memory per instance is a separate operation in each hosting model, which the decision tree maps.
The domain unfolds in four steps: the engine, then each hosting model
Automate deployments with ARM templates and Bicep covers the deployment engine: reading and modifying an ARM template or a Bicep file, deploying it to its target scope (a resource group, subscription, management group, or tenant), previewing the result with what-if (a run that predicts creates, modifications, and deletions without changing anything), and exporting a deployment or converting an ARM template to a Bicep file; reach for it whenever a scenario shows template code or asks for a repeatable deployment. Create and configure virtual machines covers the hosting model that gives you the most control: creating a VM, encryption at host (the host encrypts the temporary disk and disk caches), moving and resizing VMs, managed disks, availability zones and availability sets, and scale sets. Provision and manage containers in the Azure portal covers images and where they run: Azure Container Registry stores them, Container Instances runs them in a container group, and Container Apps runs them as revisions (immutable snapshots of a container app) whose running copies are replicas. Create and configure Azure App Service covers the App Service plan (the compute, pricing tier, and instance count your apps run on) and the apps on it: scaling, certificates and TLS (Transport Layer Security), custom DNS names, backups, networking, and deployment slots (live apps with their own hostnames, in the same plan, that you swap with production).
Make the change on the unit that owns the setting
A setting such as size belongs to a unit, and changing it reaches everything inside; of two working answers, prefer the one whose side effects on the unit the scenario accepts, which can mean moving an item to its own unit. Apps in an App Service plan share its VM instances and scale together by default; per-app scaling only limits an app or deployment slot to a subset of them, with capacity and billing at the plan level, so a bigger instance means scaling up the plan for every app, and isolating a resource-hungry app means its own plan. Resizing one running VM restarts it, while a scale set's size is a SKU change to the scale set model, and its upgrade policy mode determines how instances are brought up to date with the latest scale set model; a Container Instances container group's CPU and memory can't be updated in place, so a bigger group is deleted and re-created; and a Container Apps revision-scope change, such as a change to container configuration and images, creates a new revision, so more CPU and memory arrive as one. The deployment engine applies the rule to one resource: an incremental deployment reapplies each declared resource in full, so a template changing one property must carry every non-default setting.
One deployment engine and three hosting models, and the topic that covers each
| Part of the domain | What you hand Azure | Unit that runs and scales | Drill into |
|---|---|---|---|
| Deployment engine | An ARM template or Bicep file that declares resources, deployed to one target scope | None of its own: it creates and updates the resources of the three hosting models | Automate deployments with ARM templates and Bicep |
| Virtual machines | A VM size and an image; you manage the VM | The VM, or the VMs of a scale set | Create and configure virtual machines |
| Containers | A container image, for example one stored in Azure Container Registry | A container group (Container Instances) or the replicas of a revision (Container Apps) | Provision and manage containers in the Azure portal |
| App Service | Code or a container, deployed as an app | The VM instances of the App Service plan, shared by every app in it | Create and configure Azure App Service |