Requirements: I have written an article about Azure DevOps before, and I also wrote about adding an agent pool, which is based on Azure DevOps Services.
You have clouds:Azure DevOps Services
privatization:Azure DevOps Server 2022、Azure DevOps Server 2019
An agent pool is a collection of agents. Instead of managing each agent individually, you organize agents into agent pools. When you configure an agent, it registers to a single pool, and when you create a pipeline, you need to specify the pool where the pipeline runs.When you run a pipeline, it runs on an agent in that pool that meets the pipeline's needs 。
First, sign up for oneAzure DevOps Servicesaccount, then create a project, link:The hyperlink login is visible.
After successful registration and login, create an access token (personal access token), which will be used later.PAT (Personal access tokens) aresoleScenarios for Azure DevOps Services。
To create a personal access token, select Agent Pools -> Read & manage, as shown in the following figure:
Remember to save your personal access token.
To add an agent, go back to the main page and click Organization Settings -> Agent pools -> Default -> New Agent, as shown in the figure below:
Link:https://dev.azure.com/{yourorganization}/_settings/agentpools?poolId=1&view=jobs
Refer to different tutorials according to your system, take Windows 64-bit system as an example, as shown in the figure below:
Download the save location: "D:\vsts-agent-win-x64-3.224.1.zip", modify the powershell command according to your actual situation, as follows:
Configure code (Run PowerShell as an administrator, otherwise it will not be successfully registered as a service), and the command is as follows:
When the installer asks for a server URL, for Azure DevOps Services, provide:https://dev.azure.com/{your-organization}
If it is not added to the system service, you can run the agent with the following command:
In the Azure DevOps Services backend, you can see that the agent was successfully added to the default agent pool. As shown below:
Reference:
The hyperlink login is visible.
The hyperlink login is visible.
(End)
|