AZ-400 – Question 274

0
484
Introductory Info
Case Study –
This is a case study. Case studies are not timed separately. You can use as much exam time as you would like to complete each case. However, there may be additional case studies and sections on this exam. You must manage your time to ensure that you are able to complete all questions included on this exam in the time provided.
To answer the questions included in a case study, you will need to reference information that is provided in the case study. Case studies might contain exhibits and other resources that provide more information about the scenario that is described in the case study. Each question is independent of the other questions in this case study.
At the end of this case study, a review screen will appear. This screen allows you to review your answers and to make changes before you move to the next section of the exam. After you begin a new section, you cannot return to this section.
To start the case study –
To display the first question in this case study, click the Next button. Use the buttons in the left pane to explore the content of the case study before you answer the questions. Clicking these buttons displays information such as business requirements, existing environment, and problem statements. If the case study has an All Information tab, note that the information displayed is identical to the information displayed on the subsequent tabs. When you are ready to answer a question, click the Question button to return to the question.

Overview –
Contoso, Ltd. is a manufacturing company that has a main office in Chicago.

Existing Environment –
Contoso plans to improve its IT development and operations processes by implementing Azure DevOps principles. Contoso has an Azure subscription and creates an Azure DevOps organization.

The Azure DevOps organization includes:
  • The Docker extension
  • A deployment pool named Pool7 that contains 10 Azure virtual machines that run Windows Server 2019
  • The Azure subscription contains an Azure Automation account.
Requirements –

Planned changes –
Contoso plans to create projects in Azure DevOps as shown in the following table.

Technical requirements –
Contoso identifies the following technical requirements:

  • Implement build agents for Project1.
  • Whenever possible, use Azure resources.
  • Avoid using deprecated technologies.
  • Implement a code flow strategy for Project2 that will:
    • Enable Team2 to submit pull requests for Project2.
    • Enable Team2 to work independently on changes to a copy of Project2.
    • Ensure that any intermediary changes performed by Team2 on a copy of Project2 will be subject to the same restrictions as the ones defined in the build policy of Project2.
  • Whenever possible, implement automation and minimize administrative effort.
  • Implement Project3, Project5, Project6, and Project7 based on the planned changes.
  • Implement Project4 and configure the project to push Docker images to Azure Container Registry.
Question 1:
You add the virtual machines as managed nodes in Azure Automation State Configuration.
You need to configure the managed computers in Pool7.

What should you do next?

A. Modify the RefreshMode property of the Local Configuration Manager (LCM).
B. Run the Register-AzureRmAutomationDscNode Azure Powershell cmdlet.
C. Modify the ConfigurationMode property of the Local Configuration Manager (LCM).
D. Install PowerShell Core.
 
Correct Answer: C
Reference:

https://docs.microsoft.com/en-us/powershell/dsc/managing-nodes/metaConfig?view=dsc-1.1 
https://docs.microsoft.com/en-us/powershell/module/az.automation/register-azautomationdscnode?view=azps-7.3.2#parameters

Question 2:

DRAG DROP –
You need to implement the code flow strategy for Project2 in Azure DevOps.
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.
Select and Place:
Correct Answer:
Step 1: Create a repository –
A Git repository, or repo, is a folder that you’ve told Git to help you track file changes in. You can have any number of repos on your computer, each stored in their own folder.
Step 2: Create a fork –
Step 3: Add a build policy for the fork
Build policies help teams protect their important branches of development. Policies enforce your team’s code quality and change management standards.
Scenario:
Implement a code flow strategy for Project2 that will:
✑ Enable Team2 to submit pull requests for Project2.
✑ Enable Team2 to work independently on changes to a copy of Project2.
✑ Ensure that any intermediary changes performed by Team2 on a copy of Project2 will be subject to the same restrictions as the ones defined in the build policy of Project2.

Referencehttps://docs.microsoft.com/en-us/azure/devops/repos/git/manage-your-branches

Question 3:

DRAG DROP –
You need to configure Azure Automation for the computers in Pool7.
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.
Select and Place:
Correct Answer:
Step 1: Create a Desired State Configuration (DSC) configuration file that has an extension of .ps1.
Step 2: Run the Import-AzureRmAutomationDscConfiguration Azure Powershell cmdlet
The Import-AzureRmAutomationDscConfiguration cmdlet imports an APS Desired State Configuration (DSC) configuration into Azure Automation. Specify the path of an APS script that contains a single DSC configuration.
Example:
PS C:\>Import-AzureRmAutomationDscConfiguration -AutomationAccountName "Contoso17"-ResourceGroupName "ResourceGroup01" -SourcePath "C:\DSC
\client.ps1" -Force
This command imports the DSC configuration in the file named client.ps1 into the Automation account named Contoso17. The command specifies the Force parameter. If there is an existing DSC configuration, this command replaces it.
Step 3: Run the Start-AzureRmAutomationDscCompilationJob Azure Powershell cmdlet
The Start-AzureRmAutomationDscCompilationJob cmdlet compiles an APS Desired State Configuration (DSC) configuration in Azure Automation.

Reference:
https://docs.microsoft.com/en-us/powershell/module/azurerm.automation/import-azurermautomationdscconfiguration 
https://docs.microsoft.com/en-us/powershell/module/azurerm.automation/start-azurermautomationdsccompilationjob

Question 4:

HOTSPOT –
How should you configure the filters for the Project5 trigger? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Hot Area:
Correct Answer:
Box 1: branch filter to exclude –
Scenario:

Continuous integration (CI) triggers cause a build to run whenever a push is made to the specified branches or a specified tag is pushed.

Question 5:

In Azure DevOps, you create Project3.
You need to meet the requirements of the project.

What should you do first?

A. From Azure DevOps, modify the build definition.
B. From SonarQube, obtain an authentication token.
C. From Azure DevOps, create a service endpoint. 
D. From SonarQube, create a project.

Correct Answer: C 

The first thing to do is to declare your SonarQube server as a service endpoint in your VSTS/DevOps project settings.

Reference: https://docs.sonarqube.org/display/SCAN/Analyzing+with+SonarQube+Extension+for+vsts-TFS

Question 6:

You need to implement Project4.
What should you do first?

A. Add the FROM instruction in the Dockerfile file.
B. Add a Copy and Publish Build Artifacts task to the build pipeline.
C. Add a Docker task to the build pipeline.
D. Add the MAINTAINER instruction in the Dockerfile file.
 
Correct Answer: C 
Scenario: Implement Project4 and configure the project to push Docker images to Azure Container Registry.
You use Azure Container Registry Tasks commands to quickly build, push, and run a Docker container image natively within Azure, showing how to offload your
"inner-loop" development cycle to the cloud. ACR Tasks is a suite of features within Azure Container Registry to help you manage and modify container images across the container lifecycle.

Referencehttps://docs.microsoft.com/en-us/azure/container-registry/container-registry-quickstart-task-cli

Question 7:

DRAG DROP –
You need to recommend a procedure to implement the build agent for Project1.
Which three actions should you recommend be performed in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.
Select and Place:
Correct Answer:
Scenario:
Reference:
https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/v2-windows?view=azure-devops

Question 8:

DRAG DROP –
You need to implement Project6.
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.
Select and Place:
Correct Answer:
Scenario: Implement Project3, Project5, Project6, and Project7 based on the planned changes
Step 1: Open the release pipeline editor.
In the Releases tab of Azure Pipelines, select your release pipeline and choose Edit to open the pipeline editor.
Step 2: Enable Gates.
Choose the pre-deployment conditions icon for the Production stage to open the conditions panel. Enable gates by using the switch control in the Gates section.
Step 3: Add Query Work items.
Choose + Add and select the Query Work Items gate.
Configure the gate by selecting an existing work item query.
Note: A case for release gate is:
Incident and issues management. Ensure the required status for work items, incidents, and issues. For example, ensure deployment occurs only if no priority zero bugs exist, and validation that there are no active incidents takes place after deployment.
Reference:

https://docs.microsoft.com/en-us/azure/devops/pipelines/release/deploy-using-approvals?view=azure-devops#configure-gate