Question 43 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure

Question 43 of 179 from exam AZ-204: Developing Solutions for Microsoft Azure

Question

HOTSPOT - You are preparing to deploy a Python website to an Azure Web App using a container.

The solution will use multiple containers in the same container group.

The Dockerfile that builds the container is as follows:

FROM python:
ADD website.py
CMD [ “python”, “./website.py”]

You build a container by using the following command.

The Azure Container Registry instance named images is a private registry.

docker build -t images.azurecr.io/website:v1.0.0

The user name and password for the registry is admin.

The Web App must always run the same version of the website regardless of future builds.

You need to create an Azure Web App to run the website.

How should you complete the commands? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Hot Area:

Answer Area

az configure --defaults web=website

az configure --defaults group=website

az appservice plan create --name websitePlan Vv
~-sku SHARED
~-tags container

~-Sku B1 --hyper-v
~sku B1 —is-linux

az webapp create --plan websitePlan

--deployment-source-url images.azurecr.io/website:v1.0.0
--deployment-source-url images.azurecr.io/website'latest
~-deployment-container-image-name images.azurecr.io/website:v1.0.0
~-deployment-container-image-name images.azurecr iolwebsite latest

az webapp config

Vv

set --python-version 2.7 --generic-configurations user=admin password=admin

‘set -python-version 3.6 --generic-configurations user=admin password=admin

container set -docker-registry-server-url https:/images.azurecr.io -u admin -p admin
container set --docker-registry-server-url https://images.azurecr.io/website -u admin -p admin

Explanations

Answer Area

az configure --defaults web=website

az configure --defaults group=website

az appservice plan create --name websitePlan Vv
~sku SHARED
tags container

~sku B1 —-hyper-v
~sku B1 -is-linux

az webapp create --plan websitePlan

lv

images.azurecr.io/website:v1.0.0
| --deployment-source-url images.azurecr io/website latest
--deployment-container-image-name images.azurecr.io/website-v1.0.0
~-deployment-container-image-name images. azurecr.io/website'latest

az webapp config

lv

set --python-version 2.7 --generic-configurations user=admin password=admin

‘set -python-version 3.6 --generic-configurations user=admin password=admin

container set -docker-registry-server-url https://images.azurecr.io -u admin -p admin
container set -docker-registry-server-url https://images.azurecr iolwebsite -u admin -p admin

Box 1: --SKU B1 --hyper-v - --hyper-v Host web app on Windows container.

Box 2: --deployment-source-url images.azurecr.io/website:v1.0.0 --deployment-source-url -u Git repository URL to link with manual integration.

The Web App must always run the same version of the website regardless of future builds.

Incorrect: --deployment-container-image-name -i Linux only.

Container image name from Docker Hub, e.g.

publisher/image-name:tag.

Box 3: az webapp config container set -url https://images.azurecr.io -u admin -p admin az webapp config container set Set a web app container's settings.

Paremeter: --docker-registry-server-url -r The container registry server url.

The Azure Container Registry instance named images is a private registry.

Example: az webapp config container set --docker-registry-server-url https://{azure-container-registry-name}.azurecr.io Reference: https://docs.microsoft.com/en-us/cli/azure/appservice/plan.