Implement Self-Hosted Agent for Azure DevOps - AZ-400 Exam | Microsoft

Implementing Self-Hosted Agent

Question

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.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D. E.

BE

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 Git we shipped to allow that self-signed SSL certificate.

Enable git to use SChannel during configure with 2.129.0 or higher version agent Pass --gituseschannel during agent configuration

./config.cmd --gituseschannel

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

To implement a self-hosted agent for Azure DevOps, you need to follow these steps:

  1. Download and install the agent on the build server: Download the self-hosted agent from Azure DevOps and install it on the build server where you want to run your builds. The installation process involves running a script or executable on the build server that will register the agent with your Azure DevOps organization.

  2. Create a personal access token (PAT): To authenticate the self-hosted agent with your Azure DevOps organization, you need to create a personal access token (PAT). The PAT is a security token that enables the agent to access your Azure DevOps organization and perform actions on your behalf.

    To create a PAT, follow these steps:

    • In Azure DevOps, go to your user profile settings.
    • Click on "Personal access tokens".
    • Click on "New Token".
    • Enter a name for the token and select the scope of access that the token will have.
    • Click "Create Token" to generate the token.
    • Make sure to copy and save the token somewhere safe, as you will not be able to view it again.
  3. Run config.cmd: After installing the self-hosted agent and creating a PAT, you need to configure the agent to use the PAT for authentication. To do this, you need to run the config.cmd script on the build server.

    The config.cmd script will prompt you for the URL of your Azure DevOps organization, the PAT that you created in step 2, and other configuration settings such as the name and description of the agent.

    Once you have entered the necessary information, the config.cmd script will configure the self-hosted agent to use the specified PAT for authentication when communicating with your Azure DevOps organization.

    Therefore, the correct answer options are:

    • D. From DevOps, create a personal access token (PAT).
    • E. From the build server, run config.cmd.