ExamGecko
Home Home / Microsoft / AZ-400

Microsoft AZ-400 Practice Test - Questions Answers, Page 12

Question list
Search
Search

List of questions

Search

Related questions











HOTSPOT

You company uses Azure DevOps to deploy infrastructures to Azure.

Pipelines are developed by using YAML.

You execute a pipeline and receive the results in the web portal for Azure Pipelines as shown in the following exhibit.

Use the drop-down menus to select the answer choice that completes each statement based on the information presented in the graphic.

NOTE: Each correct selection is worth one point.


Question 111
Correct answer: Question 111

Explanation:

Reference:

https://dev.to/rajikaimal/azure-devops-ci-cd-yaml-pipeline-4glj

DRAG DROP

You are configuring Azure DevOps build pipelines.

You plan to use hosted build agents.

Which build agent pool should you use to compile each application type? To answer, drag the appropriate build agent pools to the correct application types. Each build agent pool may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.


Question 112
Correct answer: Question 112

Explanation:

- Hosted macOS

- Hosted Windows container

https://devblogs.microsoft.com/devops/removing-older-images-in-azure-pipelines-hosted-pools/

https://docs.microsoft.com/en-us/azure/devops/release-notes/2019/sprint-154-update#single-hosted-pool https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/pools-queues?view=azure-devops&tabs=yaml%2Cbrowser

HOTSPOT

You are designing YAML-based Azure pipelines for the apps shown in the following table.

You need to configure the YAML strategy value for each app. The solution must minimize app downtime.

Which value should you configure for each app? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.


Question 113
Correct answer: Question 113

Explanation:

App1: rolling

A rolling deployment replaces instances of the previous version of an application with instances of the new version of the application on a fixed set of virtual machines (rolling set) in each iteration.

App2: canary

Canary deployment strategy is an advanced deployment strategy that helps mitigate the risk involved in rolling out new versions of applications. By using this strategy, you can roll out the changes to a small subset of servers first. As you gain more confidence in the new version, you can release it to more servers in your infrastructure and route more traffic to it. Incorrect Answers:

runonce:

runOnce is the simplest deployment strategy wherein all the lifecycle hooks, namely preDeploy deploy, routeTraffic, and postRouteTraffic, are executed once. Then, either on: success or on: failure is executed.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/process/deployment-jobs

DRAG DROP

Your company has two virtual machines that run Linux in a third-party public cloud.

You plan to use the company’s Azure Automation State Configuration implementation to manage the two virtual machines and detect configuration drift.

You need to onboard the Linux virtual machines.

You install PowerShell Desired State Configuration (DSC) on the virtual machines, and then run register.py.

Which three actions should you perform next in sequence? To answer, move the actions from the list of actions to the answer area and arrange them in the correct order.


Question 114
Correct answer: Question 114

Explanation:

Step 1: Create a DSC metaconfiguration

Load up the DSC Configuration into Azure Automation.

Step 2: Copy the metaconfiguration to the virtual machines.

Linking the Node Configuration to the Linux Host

Step 3: Add the virtual machines as DSC nodes in Azure Automation.

go to DSC Nodes, select your node, and then click Assign node configuration. This step assigns the DSC configuration to the Linux machine.

Next up will be to link the node configuration to the host. Go to the host and press the “Assign node…”-button. Next up you can select your node configuration.

DRAG DROP

You are creating a container for an ASP.NET Core app.

You need to create a Dockerfile file to build the image. The solution must ensure that the size of the image is minimized.

How should you configure the file? To answer, drag the appropriate values to the correct targets. Each value may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.


Question 115
Correct answer: Question 115

Explanation:

Box 1: mcr.microsoft.com/dotnet/sdk:5.0

The first group of lines declares from which base image we will use to build our container on top of. If the local system does not have this image already, then docker will automatically try and fetch it. The mcr.microsoft.com/dotnet/core/ sdk:5.0 comes packaged with the .NET core 5.0 SDK installed, so it's up to the task of building ASP .NET core projects targeting version 5.0

Box 2: dotnet restore

The next instruction changes the working directory in our container to be /app, so all commands following this one execute under this context.

COPY *.csproj ./

RUN dotnet restore

Box 3: mcr.microsoft.com/dotnet/aspnet:5.0

When building container images, it's good practice to include only the production payload and its dependencies in the container image. We don't want the .NET core SDK included in our final image because we only need the .NET core runtime, so the dockerfile is written to use a temporary container that is packaged with the SDK called build-env to build the app.

Reference:

https://docs.microsoft.com/en-us/virtualization/windowscontainers/quick-start/building-sample-app

DRAG DROP

You are configuring the settings of a new get repository in Azure Repos.

You need to ensure that pull requests in a branch meet the following criteria before they are merged:

Committed code must compile successfully.

Pull requests must have a Quality Gate status of Passed in SonarCloud.

Which policy type should you configure for each requirement? To answer, drag the appropriate policy types to the correct requirements. Each policy type may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.

NOTE: Each correct selection is worth one point.


Question 116
Correct answer: Question 116

Explanation:

Box 1: A check-in policy

Administrators of Team Foundation version control can add check-in policy requirements. These check-in policies require the user to take actions when they conduct a check-in to source control. By default, the following check-in policy types are available:

Builds Requires that the last build was successful before a check-in.

Code Analysis Requires that code analysis is run before check-in.

Work Items Requires that one or more work items be associated with the check-in.

Box 2: Build policy

Reference:

https://docs.microsoft.com/en-us/azure/devops/repos/tfvc/add-check-policies

https://azuredevopslabs.com/labs/vstsextend/sonarcloud/

HOTSPOT

You need to deploy Azure Kubernetes Service (AKS) to host an application. The solution must meet the following requirements:

Containers must only be published internally.

AKS clusters must be able to create and manage containers in Azure.

What should you use for each requirement? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point.


Question 117
Correct answer: Question 117

Explanation:

Box 1: Azure Container Registry

Azure services like Azure Container Registry (ACR) and Azure Container Instances (ACI) can be used and connected from independent container orchestrators like kubernetes (k8s). You can set up a custom ACR and connect it to an existing k8s cluster to ensure images will be pulled from the private container registry instead of the public docker hub.

Box 2: An Azure service principal

When you're using Azure Container Registry (ACR) with Azure Kubernetes Service (AKS), an authentication mechanism needs to be established. You can set up AKS and ACR integration during the initial creation of your AKS cluster. To allow an AKS cluster to interact with ACR, an Azure Active Directory service principal is used.

References:

https://thorsten-hans.com/how-to-use-private-azure-container-registry-with-kubernetes

https://docs.microsoft.com/en-us/azure/aks/cluster-container-registry-integration

DRAG DROP

You are deploying a new application that uses Azure virtual machines.

You plan to use the Desired State Configuration (DSC) extension on the virtual machines.

You need to ensure that the virtual machines always have the same Windows feature installed.

Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.


Question 118
Correct answer: Question 118

Explanation:

Step 1: Create a PowerShell configuration file

You create a simple PowerShell DSC configuration file.

Step 2: Load the file to Azure Blob storage

Package and publish the module to a publically accessible blob container URL

Step 3: Configure the Custom Script Extension on the virtual machines.

The Custom Script Extension downloads and executes scripts on Azure virtual machines.

Reference:

https://docs.microsoft.com/en-us/azure/automation/automation-dsc-getting-started

https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows

DRAG DROP

You have an Azure DevOps release pipeline as shown in the following exhibit.

You need to complete the pipeline to configure OWASP ZAP for security testing.

Which five Azure CLI tasks should you add in sequence? To answer, move the tasks from the list of tasks to the answer area and arrange them in the correct order.


Question 119
Correct answer: Question 119

Explanation:

Defining the Release Pipeline

Once the application portion of the Release pipeline has been configured, the security scan portion can be defined. In our example, this consists of 8 tasks, primarily using the Azure CLI task to create and use the ACI instance (and supporting structures).

Otherwise specified, all the Azure CLI tasks are Inline tasks, using the default configuration options.

Reference:

https://devblogs.microsoft.com/premier-developer/azure-devops-pipelines-leveraging-owasp-zap-in-the-release-pipeline/

HOTSPOT

You company uses a get source-code repository.

You plan to implement Gitflow as a workflow strategy.

You need to identify which branch types are used for production code and preproduction code in the strategy.

Which branch type should you identify for each code type? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.


Question 120
Correct answer: Question 120

Explanation:

Box 1: Master

The Master branch contains production code. All development code is merged into master in sometime.

Box 2: Develop

The Develop branch contains pre-production code. When the features are finished then they are merged into develop.

Incorrect Answers:

During the development cycle, a variety of supporting branches are used:

Feature branches are used to develop new features for the upcoming releases. May branch off from develop and must merge into develop.

Feature branches are used to develop new features for the upcoming releases. May branch off from develop and must merge into develop.

Reference:

https://medium.com/@patrickporto/4-branching-workflows-for-git-30d0aaee7bf

Total 482 questions
Go to page: of 49