Question

Difficulty: MediumConfigure Azure Container Instances (ACI)

A company has a containerized data-validation application packaged as a Docker image. The application processes batch files exported from a database once per day, taking approximately 10 minutes to complete. The application must write its output directly to a shared directory that is accessible by other systems, and it must exit immediately after finishing. If the application terminates with an error code, it must attempt to rerun.

You need to deploy the application using Azure Container Instances (ACI).

Which configuration settings should you apply to the container group?

  1. Set the restart policy to OnFailure and mount an Azure File share as a volume inside the container group.Answer
  2. B
    Set the restart policy to Always and mount an Azure File share as a volume inside the container group.
  3. C
    Set the restart policy to OnFailure and configure the container to authenticate to the storage account using only the Subscription Owner RBAC role.
  4. D
    Set the restart policy to OnFailure and install the Azure File Sync agent inside the container to synchronize output files.

Answer

Set the restart policy to OnFailure and mount an Azure File share as a volume inside the container group.
The correct option specifies setting the restart policy to OnFailure, ensuring the container group only restarts if it terminates with a non-zero exit code. It also correctly specifies mounting an Azure File share as a volume, which provides a shared, persistent storage directory accessible by other systems.

Step-by-Step Solution

1
Determine the required restart behavior of the daily batch application.
The application runs once, exits upon success, and must restart only upon failure.
This requirement aligns with the OnFailure restart policy.
2
Determine the storage requirements for writing output to a shared directory accessible by other systems.
An Azure File share must be mounted as a volume.
ACI supports mounting Azure File shares directly to container groups to provide shared, persistent access.
3
Identify the authentication credentials needed to establish the volume mount.
The storage account name and access key must be provided in the container group definition.
Standard control-plane RBAC roles do not authorize direct SMB file share mounts inside ACI without access credentials.

Key Concept

Configuring ACI restart policies and persistent volume mounts.
Rate this question