AZ-400 : Microsoft Azure DevOps Solutions : Part 11
-
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 Enable continuous integration.
Does this meet the goal?
- Yes
- No
Explanation:
In Visual Designer you enable continuous integration (CI) by:
1. Select the Triggers tab.
2. Enable Continuous integration.A continuous integration trigger on a build pipeline indicates that the system should automatically queue a new build whenever a code change is committed.
-
You have an Azure DevOps organization named Contoso and an Azure DevOps project named Project1.
You plan to use Microsoft-hosted agents to build container images that will host full Microsoft .NET Framework apps in a YAML pipeline in Project1.
What are two possible virtual machine images that you can use for the Microsoft-hosted agent pool? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.
- vs2017-win2016
- ubuntu-16.04
- win1803
- macOS-10.13
- vs.2015-win2012r2
Explanation:
The Microsoft-hosted agent pool provides 7 virtual machine images to choose from:
– Ubuntu 16.04 (ubuntu-16.04)
– Windows Server 1803 (win1803) – for running Windows containers
– Visual Studio 2019 Preview on Windows Server 2019 (windows-2019)
– Visual Studio 2017 on Windows Server 2016 (vs2017-win2016)
– Visual Studio 2015 on Windows Server 2012R2 (vs2015-win2012r2)
– macOS X Mojave 10.14 (macOS-10.14)
– macOS X High Sierra 10.13 (macOS-10.13) -
HOTSPOT
You currently use JIRA, Jenkins, and Octopus as part of your DevOps processes.
You plan to use Azure DevOps to replace these tools.
Which Azure DevOps service should you use to replace each tool? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
Explanation:JIRA: Release pipelines
Atlassian’s Jira Software is a popular application that helps teams to plan, track, and manage software releases, whereas Octopus Deploy helps teams automate their development and operations processes in a fast, repeatable, and reliable manner. Together, they enable teams to get better end-to-end visibility into their software pipelines from idea to production.Jenkins: Repos
One way to integrate Jenkins with Azure Pipelines is to run CI jobs in Jenkins separately. This involves configuration of a CI pipeline in Jenkins and a web hook in Azure DevOps that invokes the CI process when source code is pushed to a repository or a branch.Octopus: Build pipelines
-
Your company has a project in Azure DevOps.
You need to ensure that when there are multiple builds pending deployment, only the most recent build is deployed.
What should you use?
- deployment conditions
- deployment queue settings
- release gates
- pull request triggers
Explanation:The options you can choose for a queuing policy are:
Number of parallel deployments
If you specify a maximum number of deployments, two more options appear:
– Deploy all in sequence
– Deploy latest and cancel the others: Use this option if you are producing releases faster than builds, and you only want to deploy the latest build.Incorrect Answers:
C: Release gates allow automatic collection of health signals from external services, and then promote the release when all the signals are successful at the same time or stop the deployment on timeout. Typically, gates are used in connection with incident management, problem management, change management, monitoring, and external approval systems. -
Your company develops a client banking application that processes a large volume of data.
Code quality is an ongoing issue for the company. Recently, the code quality has deteriorated because of an increase in time pressure on the development team.
You need to implement static code analysis.
During which phase should you use static code analysis?
- integration testing
- staging
- production release
- build
Explanation:The Secure Development Lifecycle (SDL) Guidelines recommend that teams perform static analysis during the implementation phase of their development cycle.
Note: The company should focus in particular on the implementation of DevOps tests to assess the quality of the software from the planning stage to the implementation phase of the project.
-
DRAG DROP
You have a project in Azure DevOps that uses packages from multiple public feeds. Some of the feeds are unreliable.
You need to consolidate the packages into a single feed.
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.
Explanation:Step 1: Create a NuGet package.
NuGet and Maven are public package managers that support multiple feeds.Step 2: Create an Azure Artifacts feed that uses upstream sources
If you want to use packages from multiple feeds, use upstream sources to bring packages from multiple feeds together into a single feed.Step 3: Create a Micrtosoft Visual Studio project that includes all the packages
Consume NuGet packages from upstream sources: Now you can open Visual Studio and install packages from the upstream sources you just configured. -
HOTSPOT
You have the Azure DevOps pipeline 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.
Explanation:Box 1: 1
The Cloud agent job only.Box 2: 4
The pipeline has the four tasks: NuGet restore, Compile Application, Copy Files, and Publish Artifact. -
SIMULATION
You have an Azure function hosted in an App Service plan named az400-9940427-func1.
You need to configure az400-9940427-func1 to upgrade the functions automatically whenever new code is committed to the master branch of https://github.com/Azure-Samples/functions-quickstart.
To complete this task, sign in to the Microsoft Azure portal.
- See explanation below.
Explanation:1. Open Microsoft Azure Portal
2. Log into your Azure account, select App Services in the Azure portal left navigation, and then select configure az400-9940427-func1.
3. On the app page, select Deployment Center in the left menu.
4. On the Build provider page, select Azure Pipelines (Preview), and then select Continue.
5. On the Configure page, in the Code section:
For GitHub, drop down and select the Organization, Repository, and Branch you want to deploy continuously.
6. Select Continue.
7. On the Test page, choose whether to enable load tests, and then select Continue.
8. Depending on your App Service plan pricing tier, you may see a Deploy to staging page. Choose whether to enable deployment slots, and then select Continue.
9. After you configure the build provider, review the settings on the Summary page, and then select Finish. -
DRAG DROP
You need to use Azure Automation State Configuration to manage the ongoing consistency of virtual machine configurations.
Which five 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.
NOTE: More than one order of answer choices is correct. You will receive credit for any of the correct orders you select.
Explanation:Step 1: Assign the node configuration.
You create a simple DSC configuration that ensures either the presence or absence of the Web-Server Windows Feature (IIS), depending on how you assign nodes.Step 2: Upload a configuration to Azure Automation State Configuration.
You import the configuration into the Automation account.Step 3: Compiling a configuration into a node configuration
Compiling a configuration in Azure Automation
Before you can apply a desired state to a node, a DSC configuration defining that state must be compiled into one or more node configurations (MOF document), and placed on the Automation DSC Pull Server.Step 4: Onboard the virtual machines to Azure State Configuration
Onboarding an Azure VM for management with Azure Automation State ConfigurationStep 5: Check the compliance status of the node.
Viewing reports for managed nodes. Each time Azure Automation State Configuration performs a consistency check on a managed node, the node sends a status report back to the pull server. You can view these reports on the page for that node.On the blade for an individual report, you can see the following status information for the corresponding consistency check:
The report status — whether the node is “Compliant”, the configuration “Failed”, or the node is “Not Compliant” (when the node is in ApplyandMonitor mode and the machine is not in the desired state). -
You are developing an application. The application source has multiple branches.
You make several changes to a branch used for experimentation.
You need to update the main branch to capture the changes made to the experimentation branch and override the history of the Git repository.
Which Git option should you use?
- Rebase
- Fetch
- Merge
- Push
Explanation:Create pull requests to review and merge code in a Git project. Pull requests let your team review code and give feedback on changes before merging it into the master branch.
Incorrect Answers:
A: Use rebase to address the problem of updating your branch with the latest changes from the main branch. Rebase takes the changes made in the commits in your current branch and replays them on the history of another branch. The commit history of your current branch will be rewritten so that it starts from the most recent commit in the target branch of the rebase. Rebasing your changes in your feature branch off the latest changes in the main branch lets you test your changes on the most recent version in the main branch while keeping a clean Git history.D: Share changes made in commits and branches using the push command. Push your branches to the remote repository. Git adds your commits to an existing branch on the remote or creates a new branch with the same commits as your local branch.
-
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.
You use Azure Pipelines to build and test a React.js application.
You have a pipeline that has a single job.
You discover that installing JavaScript packages from npm takes approximately five minutes each time you run the pipeline.
You need to recommend a solution to reduce the pipeline execution time.
Solution: You recommend defining a container job that uses a custom container that has the JavaScript packages preinstalled.
Does this meet the goal?
- Yes
- No
Explanation:Instead enable pipeline caching.
Note:
npm-cache is a command line utility that caches dependencies installed via npm, bower, jspm and composer.It is useful for build processes that run [npm|bower|composer|jspm] install every time as part of their build process. Since dependencies don’t change often, this often means slower build times. npm-cache helps alleviate this problem by caching previously installed dependencies on the build machine.
-
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.
You use Azure Pipelines to build and test a React.js application.
You have a pipeline that has a single job.
You discover that installing JavaScript packages from npm takes approximately five minutes each time you run the pipeline.
You need to recommend a solution to reduce the pipeline execution time.
Solution: You recommend enabling pipeline caching.
Does this meet the goal?
- Yes
- No
Explanation:npm-cache is a command line utility that caches dependencies installed via npm, bower, jspm and composer.
It is useful for build processes that run [npm|bower|composer|jspm] install every time as part of their build process. Since dependencies don’t change often, this often means slower build times. npm-cache helps alleviate this problem by caching previously installed dependencies on the build machine.
-
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.
You use Azure Pipelines to build and test a React.js application.
You have a pipeline that has a single job.
You discover that installing JavaScript packages from npm takes approximately five minutes each time you run the pipeline.
You need to recommend a solution to reduce the pipeline execution time.
Solution: You recommend enabling parallel jobs for the pipeline.
Does this meet the goal?
- Yes
- No
Explanation:Instead enable pipeline caching.
Note:
npm-cache is a command line utility that caches dependencies installed via npm, bower, jspm and composer.It is useful for build processes that run [npm|bower|composer|jspm] install every time as part of their build process. Since dependencies don’t change often, this often means slower build times. npm-cache helps alleviate this problem by caching previously installed dependencies on the build machine.
-
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.
You plan to create a release pipeline that will deploy Azure resources by using Azure Resource Manager templates. The release pipeline will create the following resources:
– Two resource groups
– Four Azure virtual machines in one resource group
– Two Azure SQL databases in other resource groupYou need to recommend a solution to deploy the resources.
Solution: Create two standalone templates, each of which will deploy the resources in its respective group.
Does this meet the goal?
- Yes
- No
Explanation:
Use a main template and two linked templates. -
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.
You plan to create a release pipeline that will deploy Azure resources by using Azure Resource Manager templates. The release pipeline will create the following resources:
– Two resource groups
– Four Azure virtual machines in one resource group
– Two Azure SQL databases in other resource groupYou need to recommend a solution to deploy the resources.
Solution: Create a single standalone template that will deploy all the resources.
Does this meet the goal?
- Yes
- No
Explanation:
Use two templates, one for each resource group, and link the templates. -
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.
You have an Azure DevOps project.
Your build process creates several artifacts.
You need to deploy the artifacts to on-premises servers.
Solution: You deploy a Kubernetes cluster on-premises. You deploy a Helm agent to the cluster. You add a Download Build Artifacts task to the deployment pipeline.
Does this meet the goal?
- Yes
- No
Explanation:Instead you should deploy an Azure self-hosted agent to an on-premises server.
Note: To build your code or deploy your software using Azure Pipelines, you need at least one agent.
If your on-premises environments do not have connectivity to a Microsoft-hosted agent pool (which is typically the case due to intermediate firewalls), you’ll need to manually configure a self-hosted agent on on-premises computer(s).
Note 2: As we [Microsoft] are launching this new experience in preview, we are currently optimizing it for Azure Kubernetes Service (AKS) and Azure Container Registry (ACR). Other Kubernetes clusters, for example running on-premises or in other clouds, as well as other container registries, can be used, but require setting up a Service Account and connection manually.
-
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.
You have an Azure DevOps project.
Your build process creates several artifacts.
You need to deploy the artifacts to on-premises servers.
Solution: You deploy a Docker build to an on-premises server. You add a Download Build Artifacts task to the deployment pipeline.
Does this meet the goal?
- Yes
- No
Explanation:Instead you should deploy an Azure self-hosted agent to an on-premises server.
Note: To build your code or deploy your software using Azure Pipelines, you need at least one agent.
If your on-premises environments do not have connectivity to a Microsoft-hosted agent pool (which is typically the case due to intermediate firewalls), you’ll need to manually configure a self-hosted agent on on-premises computer(s).
-
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.
You have an Azure DevOps project.
Your build process creates several artifacts.
You need to deploy the artifacts to on-premises servers.
Solution: You deploy an Azure self-hosted agent to an on-premises server. You add a Copy and Publish Build Artifacts task to the deployment pipeline.
Does this meet the goal?
- Yes
- No
Explanation:To build your code or deploy your software using Azure Pipelines, you need at least one agent.
If your on-premises environments do not have connectivity to a Microsoft-hosted agent pool (which is typically the case due to intermediate firewalls), you’ll need to manually configure a self-hosted agent on on-premises computer(s). The agents must have connectivity to the target on-premises environments, and access to the Internet to connect to Azure Pipelines or Team Foundation Server.
-
You have a project in Azure DevOps named Project1. Project1 contains a pipeline that builds a container image named Image1 and pushes Image1 to an Azure container registry named ACR1. Image1 uses a base image stored in Docker Hub.
You need to ensure that Image1 is updated automatically whenever the base image is updated.
What should you do?
- Enable the Azure Event Grid resource provider and subscribe to registry events.
- Add a Docker Hub service connection to Azure Pipelines.
- Create and run an Azure Container Registry task.
- Create a service hook in Project1.
Explanation:
ACR Tasks supports automated container image builds when a container’s base image is updated, such as when you patch the OS or application framework in one of your base images. -
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.
You have an Azure DevOps project.
Your build process creates several artifacts.
You need to deploy the artifacts to on-premises servers.
Solution: You deploy an Octopus Deploy server. You deploy a polled Tentacle agent to an on-premises server. You add an Octopus task to the deployment pipeline.
Does this meet the goal?
- Yes
- No
Explanation:Instead you should deploy an Azure self-hosted agent to an on-premises server.
Note: To build your code or deploy your software using Azure Pipelines, you need at least one agent.
If your on-premises environments do not have connectivity to a Microsoft-hosted agent pool (which is typically the case due to intermediate firewalls), you’ll need to manually configure a self-hosted agent on on-premises computer(s).