πŸ”’ Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided AZ-400 Domain 3
Domain 3 β€” Module 10 of 13 77%
16 of 25 overall

AZ-400 Study Guide

Domain 1: Design and Implement Processes and Communications

  • Work Item Tracking: Boards, GitHub & Flow
  • DevOps Metrics: Dashboards That Drive Decisions
  • Collaboration: Wikis, Teams & Release Notes

Domain 2: Design and Implement a Source Control Strategy

  • Branching Strategies: Trunk-Based, Feature & Release
  • Pull Requests: Policies, Protections & Merge Rules
  • Repository Management: LFS, Permissions & Recovery

Domain 3: Design and Implement Build and Release Pipelines

  • Package Management: Feeds, Versioning & Upstream
  • Testing Strategy: Quality Gates & Release Gates
  • Test Implementation: Code Coverage & Pipeline Tests
  • Azure Pipelines: YAML from Scratch Free
  • GitHub Actions: Workflows from Scratch Free
  • Pipeline Agents: Self-Hosted, Hybrid & VM Templates
  • Multi-Stage Pipelines: Templates, Variables & Approvals
  • Deployment Strategies: Blue-Green, Canary & Ring Free
  • Safe Rollouts: Slots, Dependencies & Hotfix Paths
  • Deployment Implementations: Containers, Scripts & Databases
  • Infrastructure as Code: ARM vs Bicep vs Terraform
  • IaC in Practice: Desired State & Deployment Environments
  • Pipeline Maintenance: Health, Migration & Retention

Domain 4: Develop a Security and Compliance Plan

  • Pipeline Identity: Service Principals, Managed IDs & OIDC Free
  • Authorization & Access: GitHub Roles & Azure DevOps Security
  • Secrets & Secure Pipelines: Key Vault & Workload Federation
  • Security Scanning: GHAS, Defender & Dependabot

Domain 5: Implement an Instrumentation Strategy

  • Monitoring for DevOps: Azure Monitor & App Insights
  • Metrics & KQL: Analysing Telemetry & Traces

AZ-400 Study Guide

Domain 1: Design and Implement Processes and Communications

  • Work Item Tracking: Boards, GitHub & Flow
  • DevOps Metrics: Dashboards That Drive Decisions
  • Collaboration: Wikis, Teams & Release Notes

Domain 2: Design and Implement a Source Control Strategy

  • Branching Strategies: Trunk-Based, Feature & Release
  • Pull Requests: Policies, Protections & Merge Rules
  • Repository Management: LFS, Permissions & Recovery

Domain 3: Design and Implement Build and Release Pipelines

  • Package Management: Feeds, Versioning & Upstream
  • Testing Strategy: Quality Gates & Release Gates
  • Test Implementation: Code Coverage & Pipeline Tests
  • Azure Pipelines: YAML from Scratch Free
  • GitHub Actions: Workflows from Scratch Free
  • Pipeline Agents: Self-Hosted, Hybrid & VM Templates
  • Multi-Stage Pipelines: Templates, Variables & Approvals
  • Deployment Strategies: Blue-Green, Canary & Ring Free
  • Safe Rollouts: Slots, Dependencies & Hotfix Paths
  • Deployment Implementations: Containers, Scripts & Databases
  • Infrastructure as Code: ARM vs Bicep vs Terraform
  • IaC in Practice: Desired State & Deployment Environments
  • Pipeline Maintenance: Health, Migration & Retention

Domain 4: Develop a Security and Compliance Plan

  • Pipeline Identity: Service Principals, Managed IDs & OIDC Free
  • Authorization & Access: GitHub Roles & Azure DevOps Security
  • Secrets & Secure Pipelines: Key Vault & Workload Federation
  • Security Scanning: GHAS, Defender & Dependabot

Domain 5: Implement an Instrumentation Strategy

  • Monitoring for DevOps: Azure Monitor & App Insights
  • Metrics & KQL: Analysing Telemetry & Traces
Domain 3: Design and Implement Build and Release Pipelines Premium ⏱ ~12 min read

Deployment Implementations: Containers, Scripts & Databases

Implement application deployments using containers, binaries, and scripts. Handle database deployment tasks and use Azure App Configuration Feature Manager for feature flags.

From Strategy to Implementation

β˜• Simple explanation

Think of recipes vs actual cooking.

The previous module was the recipe book β€” β€œuse blue-green deployment, apply canary strategy.” This module is the actual cooking β€” β€œhere is how you build the Docker image, push it to the registry, and deploy the container. Here is how you run the database migration without breaking the live app.”

Knowing the strategy is half the battle. Implementing it correctly β€” with the right pipeline tasks, deployment methods, and database safety patterns β€” is where exam questions get specific.

This module covers the practical implementation of deployments across three areas: container-based (Docker, ACR, AKS), binary/script-based (Web Deploy, ZIP Deploy, Azure CLI), and database (EF Core migrations, dacpac, Flyway). It also covers implementing feature flags with Azure App Configuration Feature Manager β€” the hands-on side of what we discussed strategically in the deployment strategies module.

The exam expects you to select the right deployment task and configuration for a given scenario, not just name the strategy.

Container Deployment Pipeline

The standard container deployment pipeline follows a build-push-deploy pattern:

Build and Push to ACR

# Azure Pipelines
- task: Docker@2
  inputs:
    containerRegistry: 'myACRConnection'
    repository: 'claims-api'
    command: 'buildAndPush'
    Dockerfile: '**/Dockerfile'
    tags: |
      $(Build.BuildId)
      latest

Best practices:

  • Tag images with the build ID (immutable) AND latest (convenience)
  • Use multi-stage Dockerfiles β€” build stage with SDK, runtime stage with minimal image
  • Scan images before pushing β€” use Microsoft Defender for Containers or Trivy
  • Never store secrets in Docker images β€” use environment variables or Azure Key Vault references at runtime

Deploy to Azure Container Instances (ACI)

For simple container workloads without orchestration:

- task: AzureCLI@2
  inputs:
    azureSubscription: 'MyAzureConnection'
    scriptType: 'bash'
    scriptLocation: 'inlineScript'
    inlineScript: |
      az container create \
        --resource-group myRG \
        --name claims-api \
        --image myacr.azurecr.io/claims-api:$(Build.BuildId) \
        --registry-login-server myacr.azurecr.io \
        --registry-username $(acrUser) \
        --registry-password $(acrPassword)

Deploy to AKS

For production orchestrated workloads, use the KubernetesManifest task:

- task: KubernetesManifest@1
  inputs:
    action: 'deploy'
    connectionType: 'azureResourceManager'
    azureSubscriptionConnection: 'MyAzureConnection'
    azureResourceGroup: 'myRG'
    kubernetesCluster: 'myAKS'
    manifests: '$(Pipeline.Workspace)/manifests/deployment.yaml'
    containers: 'myacr.azurecr.io/claims-api:$(Build.BuildId)'
Question

What is the Docker@2 task and what does the 'buildAndPush' command do?

Click or press Enter to reveal answer

Answer

Docker@2 is an Azure Pipelines task for Docker operations. The 'buildAndPush' command combines docker build and docker push into a single step β€” it builds the image from the Dockerfile and pushes it to the specified container registry (typically ACR) with the configured tags. It handles registry authentication automatically via the service connection.

Click to flip back

Binary and Script Deployments

Not every deployment uses containers. Azure App Service supports multiple deployment methods:

ZIP Deploy and Run From Package are the modern recommended approaches
MethodHow It WorksBest ForPipeline Task
ZIP DeployUpload ZIP package via Kudu APIMost App Service deploymentsAzureWebApp@1 with package input
Web Deploy (MSDeploy)IIS-level deployment with transformsLegacy .NET Framework appsAzureRmWebAppDeployment@4
Run From PackageApp runs directly from ZIP (read-only wwwroot)Fastest cold start, immutable deploysWEBSITE_RUN_FROM_PACKAGE = 1
Azure CLIScript-based deployment via az webapp deployCustom deployment logicAzureCLI@2
FTPFile-level upload to wwwrootAvoid β€” slow, no atomic deployNot recommended for CI/CD
GitHub Actions Deployazure/webapps-deploy actionGitHub-hosted workflowsazure/webapps-deploy@v3
Question

What is Run From Package and why is it recommended for production?

Click or press Enter to reveal answer

Answer

Run From Package mounts the deployment ZIP as a read-only file system for wwwroot. Benefits: fastest cold start (no file copy on startup), immutable deployment (files cannot be modified at runtime), atomic deployment (the entire package swaps at once), and reduced storage lock issues. Enable it by setting WEBSITE_RUN_FROM_PACKAGE = 1 as an app setting.

Click to flip back

πŸ’‘ Scenario: Kai deploys containers with image scanning

πŸš€ Kai’s pipeline at Launchpad Labs:

  1. Build β€” multi-stage Dockerfile (SDK for build, Alpine for runtime)
  2. Scan β€” Trivy scans the image for CVEs. Pipeline fails on HIGH/CRITICAL findings
  3. Push β€” Docker@2 pushes to their ACR with build ID tag
  4. Deploy to staging β€” KubernetesManifest@1 updates the staging namespace
  5. Integration tests β€” run against staging endpoints
  6. Deploy to production β€” KubernetesManifest@1 with canary strategy (20% traffic)
  7. Monitor and promote β€” if Datadog shows no error spike after 15 minutes, promote to 100%

Riku adds a Dockerfile linting step using hadolint early in the pipeline to catch anti-patterns (running as root, missing HEALTHCHECK, not pinning base image versions).

Database Deployment Tasks

Database deployments are the most dangerous part of any release. A bad migration can corrupt data, cause downtime, or be impossible to roll back. The exam tests your knowledge of safe database deployment patterns.

Migration Approaches

ApproachToolHow It WorksRollback
Code-first migrationsEF Core, Django, RailsGenerate migration files from model changesRun migrate down or apply reverse migration
State-based (dacpac)SQL Server Data Tools (SSDT)Compare desired schema to current, generate diff scriptLimited β€” requires manual rollback scripts
Versioned scriptsFlyway, Liquibase, DbUpNumbered SQL scripts run in orderWrite corresponding rollback scripts
Idempotent scriptsCustom SQLScripts check before modifying (IF NOT EXISTS)Each script is self-contained and re-runnable

The SqlAzureDacpacDeployment Task

For Azure SQL deployments in Azure Pipelines:

- task: SqlAzureDacpacDeployment@1
  inputs:
    azureSubscription: 'MyAzureConnection'
    AuthenticationType: 'servicePrincipal'
    ServerName: 'meridian-sql.database.windows.net'
    DatabaseName: 'ClaimsDB'
    deployType: 'DacpacTask'
    DeploymentAction: 'Publish'
    DacpacFile: '$(Pipeline.Workspace)/database/Claims.dacpac'

Safe Database Deployment Patterns

Always apply the expand-contract pattern for breaking changes:

  1. Never rename a column directly β€” add new column, migrate data, update code, drop old column
  2. Never remove a column that existing code reads β€” deploy code changes first, then contract
  3. Add indexes as non-blocking (ONLINE = ON for SQL Server)
  4. Use transactions for DML but be careful with DDL β€” some DDL auto-commits
Question

What is a dacpac and how does it differ from migration-based database deployment?

Click or press Enter to reveal answer

Answer

A dacpac (Data-tier Application Package) captures a desired database schema state. During deployment, it compares the desired state to the current database and generates a diff script. Unlike migration-based tools (EF Core, Flyway) that apply sequential versioned scripts, dacpac is state-based β€” it figures out what changes are needed automatically. Trade-off: dacpac can struggle with data motion (renaming columns) where migration scripts give you explicit control.

Click to flip back

Question

Why should you never delete a database column in the same deployment as the code change that stops using it?

Click or press Enter to reveal answer

Answer

During a rolling deployment (or any period where old and new code coexist), old instances still read from that column. Deleting the column while old code is running causes runtime errors for active users. Instead: deploy the new code first (expand phase), verify all instances are updated, THEN drop the column in a separate deployment (contract phase).

Click to flip back

Feature Flags with Azure App Configuration

Implementing feature flags with Azure App Configuration Feature Manager:

Setup

  1. Create an Azure App Configuration resource
  2. Add feature flags in the Feature Manager blade
  3. Add the Microsoft.FeatureManagement NuGet package to your app
  4. Connect your app to App Configuration using the connection string or managed identity

Configuration Filters

// In Program.cs
builder.Configuration.AddAzureAppConfiguration(options =>
    options.Connect(connectionString)
           .UseFeatureFlags());

builder.Services.AddFeatureManagement();

Percentage Filter (Gradual Rollout)

In the Azure portal or via CLI, configure a feature flag with a percentage filter:

  • NewCheckout β€” enabled for 10% of users
  • Increase to 25%, 50%, 100% as confidence grows
  • The SDK handles consistent user bucketing (same user always sees the same version)

Targeting Filter (User and Group Targeting)

Target specific users or groups:

  • Enable for kai@launchpadlabs.com (individual)
  • Enable for beta-testers group (group)
  • Default percentage for everyone else: 0%
πŸ’‘ Exam tip: Feature flags in pipelines

The exam may ask how to integrate feature flags into a deployment pipeline:

  • Pre-deployment: Pipeline creates/updates the feature flag in App Configuration (OFF by default)
  • Post-deployment: Pipeline enables the flag for a test group via the App Configuration REST API
  • Validation: Run tests against the feature-flagged path
  • Promotion: Increase percentage filter via pipeline task
  • Rollback: Set the flag to OFF via a single API call β€” no redeployment needed

Key distinction: Feature flags separate DEPLOYMENT from RELEASE. The code is deployed (available) but not released (visible to users) until the flag is enabled.

Knowledge Check

Kai needs to deploy a new microservice to AKS. The pipeline should build the Docker image, scan it for vulnerabilities, push it to ACR, and deploy to the cluster. Which sequence of Azure Pipelines tasks is correct?

Knowledge Check

Nadia needs to rename a column in the production SQL database from 'CustName' to 'CustomerFullName'. The Claims API reads this column. What is the safest approach?

Knowledge Check

Which Azure App Service deployment method provides the fastest cold start and ensures the deployment is immutable (files cannot be modified at runtime)?

🎬 Video coming soon

Container, Script and Database Deployments

Next up: Infrastructure as Code: ARM vs Bicep vs Terraform

← Previous

Safe Rollouts: Slots, Dependencies & Hotfix Paths

Next β†’

Infrastructure as Code: ARM vs Bicep vs Terraform

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.