ExamGecko
Home Home / Microsoft / AZ-400

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

Question list
Search
Search

List of questions

Search

Related questions











Note: This question-is part of a series of questions that present the same scenario. Each question-in the series contains a unique solution that might meet the stated goals. Some question-sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question-in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen.

Your company uses Azure DevOps to manage the build and release processes for applications.

You use a Get repository for applications source control.

You need to implement a pull request strategy that reduces the history volume in the master branch.

Solution: You implement a pull request strategy that uses a three-way merge.

Does this meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
Suggested answer: B

Explanation:

Instead use fast-forward merge.

Note:

No fast-forward merge - This option merges the commit history of the source branch when the pull request closes and creates a merge commit in the target branch.

Reference:

https://docs.microsoft.com/en-us/azure/devops/repos/git/branch-policies

You need to recommend a Docker container build strategy that meets the following requirements:

Minimizes image sizes

Minimizes the security surface area of the final image

What should you include in the recommendation?

A.
multi-stage builds
A.
multi-stage builds
Answers
B.
PowerShell Desired State Configuration (DSC)
B.
PowerShell Desired State Configuration (DSC)
Answers
C.
Docker Swarm
C.
Docker Swarm
Answers
D.
single-stage builds
D.
single-stage builds
Answers
Suggested answer: A

Explanation:

Multi-stage builds are a new feature requiring Docker 17.05 or higher on the daemon and client. Multistage builds are useful to anyone who has struggled to optimize Dockerfiles while keeping them easy to read and maintain. Incorrect Answers:

C: A swarm consists of multiple Docker hosts which run in swarm mode and act as managers (to manage membership and delegation) and workers (which run swarm services).

Reference:

https://docs.docker.com/develop/develop-images/multistage-build/

You plan to create an image that will contain a .NET Core application.

You have a Dockerfile file that contains the following code. (Line numbers are included for reference only.)

You need to ensure that the image is as small as possible when the image is built.

Which line should you modify in the file?

A.
1
A.
1
Answers
B.
3
B.
3
Answers
C.
4
C.
4
Answers
D.
7
D.
7
Answers
Suggested answer: C

Explanation:


Note: This question-is part of a series of questions that present the same scenario. Each question-in the series contains a unique solution that might meet the stated goals. Some question-sets might have more than one correct solution, while others might not have a correct solution.

After you answer a question-in this section, you will NOT be able to return to it. As a result, these questions will not appear in the review screen. Your company has a project in Azure DevOps for a new web application.

You need to ensure that when code is checked in, a build runs automatically.

Solution: From the Triggers tab of the build pipeline, you select Batch changes while a build is in progress. Does this meet the goal?

A.
Yes
A.
Yes
Answers
B.
No
B.
No
Answers
Suggested answer: B

Explanation:

Instead, In Visual Designer you enable continuous integration (CI) by:

1. Select the Triggers tab.

2. Enable Continuous integration.

Note: Batch changes

Select this check box if you have many team members uploading changes often and you want to reduce the number of builds you are running. If you select this option, when a build is running, the system waits until the build is completed and then queues another build of all changes that have not yet been built.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/get-started-designer

You have 50 Node.js-based projects that you scan by using WhiteSource. Each project includes Package.json, Package-lock.json, and Npm-shrinkwrap.json files. You need to minimize the number of libraries reports by WhiteSource to only the libraries that you explicitly reference. What should you do?

A.
Configure the File System Agent plug-in.
A.
Configure the File System Agent plug-in.
Answers
B.
Add a devDependencies section to Package-lock.json.
B.
Add a devDependencies section to Package-lock.json.
Answers
C.
Configure the Artifactory plug-in.
C.
Configure the Artifactory plug-in.
Answers
D.
Delete Package-lock.json.
D.
Delete Package-lock.json.
Answers
Suggested answer: B

Explanation:

Separate Your Dependencies

Within your package.json file be sure you split out your npm dependencies between devDependencies and (production) dependencies. The key part is that you must then make use of the --production flag when installing the npm packages. The --production flag will exclude all packages defined in the devDependencies section.

Reference: https://blogs.msdn.microsoft.com/visualstudioalmrangers/2017/06/08/manage-your-open-source-usage-and-security-as-reported-by-your-cicd-pipeline/

Your company deploys applications in Docker containers.

You want to detect known exploits in the Docker images used to provision the Docker containers.

You need to integrate image scanning into the application lifecycle. The solution must expose the exploits as early as possible during the application lifecycle. What should you configure?

A.
a task executed in the continuous integration pipeline and a scheduled task that analyzes the image registry
A.
a task executed in the continuous integration pipeline and a scheduled task that analyzes the image registry
Answers
B.
manual tasks performed during the planning phase and the deployment phase
B.
manual tasks performed during the planning phase and the deployment phase
Answers
C.
a task executed in the continuous deployment pipeline and a scheduled task against a running production container
C.
a task executed in the continuous deployment pipeline and a scheduled task against a running production container
Answers
D.
a task executed in the continuous integration pipeline and a scheduled task that analyzes the production container
D.
a task executed in the continuous integration pipeline and a scheduled task that analyzes the production container
Answers
Suggested answer: A

Explanation:

You can use the Docker task to sign into ACR and then use a subsequent script to pull an image and scan the container image for vulnerabilities. Use the docker task in a build or release pipeline. This task can be used with Docker or Azure Container registry.

Incorrect Answers:

C: We should not wait until deployment. We want to detect the exploits as early as possible.

D: We should wait until the image is in the product container. We want to detect the exploits as early as possible.

Reference: https://docs.microsoft.com/en-us/azure/devops/articles/security-validation-cicd-pipeline?view=vsts

Your company has a hybrid cloud between Azure and Azure Stack.

The company uses Azure DevOps for its full CI/CD pipelines. Some applications are built by using Erlang and Hack. You need to ensure that Erlang and Hack are supported as part of the build strategy across the hybrid cloud. The solution must minimize management overhead. What should you use to execute the build pipeline?

A.
a Microsoft-hosted agent
A.
a Microsoft-hosted agent
Answers
B.
Azure DevOps self-hosted agents on Azure DevTest Labs virtual machines.
B.
Azure DevOps self-hosted agents on Azure DevTest Labs virtual machines.
Answers
C.
Azure DevOps self-hosted agents on Hyper-V virtual machines
C.
Azure DevOps self-hosted agents on Hyper-V virtual machines
Answers
D.
Azure DevOps self-hosted agents on virtual machines that run on Azure Stack
D.
Azure DevOps self-hosted agents on virtual machines that run on Azure Stack
Answers
Suggested answer: D

Explanation:

Azure Stack offers virtual machines (VMs) as one type of an on-demand, scalable computing resource. You can choose a VM when you need more control over the computing environment.

Reference: https://docs.microsoft.com/en-us/azure/azure-stack/user/azure-stack-compute-overview

Your company has an Azure DevOps project,

The source code for the project is stored in an on-premises repository and uses on an on-premises build server. You plan to use Azure DevOps to control the build process on the build server by using a self-hosted agent. You need to implement the self-hosted agent.

You download and install the agent on the build server.

Which two actions should you perform next? Each correct answer presents part of the solution.

A.
From Azure, create a shared access signature (SAS).
A.
From Azure, create a shared access signature (SAS).
Answers
B.
From the build server, create a certificate, and then upload the certificate to Azure Storage.
B.
From the build server, create a certificate, and then upload the certificate to Azure Storage.
Answers
C.
From the build server, create a certificate, and then upload the certificate to Azure Key Vault.
C.
From the build server, create a certificate, and then upload the certificate to Azure Key Vault.
Answers
D.
From DevOps, create a personal access token (PAT).
D.
From DevOps, create a personal access token (PAT).
Answers
E.
From the build server, run config.cmd.
E.
From the build server, run config.cmd.
Answers
Suggested answer: B, E

Explanation:

B: Make sure you install your self-signed ssl server certificate into the OS certificate store.

E: When you have a self-signed SSL certificate for your on-premises TFS server, make sure to configure the Get we shipped to allow that self-signed SSL certificate. Enable Get to use SChannel during configure with 2.129.0 or higher version agent Pass --gituseschannel during agent configuration ./config.cmd --gituseschannel

Reference: https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/certificate

Explanation:

Create an Azure Resource Manager service connection with an existing service principal

AB: Enter the information about your service principal into the Azure subscription dialog textboxes:

Tenant ID

Subscription ID

Subscription name

Service principal ID

Either the service principal client key or, if you have selected Certificate, enter the contents of both the certificate and private key sections of the *.pem file.

D: To deploy to a specific Azure resource, the task will need additional data about that resource.

If you're using the classic editor, select data you need. For example, the App service name.

If you're using YAML, then go to the resource in the Azure portal, and then copy the data into your code. For example, to deploy a web app, you would copy the name of the App Service into the WebAppName value.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure

A.
the tenant ID
A.
the tenant ID
Answers
B.
the subscription ID
B.
the subscription ID
Answers
C.
the client secret
C.
the client secret
Answers
D.
the app ID
D.
the app ID
Answers
E.
E.
Answers
Suggested answer: A, B, D

Explanation:

Create an Azure Resource Manager service connection with an existing service principal

AB: Enter the information about your service principal into the Azure subscription dialog textboxes:

Tenant ID

Subscription ID

Subscription name

Service principal ID

Either the service principal client key or, if you have selected Certificate, enter the contents of both the certificate and private key sections of the *.pem file.

D: To deploy to a specific Azure resource, the task will need additional data about that resource.

If you're using the classic editor, select data you need. For example, the App service name.

If you're using YAML, then go to the resource in the Azure portal, and then copy the data into your code. For example, to deploy a web app, you would copy the name of the App Service into the WebAppName value.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure

A. the tenant ID

B. the subscription ID

C. the client secret

D. the app ID

E. the object ID

Answer: ABD

Explanation:

Create an Azure Resource Manager service connection with an existing service principal

AB: Enter the information about your service principal into the Azure subscription dialog textboxes:

Tenant ID

Subscription ID

Subscription name

Service principal ID

Either the service principal client key or, if you have selected Certificate, enter the contents of both the certificate and private key sections of the *.pem file. D: To deploy to a specific Azure resource, the task will need additional data about that resource.

If you're using the classic editor, select data you need. For example, the App service name.

If you're using YAML, then go to the resource in the Azure portal, and then copy the data into your code. For example, to deploy a web app, you would copy the name of the App Service into the WebAppName value.

Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure

You need to execute inline testing of an Azure DevOps pipeline that uses a Docker deployment model. The solution must prevent the results from being published to the pipeline. What should you use for the inline testing?

A.
a single stage Dockerfile
A.
a single stage Dockerfile
Answers
B.
an Azure Kubernetes Service (AKS) pod
B.
an Azure Kubernetes Service (AKS) pod
Answers
C.
a multi-stage Dockerfile
C.
a multi-stage Dockerfile
Answers
D.
a Docker Compose file
D.
a Docker Compose file
Answers
Suggested answer: D

Explanation:

Use Docker when running integration tests with Azure Pipelines.

Reference: https://crossprogramming.com/2019/12/27/use-docker-when-running-integration-tests-with-azure-pipelines.html

Total 482 questions
Go to page: of 49