Test Flashcards

(111 cards)

1
Q

How would you deploy a container instance in Azure Container Instances (ACI) with an Azure file share mounted as a volume?

A

ACI Volume Mount (Azure File Share): Use the az container create command with volume mount parameters:

az container create --resource-group myResourceGroup --name mycontainer --image mcr.microsoft.com/azuredocs/aci-helloworld --azure-file-volume-account-name <storage-account-name> --azure-file-volume-account-key <storage-account-key> --azure-file-volume-share-name <share-name> --azure-file-volume-mount-path /mnt/azfile

This mounts an Azure File Share to the /mnt/azfile path in the container.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How can you deploy a web application to Azure App Service using a ZIP file?

A

ZIP Deploy (App Service): Use the az webapp deploy command:

az webapp deploy --resource-group <group-name> --name <app-name> --src-path <filename>.zip

This deploys the contents of the ZIP file to the /home/site/wwwroot directory of the web app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the primary purpose of Azure Functions within the ‘Develop Azure Compute Solutions’ section?

A

Event-Driven Serverless Execution: Azure Functions provide a serverless compute platform to execute code in response to events (HTTP, timers, queues) without managing infrastructure, enabling scalable, event-driven solutions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which Azure storage services are you expected to develop solutions for under the ‘Develop for Azure Storage’ domain?

A

Core Azure Storage Services:

  • Blob Storage: Unstructured objects (files, media)
  • Cosmos DB: Globally distributed, multi-model database
  • Table Storage: NoSQL key/attribute data
  • Queue Storage: Simple message-based decoupling
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are the three types of blobs supported by Azure Blob Storage, and what are their primary use cases?

A

Azure Blob Types:

  • Block Blobs: Optimized for large data uploads (documents, media files); composed of blocks
  • Append Blobs: Optimized for append operations (logging); supports appending blocks
  • Page Blobs: Optimized for random read/write (VHD files); composed of 512-byte pages
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the five consistency levels offered by Azure Cosmos DB, and how do they differ in terms of consistency and performance?

A

Azure Cosmos DB Consistency Levels:

  • Strong: Highest consistency, lowest throughput, highest latency; ensures reads return the latest write
  • Bounded Staleness: Balances consistency and availability; reads lag within a specified window
  • Session: Ensures consistency within a session; moderate throughput and latency
  • Consistent Prefix: Guarantees write order; higher throughput than session, lower than eventual
  • Eventual: Lowest consistency, highest throughput, lowest latency; replicas converge eventually
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do you initialize a CosmosClient instance in .NET to interact with Azure Cosmos DB?

A

CosmosClient Initialization: Use the following code:

CosmosClient client = new CosmosClient(\"your_endpoint\", \"your_key\");

This creates a client instance with the endpoint URI and primary key.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which component of the Azure Cosmos DB Change Feed Processor is responsible for storing state and coordinating processing across multiple consumers?

A

Lease Container: The Lease Container manages state and coordinates processing by storing lease documents, ensuring each change feed event is processed exactly once by one consumer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the primary security areas you need to master under the ‘Implement Azure Security’ domain?

A

Azure Security Key Topics:

  • Authentication and Authorization: Microsoft Entra ID, OAuth 2.0
  • Data Security: Azure Key Vault for keys, secrets, and certificates
  • Identity Management: Managed Identities to eliminate credential management
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What core skills are evaluated in the ‘Monitor, Troubleshoot, and Optimize Azure Solutions’ domain?

A

Monitoring & Optimization Skills:

  • Monitoring: Azure Monitor and Application Insights
  • Troubleshooting: Application performance and errors
  • Optimization: Cost, performance, and scalability solutions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What types of integration scenarios should you be prepared for under the ‘Connect to and Consume Azure Services and Third-party Services’ domain?

A

Integration Scenarios:

  • Azure Services: Event Grid, Service Bus, and Event Hubs for messaging
  • API Management: Azure API Management for API exposure
  • Third-party Services: APIs or SDKs for external connections
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do you deploy a containerized web app to Azure App Service, and what service is often used?

A

Containerized Web App Deployment:

  1. Create a Docker image
  2. Store it in Azure Container Registry
  3. Deploy via Web App for Containers

Azure Container Registry manages the images.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is Azure App Service, and what types of applications can it host on the AZ-204 exam?

A

Azure App Service: A fully managed PaaS for hosting:

  • Web applications
  • REST APIs
  • Mobile back ends

Supported Languages: .NET, .NET Core, Java, Node.js, Python, PHP, and custom containers on Windows and Linux.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What key features of Azure App Service should you know to simplify app development and management?

A

Azure App Service Key Features:

  • Multi-language support
  • Managed environment (auto-patching)
  • Autoscaling and high availability
  • Continuous deployment (GitHub, Azure DevOps)
  • Custom domains and TLS/SSL
  • Docker container support
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How can you create an Azure App Service web app, and what’s a prerequisite?

A

Creation Methods: Azure portal, CLI, or tools like Visual Studio

Prerequisite: An Azure account with an active subscription

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What determines compute resources for an Azure App Service app, and how does scaling work?

A

Resource Allocation: The App Service plan defines resources and pricing tiers

Scaling Options:
- Manual: Scale up/out manually
- Automatic: Autoscale based on metrics like CPU or memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

How does Azure App Service handle authentication and authorization, and what providers are supported?

A

Built-in Auth/Auth: Minimal code required

Supported Identity Providers:
- Microsoft Entra ID
- Google
- Facebook
- Twitter
- Microsoft accounts

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What app settings can you configure in Azure App Service, and how are they managed?

A

Configurable Settings:
- Key-value pairs
- SSL/TLS certificates
- Diagnostic logging
- Virtual directories
- Feature toggles

Management Tools: Azure portal, CLI, or PowerShell

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

How does autoscaling work in Azure App Service, and what factors configure it?

A

Autoscaling Process: Adjusts resources based on demand using:

  • Metrics: CPU, memory usage
  • Conditions: Threshold values
  • Rules: Scale out (add instances) or up (increase size)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What’s the purpose of deployment slots in Azure App Service, and how do they aid deployment?

A

Deployment Slots: Allow staging/testing updates before production

Benefits:
- Test in staging slot before swapping to production
- Enable zero-downtime deployments
- Support rollbacks if needed

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

How does a deployment slot swap work in Azure App Service, and what happens during it?

A

Slot Swap Process:
1. Staging warms up with production settings
2. Content and config swap between slots
3. No downtime during the process
4. Settings can swap or stay slot-specific

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

What experience is recommended before tackling Azure App Service topics?

A

Recommended Experience:
- One year developing scalable solutions across all software development phases
- Basic Azure knowledge
- Cloud concepts understanding
- Azure portal familiarity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

How do you secure web traffic in Azure App Service, and what’s required?

A

SSL/TLS Security: Install certificate via portal’s TLS/SSL settings

Requirements:
- Custom domain
- Valid certificate (from CA or Azure Key Vault)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

How can you set up continuous deployment for Azure App Service, and what tools are supported?

A

Setup Methods: Azure portal or CLI

Supported Integration:
- GitHub
- Azure DevOps
- Bitbucket
- Docker Hub

Triggers automatic deployments on code/image updates.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
How do you enable diagnostic logging in Azure App Service, and what can it troubleshoot?
**Enable Logging**: Via portal's **Monitoring settings** **Log Types**: - **App logs** - **Server logs** - **Failed request traces** **Troubleshoots**: Errors, performance issues, deployment problems
26
What are Azure Functions, and what is their primary purpose?
**Azure Functions**: A **serverless compute service** for running **event-driven code** without managing infrastructure **Primary Purpose**: Execute **small, single-purpose functions** in response to **triggers** like HTTP requests or timers
27
What programming languages are supported by Azure Functions development?
**Supported Languages**: - **C#** - **Java** - **JavaScript (Node.js)** - **Python** - **PowerShell** - **TypeScript** - **Custom handlers** for other languages
28
What are triggers in Azure Functions, and can you name some examples?
**Triggers**: Events that **invoke a function** **Examples**: - **HTTP requests** - **Timers** (TimerTrigger) - **Azure Blob storage** changes (BlobTrigger) - **Azure Service Bus** messages (ServiceBusTrigger)
29
What role do bindings play in Azure Functions, and how do they differ from triggers?
**Bindings**: Connect functions to **external data or services** (input/output) without extra code **Difference from Triggers**: - **Triggers**: Start execution - **Bindings**: Handle data flow (e.g., Blob storage input, Cosmos DB output)
30
How can you create an Azure Function, and what tools are commonly used?
**Creation Methods**: - **Azure portal** - **Azure CLI** - **Development tools**: Visual Studio, Visual Studio Code, Maven **Requirements**: Azure subscription and **function app**
31
What is a function app in Azure Functions, and what does it provide?
**Function App**: A **container** for one or more Azure Functions **Provides**: - **Runtime environment** - **Shared configuration** (app settings) - **Hosting plan** (Consumption, Premium, or App Service)
32
What are the hosting plans for Azure Functions, and how do they differ?
**Azure Functions Hosting Plans**: - **Consumption**: Serverless, pay-per-execution, **auto-scales** - **Premium**: **Pre-warmed instances**, VNet support, **longer execution** - **App Service**: **Dedicated VMs**, predictable costs, shared with web apps
33
How does scaling work in Azure Functions, and what drives it?
**Automatic Scaling**: In Consumption/Premium plans **Scaling Drivers**: - **Event volume** (HTTP requests, queue depth) - **Scale Controller** monitors and adjusts **instance count** dynamically
34
What are Durable Functions in Azure Functions, and what problem do they solve?
**Durable Functions**: Extension for **stateful, long-running workflows** in serverless environment **Problem Solved**: Managing **state and orchestration** in event-driven applications
35
What are the main patterns supported by Durable Functions?
**Durable Function Patterns**: - **Function Chaining**: Sequential execution - **Fan-out/Fan-in**: Parallel tasks with aggregation - **Async HTTP APIs**: Long-running operations - **Monitor**: Recurring checks - **Human Interaction**: Approval workflows
36
What settings can you configure for an Azure Function, and how are they managed?
**Configurable Settings**: - **App settings** (key-value pairs) - **Runtime version** - **Authentication** - **CORS** **Management**: Azure portal, CLI, or `host.json`/`local.settings.json`
37
How do you secure Azure Functions, and what methods are used?
**Security Methods**: - **Function keys** (host, function-specific) - **Microsoft Entra ID** for authentication - **API Management** integration - **Network security** (VNet, private endpoints in Premium plan)
38
How can you monitor Azure Functions, and what tools are involved?
**Monitoring Tools**: - **Azure Monitor** - **Application Insights** for logs, metrics, and tracing **Key Metrics**: Execution count, errors, performance **Configuration**: Via portal or CLI
39
What are the deployment options for Azure Functions, and how do they work?
**Deployment Options**: - **Zip deploy**: Push a .zip package - **GitHub/Azure DevOps**: Continuous deployment - **VS/VS Code**: Direct publishing **Target**: The **function app**
40
What should you know about HTTP triggers in Azure Functions?
**HTTP Triggers**: - Invoke functions via **HTTP requests** (GET, POST, etc.) - Support **auth levels** (anonymous, function, admin) - Can **return responses** directly or via output bindings
41
How are timer triggers used in Azure Functions, and what defines their schedule?
**Timer Triggers**: Run functions on a **schedule** **Schedule Definition**: **CRON expression** (e.g., `0 */5 * * * *` for every 5 minutes) **Configuration**: In the function's settings
42
What Azure services can Azure Functions integrate with via bindings?
**Integration Services**: - **Blob Storage** - **Cosmos DB** - **Event Hubs** - **Service Bus** - **Event Grid** - **Queue Storage** For **input/output operations**
43
How can you develop and test Azure Functions locally?
**Local Development**: - Use **Azure Functions Core Tools** - **IDE support**: VS Code, Visual Studio - **Local testing**: Simulate triggers/bindings with `local.settings.json`
44
What is Infrastructure as a Service (IaaS) in Azure, and what are its key components?
**Azure IaaS**: Virtualized compute resources managed by Azure **Key Components**: - **Azure Virtual Machines (VMs)** - **Virtual networks (VNets)** - **Storage** Offers **full control** over OS and infrastructure
45
How do you create an Azure Virtual Machine, and what are the basic steps?
**Creation Methods**: Azure portal, CLI, or SDK **Basic Steps**: 1. Choose **image** (Windows/Linux) 2. Select **size** and **region** 3. Configure **VNet** and **authentication** (password/SSH) 4. Set up **disks** and **networking**
46
How do you provision an Azure VM using Azure CLI?
**Azure CLI VM Creation**: `az vm create --resource-group myRG --name myVM --image UbuntuLTS --admin-username azureuser --generate-ssh-keys`
47
What are ARM templates in Azure, and what's their purpose?
**ARM Templates**: **JSON files** defining infrastructure **declaratively** **Purpose**: - **Automate** deployments - **Repeat** consistent infrastructure - **Manage** resources like VMs, storage, networks
48
What's the basic structure of an ARM template?
**ARM Template Structure**: - `$schema` - `contentVersion` - `parameters` - `variables` - `resources` - `outputs`
49
How do you deploy a VM using an ARM template and Azure CLI?
**ARM Template VM Deployment**: 1. Define VM in `resources` section 2. Deploy with CLI: `az deployment group create --resource-group myRG --template-file vm-template.json --parameters vmName=myVM adminUsername=azureuser`
50
How do you create a VM using the Azure.ResourceManager SDK?
**Azure.ResourceManager SDK VM Creation**: ```csharp using Azure.ResourceManager; using Azure.ResourceManager.Compute; ArmClient client = new ArmClient(new DefaultAzureCredential()); ResourceGroupResource rg = client.GetResourceGroupResource(ResourceGroupResource.CreateResourceIdentifier(\"subscription-id\", \"myRG\")); VirtualMachineCollection vmCollection = rg.GetVirtualMachines(); VirtualMachineData vmData = new VirtualMachineData(rg.Data.Location) { /* Configure VM properties */ }; await vmCollection.CreateOrUpdateAsync(WaitUntil.Completed, \"myVM\", vmData); ```
51
How do you configure a VM with a custom script extension?
**Custom Script Extension**: `az vm extension set --resource-group myRG --vm-name myVM --name CustomScriptExtension --publisher Microsoft.Azure.Extensions --settings '{\"fileUris\": [\"https://script.sh\"], \"commandToExecute\": \"./script.sh\"}'`
52
What are the availability options for Azure VMs, and how do they improve reliability?
**VM Availability Options**: - **Availability Sets**: Distribute VMs across **fault/update domains** - **Availability Zones**: Place VMs in **separate physical locations** - **VM Scale Sets**: **Auto-scale** identical VMs **Reliability**: Improved via **redundancy**
53
What are VM Scale Sets in Azure, and how do they work?
**VM Scale Sets**: Manage **identical, load-balanced VMs** **Functionality**: - **Auto-scale** based on demand (CPU usage) - **Simplify deployment** and maintenance of multiple VMs
54
How do you create a VM Scale Set using Azure CLI?
**VM Scale Set Creation**: `az vmss create --resource-group myRG --name myScaleSet --image UbuntuLTS --instance-count 2 --admin-username azureuser --generate-ssh-keys`
55
How do you deploy an application to an Azure VM?
**Application Deployment Options**: - **Manual setup**: SSH/RDP, copy files - **Custom Script Extension**: Automated setup - **CI/CD**: Azure DevOps for automated deployment post-provisioning
56
How can you run containers in Azure IaaS, and what's a common approach?
**Container Deployment**: Run containers on VMs using **Docker** **Common Approach**: 1. Provision VM 2. Install Docker 3. Pull and run image: `docker run -d -p 80:80 myimage`
57
What are Azure Container Instances (ACI) in the context of AZ-204 IaaS, and how do you deploy to them?
**Azure Container Instances**: **Serverless container hosting** **Deployment**: `az container create --resource-group myRG --name mycontainer --image myimage --ports 80`
58
How do you secure Azure IaaS resources like VMs?
**IaaS Security Methods**: - **Network Security Groups (NSGs)** - **Firewalls** - **Microsoft Entra ID (RBAC)** - **Disk encryption** - **VNet isolation** (private endpoints)
59
How do you monitor Azure IaaS solutions, and what tools are used?
**Monitoring Tools**: - **Azure Monitor**: Metrics (CPU, disk) - **Log Analytics**: Detailed logs **Configuration**: Via portal or SDK
60
How do you configure networking for an Azure VM?
**VM Networking Configuration**: - Assign to **VNet/subnet** - Set **NSG rules** - Configure **public IP** or **load balancer** **CLI Example**: `az vm open-port --resource-group myRG --name myVM --port 80`
61
How does hosting an app on a VM differ from Azure App Service?
**VM vs App Service**: - **VMs (IaaS)**: Full control over OS/software, **manual management** - **App Service (PaaS)**: **Managed service**, **auto-scales**, **abstracts infrastructure**
62
How do you publish and manage a container image to Azure Container Registry (ACR)?
**ACR Container Management**: 1. **Build and tag** Docker image: ```bash docker build -t myimage:latest . docker tag myimage:latest myregistry.azurecr.io/myimage:latest ``` 2. **Login and push**: ```bash az acr login --name myregistry docker push myregistry.azurecr.io/myimage:latest ``` 3. **Manage images**: ```bash az acr repository list --name myregistry --output table az acr repository delete --name myregistry --image myregistry.azurecr.io/myimage:latest ```
63
How do you create a solution using Azure Container Apps to host a containerized application?
**Azure Container Apps Deployment**: `az containerapp create --name mycontainerapp --resource-group myResourceGroup --image myregistry.azurecr.io/myimage:latest --environment myenvironment --target-port 80 --ingress 'external' --min-replicas 1 --max-replicas 3` **Features**: **Scalable container app** with **external ingress**
64
How can you deploy a containerized application to Azure App Service?
**Containerized App Service Deployment**: `az webapp create --resource-group myResourceGroup --name mywebapp --plan myAppServicePlan --deployment-container-image-name myregistry.azurecr.io/myimage:latest` **Requirements**: App Service plan supports **Linux** and **Docker**
65
How do you implement autoscaling for an Azure App Service Web App to handle varying loads?
**App Service Autoscaling**: 1. Navigate to **App Service plan** and enable autoscale 2. **Azure CLI Configuration**: ```bash az appservice plan update --name myAppServicePlan --resource-group myResourceGroup --min-instances 1 --max-instances 5 --scale-up-rule \"CpuPercentage > 70 for 10 minutes\" ``` **Scaling**: 1 to 5 instances based on **CPU usage > 70%** for 10 minutes
66
How do you configure and implement diagnostics and logging for an Azure App Service Web App?
**App Service Diagnostics & Logging**: 1. **Enable logging**: ```bash az webapp log config --name mywebapp --resource-group myResourceGroup --application-logging true --web-server-logging filesystem ``` 2. **View real-time logs**: ```bash az webapp log tail --name mywebapp --resource-group myResourceGroup ``` 3. **Application Insights**: ```csharp var builder = WebApplication.CreateBuilder(args); builder.Services.AddApplicationInsightsTelemetry(); ```
67
How do you configure TLS, API settings, and connection strings for an Azure App Service Web App?
"**App Service Configuration**: 1. **TLS Certificate Binding**: ```bash az webapp config ssl bind --resource-group myResourceGroup --name mywebapp --certificate-thumbprint --ssl-type SNI ``` 2. **API Settings**: ```bash az webapp config appsettings set --name mywebapp --resource-group myResourceGroup --settings \"API_KEY=your-api-key\" ``` 3. **Connection Strings**: ```bash az webapp config connection-string set --name mywebapp --resource-group myResourceGroup --settings \"DefaultConnection=Server=tcp:server.database.windows.net ```
68
How do you create and configure an Azure Functions app using the Azure CLI?
**Azure Functions App Creation**: ```bash az functionapp create --resource-group myResourceGroup --name myfunctionapp --storage-account mystorage --consumption-plan-location eastus --runtime dotnet ``` **Configure Settings**: ```bash az functionapp config appsettings set --name myfunctionapp --resource-group myResourceGroup --settings \"FUNCTIONS_EXTENSION_VERSION=~4\" ```
69
How do you implement input and output bindings in an Azure Function using .NET?
**Azure Function Bindings (.NET)**: ```csharp using Microsoft.Azure.Functions.Worker; using Microsoft.Extensions.Logging; public class MyFunction { [Function(\"ProcessData\")] public static void Run( [BlobTrigger(\"input-container/{name}\", Connection = \"AzureWebJobsStorage\")] string inputBlob, [Blob(\"output-container/{name}\", Connection = \"AzureWebJobsStorage\")] out string outputBlob, ILogger log) { log.LogInformation($\"Processing blob: {inputBlob}\"); outputBlob = inputBlob.ToUpper(); } } ``` **Features**: **Blob trigger** as input, **writes to output blob**
70
How do you implement Azure Function triggers using data operations, timers, and webhooks?
**Azure Function Triggers**: 1. **Data Operations (Blob Trigger)**: ```csharp [Function(\"BlobTrigger\")] public static void Run( [BlobTrigger(\"container-name/{name}\", Connection = \"AzureWebJobsStorage\")] string myBlob, ILogger log) { log.LogInformation($\"Blob trigger processed: {myBlob}\"); } ``` 2. **Timer Trigger**: ```csharp [Function(\"TimerTrigger\")] public static void Run([TimerTrigger(\"0 */5 * * * *\")] TimerInfo myTimer, ILogger log) { log.LogInformation($\"Timer trigger executed at: {DateTime.Now}\"); } ``` 3. **Webhook (HTTP Trigger)**: ```csharp [Function(\"WebhookTrigger\")] public static IActionResult Run( [HttpTrigger(AuthorizationLevel.Function, \"post\")] HttpRequest req, ILogger log) { log.LogInformation(\"Webhook triggered.\"); return new OkResult(); } ```
71
What is a Quick task scenario for Azure Container Registry (ACR) tasks, and how can it be used to build and maintain container images?
**ACR Quick Tasks**: Simple, **one-off builds** or maintenance of container images **Usage**: ```bash az acr build --registry myregistry --image myimage:latest . ``` **Purpose**: Triggers build from current directory and pushes to ACR, ideal for **rapid testing** or **single-step image updates**
72
What is an Automatically triggered tasks scenario for Azure Container Registry (ACR) tasks, and how can it automate container image management?
**ACR Automatically Triggered Tasks**: Automate image builds based on **events** (code commits, base image updates) **Configuration**: ```bash az acr task create --registry myregistry --name mytask --trigger-source git --trigger-event commit --source-location https://github.com/myrepo --image myimage:latest --cmd \"docker build -t myregistry.azurecr.io/myimage:latest .\" ``` **Benefits**: **Continuous integration** for container images on git commits
73
What is a Multi-step task scenario for Azure Container Registry (ACR) tasks, and how can it be used for complex container image workflows?
**ACR Multi-step Tasks**: Support complex workflows with **multiple steps** (build, test, push) **Configuration**: ```bash az acr task create --registry myregistry --name multistep-task --file multistep-task.yaml ``` **Example YAML**: ```yaml steps: - cmd: docker build -t myregistry.azurecr.io/myimage:build . - cmd: docker test myregistry.azurecr.io/myimage:build - cmd: docker push myregistry.azurecr.io/myimage:build ``` **Purpose**: **Sequential execution** of build, test, and publish steps
74
What are the service tiers available in Azure Container Registry (ACR), and what are their key features?
**Azure Container Registry Service Tiers**: - **Basic**: - Cost-effective **entry-level** tier - **10 concurrent builds** - No geo-replication - Suitable for **development** - **Standard**: - Enhanced performance with **20 concurrent builds** - **Geo-replication support** - Ideal for **production workloads** - **Premium**: - Highest performance with **100 concurrent builds** - **Advanced features**: content trust, private endpoints - For **large-scale, secure scenarios**
75
What are the primary use cases for Azure Container Registry (ACR) tasks, and how do they support containerized solutions?
**ACR Tasks Use Cases**: - **Image Distribution**: Pulling images from ACR to deployment targets (Kubernetes, AKS) - **Azure Services Support**: Building and running containerized applications at scale (Container Instances, App Service) - **CI/CD Automation**: Automating image builds and deployments for **consistent, scalable, repeatable workflows**
76
What are the two common deployment methods for a multi-container group in Azure Container Instances, and how do they differ?
**ACI Multi-container Deployment Methods**: - **ARM Template**: - Recommended for deploying **additional Azure resources** alongside containers - **Full resource management** with JSON templates - **YAML File**: - Preferred for **container instances only** deployments - **Concise format** ideal for defining container groups **Difference**: ARM templates support **broader infrastructure**, YAML is **simpler for containers alone**
77
How does Azure Container Instances allocate resources such as CPUs, memory, and GPUs to a container group?
**ACI Resource Allocation**: Resources are **summed** from all container instances in the group **Configuration**: - Specify **CPU** (e.g., 1.0), **memory** (e.g., 1.5 GB), **GPUs** (preview) - **Group total**: Two containers with 1 CPU each = **2 CPUs total** **Example YAML**: ```yaml apiVersion: 2019-12-01 properties: containers: - name: mycontainer properties: resources: requests: cpu: 1.0 memoryInGB: 1.5 ```
78
How does networking function in Azure Container Instances for container groups, particularly regarding IP addresses and port namespaces?
**ACI Container Group Networking**: - **Shared IP address**: All containers share **single IP** - **Port namespace**: Shared across the group - **Internal communication**: Via `localhost` on exposed ports - **External access**: Expose ports on the group's IP **Example**: ```bash az container create --resource-group myResourceGroup --name mycontainer --image mcr.microsoft.com/azuredocs/aci-helloworld --ports 80 ``` Exposes **port 80** for external access
79
How can you configure persistent storage for containers in Azure Container Instances by specifying and mapping external volumes?
**ACI Persistent Storage with Azure Files**: 1. **Create storage account and file share**: ```bash az storage account create --name mystorage$RANDOM --resource-group myResourceGroup --location eastus --sku Standard_LRS az storage share create --name acishare --account-name mystorage$RANDOM ``` 2. **Mount file share in container**: ```bash az container create --resource-group myResourceGroup --name mycontainer --image mcr.microsoft.com/azuredocs/aci-hellofiles --azure-file-volume-account-name mystorage$RANDOM --azure-file-volume-account-key $(az storage account keys list --resource-group myResourceGroup --account-name mystorage$RANDOM --query '[0].value' -o tsv) --azure-file-volume-share-name acishare --azure-file-volume-mount-path /aci/logs/ ``` **Result**: Azure file share mapped to `/aci/logs/` for **persistent data**
80
What are common use cases for multi-container groups in Azure Container Instances, and how do they benefit containerized solutions?
**Multi-container Group Use Cases**: - **Web application** + **logging container** to collect logs - **Application container** + **sidecar** for health monitoring or content updates **Benefits**: - **Modular, isolated workloads** - **Improved scalability** and **maintainability** - **Complex task division** into smaller container images
81
What is a use case for deploying API endpoints using Azure Container Apps, and how can it be configured?
**Container Apps API Endpoints**: Deploy **RESTful services** with scalable HTTP traffic handling **Configuration**: ```bash az containerapp create --name myapiapp --resource-group myResourceGroup --image myregistry.azurecr.io/myapi:latest --environment myenvironment --target-port 8080 --ingress 'external' --min-replicas 1 --max-replicas 5 ``` **Features**: **Externally accessible** API endpoint with **scaling based on HTTP traffic**
82
What is a use case for hosting background processing applications using Azure Container Apps, and how does it support such workloads?
**Container Apps Background Processing**: Host **long-running** or **batch jobs** (data processing) **Configuration**: ```bash az containerapp create --name mybgapp --resource-group myResourceGroup --image myregistry.azurecr.io/mybg:latest --environment myenvironment --min-replicas 1 --max-replicas 1 --ingress 'internal' ``` **Features**: Supports **background tasks** without HTTP endpoints, **continuous** or **scheduled execution**
83
What is a use case for handling event-driven processing using Azure Container Apps, and how can it be implemented?
**Container Apps Event-Driven Processing**: Handle events from **Azure services** (Event Grid, Event Hubs) **Configuration**: ```bash az containerapp create --name myeventapp --resource-group myResourceGroup --image myregistry.azurecr.io/myevent:latest --environment myenvironment --trigger-type eventgrid --min-replicas 0 --max-replicas 10 ``` **Features**: **Event-driven scaling** processing **blob changes** or **custom events**
84
What is a use case for running microservices using Azure Container Apps, and how does it support microservice architectures?
**Container Apps Microservices**: Run **independent, loosely coupled** microservices **Configuration**: ```bash # Service 1 az containerapp create --name myservice1 --resource-group myResourceGroup --image myregistry.azurecr.io/service1:latest --environment myenvironment --target-port 80 --ingress 'external' --min-replicas 1 --max-replicas 5 # Service 2 az containerapp create --name myservice2 --resource-group myResourceGroup --image myregistry.azurecr.io/service2:latest --environment myenvironment --target-port 8080 --ingress 'external' --min-replicas 1 --max-replicas 5 ``` **Benefits**: **Independent scaling** and **HTTP communication** between services
85
What scaling options are available for Azure Container Apps, and how can you configure scaling based on HTTP traffic, events, CPU/memory load, or KEDA-supported scalers?
"**Container Apps Scaling Options**: - **HTTP Traffic**: Scale based on **request volume** (default) - **Event-driven Processing**: Scale on **event triggers** (Event Grid, Event Hubs) - **CPU/Memory Load**: Scale on **resource utilization** using KEDA scalers - **KEDA-supported Scalers**: Use **custom metrics** via Kubernetes Event-driven Autoscaling **Configuration**: ```bash az containerapp update --name mycontainerapp --resource-group myResourceGroup --min-replicas 0 --max-replicas 10 --scale-rule \"name=http ``` **Features**: Scaling based on **HTTP concurrency** or **CPU usage > 70%**"
86
What is an App Service plan, and how does it define compute resources for Azure App Service Web Apps?
**App Service Plan**: Defines a set of **compute resources (VMs)** for one or more web apps **Benefits**: Apps share the same resources for **cost efficiency** **Creation**: ```bash az appservice plan create --name myAppServicePlan --resource-group myResourceGroup --location eastus --sku B1 ``` **Specification**: Compute capacity (e.g., **Basic tier**, **1.75 GB RAM**, **1 core**)
87
What are the pricing tiers of an App Service plan in Azure, and how do they differ in terms of resource allocation?
**App Service Plan Pricing Tiers**: - **Shared**: - Runs on **shared VMs** - **Limited CPU minutes** - **No scaling out** (Free, Shared tiers) - **Dedicated**: - Runs on **dedicated VMs** (Basic, Standard, Premium) - Allows **scaling** and **full resource use** - **Isolated**: - Runs on **isolated VMs** in private VNet - **High security** and compliance - **Maximum control**
88
How do Azure App Service Web Apps run and scale in the Free and Shared tiers compared to other tiers like Dedicated and Isolated?
**Free/Shared Tiers**: - Apps receive **CPU minutes** on **shared VM instance** - **Cannot scale out** - Limited to **allocated CPU time** on single shared VM **Dedicated/Isolated Tiers**: - Apps run on **all VM instances** in App Service plan - Enable **scaling out** (manual or auto-scaling) across **multiple VMs** - **Higher performance** and **availability** **Check Scaling**: ```bash az appservice plan show --name myAppServicePlan --resource-group myResourceGroup ```
89
How does Azure App Service provide continuous integration and deployment support using GitHub?
**GitHub CI/CD Configuration**: 1. **Enable GitHub deployment**: ```bash az webapp deployment source config --name mywebapp --resource-group myResourceGroup --repo-url https://github.com/myrepo --branch main --manual-integration ``` 2. **GitHub Actions Workflow** (`.github/workflows/deploy.yml`): ```yaml name: Deploy to Azure App Service on: [push] jobs: build-and-deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: azure/login@v1 with: creds: ${{ secrets.AZURE_CREDENTIALS }} - run: az webapp deploy --resource-group myResourceGroup --name mywebapp --src-path . ``` **Result**: **Automated deployment** on code pushes to GitHub
90
How does Azure App Service provide continuous integration and deployment support using Bitbucket?
**Bitbucket CI/CD Configuration**: 1. **Link Bitbucket repository**: ```bash az webapp deployment source config --name mywebapp --resource-group myResourceGroup --repo-url https://bitbucket.org/myrepo --branch main --manual-integration ``` 2. **Bitbucket Pipeline** (`bitbucket-pipelines.yml`): ```yaml image: mcr.microsoft.com/appsvc/php:8.0 pipelines: default: - step: script: - az login --service-principal -u $AZURE_SP_ID -p $AZURE_SP_SECRET --tenant $AZURE_TENANT - az webapp deploy --resource-group myResourceGroup --name mywebapp --src-path . ``` **Result**: **Automated deployment** on Bitbucket commits
91
How can you perform manual deployment to an Azure App Service Web App using FTP/S?
**FTP/S Manual Deployment**: 1. **Retrieve FTP credentials**: ```bash az webapp deployment list-publishing-profiles --name mywebapp --resource-group myResourceGroup --query \"[0].publishUrl\" -o tsv ``` 2. **Upload files using FTP client** or **CLI**: ```bash curl -T myapp.zip ftp://@/site/wwwroot/ --ftp-password ``` **Result**: Files uploaded to `/site/wwwroot` directory for deployment
92
How does Azure App Service on Linux support hosting web apps natively on Linux, including custom stacks and containers?
**App Service on Linux Support**: - **Native Linux hosting** for common stacks (Node.js, Python, PHP, Ruby) via **built-in images** - **Custom Linux stacks** or containers (**Web App for Containers**) **Configuration**: ```bash # Built-in runtime az webapp create --resource-group myResourceGroup --name mylinuxapp --plan myAppServicePlan --runtime \"DOCKER|mcr.microsoft.com/appsvc/static:0.1\" # Custom container az webapp config container set --name mylinuxapp --resource-group myResourceGroup --docker-custom-image-name myregistry.azurecr.io/mycustomimage:latest --docker-registry-server-url https://myregistry.azurecr.io ``` **Benefits**: **Custom Linux environments** or **containerized apps**
93
What are the steps to explore staging environments in Azure App Service using deployment slots?
**Staging Environment Exploration**: 1. **Create deployment slot**: ```bash az webapp deployment slot create --name mywebapp --resource-group myResourceGroup --slot staging ``` 2. **Deploy code to staging**: ```bash az webapp deploy --resource-group myResourceGroup --name mywebapp --slot staging --src-path myapp.zip ``` 3. **Test staging environment**: Access via URL (e.g., `mywebapp-staging.azurewebsites.net`) **Benefits**: **Isolates staging from production** for testing
94
What does examining slot swapping mean in Azure App Service deployment slots, and how can you prepare for it?
"**Slot Swap Examination**: Verify settings and configurations **before swapping** **Preparation Steps**: - Check **slot-specific settings** (connection strings) - Ensure `slotSetting: true` for **sticky settings**: ```bash az webapp config connection-string set --name mywebapp --resource-group myResourceGroup --slot staging --settings \"DefaultConnection=Server=tcp:server.database.windows.net ``` - **Review slot contents** and **test functionality** before swapping"
95
How can you swap deployment slots in Azure App Service to move a staging environment to production?
**Deployment Slot Swapping**: ```bash az webapp deployment slot swap --name mywebapp --resource-group myResourceGroup --slot staging ``` **Process**: - Moves **staging slot content** to production - Updates production URL (`mywebapp.azurewebsites.net`) - Preserves **slot settings** if marked as `slotSetting: true`
96
How can you route traffic in Azure App Service using deployment slots to test a new version of an app?
**Traffic Routing with Deployment Slots**: 1. **Enable traffic routing**: ```bash az webapp traffic-routing set --name mywebapp --resource-group myResourceGroup --slot staging --percentage 20 ``` 2. **Testing**: **20% of traffic** goes to staging slot, **80%** to production **Benefits**: **Gradual rollout** and **testing in production** before full swap
97
When should you consider implementing autoscaling for Azure App Service, and what are the key benefits?
**Consider Autoscaling When**: - Autoscaling **improves elasticity** and **fault tolerance** - Autoscaling works by **adding or removing web servers** based on load - Autoscaling **isn't best for long-term growth** (use manual scaling instead) - **Number of instances** affects scalability needs **Key Benefits**: - **Availability** - **Fault tolerance** - **Cost efficiency** by scaling dynamically based on usage
98
What should you do to allow external access to an Azure Container Apps service that has ingress disabled and is scaling to zero instances, without causing downtime?
**Solution**: **Enable ingress** and **configure an HTTP scaling rule** **Reasoning**: - **Enabling ingress** allows external requests to reach the app - **HTTP scaling rule** ensures app scales up with incoming traffic and down to zero when idle - **Prevents downtime** by dynamically adjusting to demand **Other options** (ASE, Traffic Manager, VNet integration) don't directly enable external access or handle scaling efficiently
99
What is an HTTP scaling rule in Azure Container Apps, and how does it support external access for an application?
**HTTP Scaling Rule**: Automatically scales the app based on **incoming HTTP requests** **Benefits**: - **Scales up instances** when traffic increases - **Scales down to zero** when idle - **Supports external access** by ensuring app is active to handle requests - **Prevents downtime** **Ideal for**: **Cost-efficient**, **demand-driven scaling** in serverless container apps
100
How should you configure Azure Kubernetes Service (AKS) for a financial institution's microservices handling real-time payment processing to ensure zero downtime during updates, automatic scaling during peak hours, and secure connections to Azure Key Vault?
**AKS Configuration**: Use **AKS Deployment Strategy with rolling update policy** and **enable horizontal pod autoscaling (HPA)** **Benefits**: - **Rolling updates** replace pods gradually, ensuring **zero downtime** - **HPA** scales pod replicas based on **CPU usage**, handling peak loads automatically - **Managed identities** enable secure **Key Vault access** without credentials **Other options** (blue-green deployment, Helm charts, single-node pools) are less efficient or don't meet **high-availability** needs
101
What is a rolling update policy in AKS, and how does it ensure zero downtime for microservices during updates?
**Rolling Update Policy**: Updates pods **incrementally**, replacing old pods with new ones while keeping others active **Zero Downtime Process**: - **Monitors new pods' health**, halting updates if issues arise - **Ensures availability** by maintaining active pods to serve traffic during update - **Gradual replacement** prevents service interruption **Ideal for**: **High-availability apps** like payment processing microservices
102
How should you configure an Azure Function app for a logistics company processing real-time GPS data to ensure no data loss during regional outages, conflict-free multi-region processing, and automatic recovery with minimal downtime?
**Configuration**: Use **Durable Functions with checkpointing enabled** and **deploy in multiple regions** **Benefits**: - **Checkpointing** saves state, ensuring **no data loss** by resuming from last checkpoint after failures - **Multi-region deployment** enables **failover** to another region during outages, minimizing downtime - **Durable Functions** manage state to process data from multiple regions **without conflicts** **Other options** (geo-replication, ASE, Event Grid) don't provide **state management** or **automatic recovery**
103
What autoscaling methods should you configure for an Azure App Service that experiences predictable traffic spikes every month to handle increased traffic while optimizing costs?
**Autoscaling Methods**: Use **schedule recurrence** and **CPU utilization** **Benefits**: - **Schedule recurrence** scales instances up during **known peak times** each month - **CPU utilization** dynamically adjusts instances for **unexpected spikes** beyond scheduled scaling - **Cost optimization**: Ensures performance during peaks and **cost efficiency** during off-peak times **Other options** (predictive algorithms, fixed instances, manual intervention) lack **flexibility** or **efficiency**
104
How do schedule recurrence and CPU utilization optimize autoscaling for predictable traffic spikes?
**Optimization Strategy**: - **Schedule recurrence**: **Proactively scales up** instances during known peak times - **CPU utilization**: **Reacts to unexpected spikes**, adding instances as load increases - **Cost efficiency**: Scales down during **off-peak periods** **Result**: **Balanced, responsive approach** for predictable traffic patterns
105
How should you configure an Azure Function App to process messages from an Azure Storage Queue while ensuring FIFO message processing?
**Configuration**: Use **Azure Service Bus Queue with sessions** instead of Storage Queue **Benefits**: - **Service Bus Queues** support **sessions**, ensuring messages with same **session ID** are processed **in order** - **Guarantees FIFO** (First In, First Out) processing within each session - **Unlike Storage Queues**, which don't support ordering, Service Bus meets **strict FIFO needs** **Other options** (Storage Queue settings, Timer triggers, Logic Apps) don't ensure **FIFO**
106
How does using Azure Service Bus Queue with sessions ensure FIFO message processing in an Azure Function App?
**Service Bus Queue with Sessions**: - **Groups messages** by **session ID**, processing them in **sent order** - **Guarantees FIFO** within each session, critical for **sequential workflows** - **Allows parallel processing** of different sessions while **maintaining order** within each **Ideal for**: Replacing Storage Queues when **strict ordering** is required
107
What is checkpointing in Durable Functions, and how does it support disaster recovery for an Azure Function app?
**Checkpointing**: Saves the **state of a workflow** at key points during execution **Disaster Recovery Support**: - **Allows functions** to **resume from last checkpoint** after failure or outage - **Prevents data loss** by maintaining workflow state - **Supports automatic recovery** with **minimal downtime** **Essential for**: **Reliable processing** in apps like **real-time GPS data systems**
108
How should you configure an Azure Function app to process large files in parallel for efficient data handling?
**Configuration**: Set up a **Premium plan** and configure function to run on **multiple instances** **Benefits**: - **Premium plan** enables **multiple instances** for **concurrent file processing** - **Enhanced performance** with increased memory and **faster cold starts** - **Fine-tuning of concurrency** for optimal throughput **Other options** (single-threaded, Event Grid, Durable Functions) don't scale as efficiently for **simple concurrency**
109
How does using a Premium plan with multiple instances in an Azure Function app ensure efficient parallel processing of large files?
**Premium Plan with Multiple Instances**: - **Runs multiple function instances** simultaneously for **parallel file processing** - **Boosts performance** with enhanced resources and **faster scaling** - **Supports high concurrency** to handle large file workloads efficiently **Ideal for**: **Maximizing throughput** in **file-heavy applications**
110
Which Azure service should you use for a high-throughput application storing large volumes of time-series data with efficient querying?
**Service**: Use **Azure Cosmos DB with the SQL API** **Benefits**: - **Scales horizontally** to handle **high-throughput** time-series data - **SQL API** enables **efficient temporal queries** with indexing - **Supports global distribution** for **low-latency access** **Other options** (SQL Database, Data Lake, Table Storage) don't offer the same **querying efficiency** and **scalability**
111
How does Azure Cosmos DB with the SQL API ensure efficient storage and querying for high-throughput time-series data?
**Azure Cosmos DB with the SQL API**: - Manages **high-throughput data** with **automatic scaling** and **global distribution** - Provides **fast temporal queries** using **SQL API** and **indexing** - Stores **large volumes** of time-series data with **low-latency access** It's ideal for **high-performance time-series applications** in Azure.