Azure DevOps - Agents
DevOps agents are the proxy applications that run the jobs, tasks, and steps in pipelines.
The work can be anything from file copies, file edits, to builds and deployments.
Capabilities
Every agent reports on its capabilities automatically (eg: version of MSBuild available)
Tags can be added to agents but our main agents don’t have any specific tags.
Sizing
The recommended amount of agents on a machine is one per CPU core.
Our build machines have 4
each.
Authentication / Identity
The agents all run as TC\TFSTEST
user.
The passwords for the accounts are stored in password control sheets.
Paths & Location
Extract locations: C:\DevOpsAgents
Working Locations: D:\AgentsWork
Naming
<Name of Server>A<sequential number incremented of agents on the server>S
EG:
NCRWS530A1S
NCRWS530A2S
NCRWS530A3S
NCRWS530A4S
The ‘A' is for agent and never figured out what the 'S’ stands for.
Example Command
PS > .\config.cmd
--unattended
--url https://dev.azure.com/transport-canada
--auth pat
--token <PAT made from an account that can add to the Agent Pool at the time of running the command>
--pool 'Self-Hosted DotNET4X'
--agent NCRWS530A3S
--work D:\AgentsWork\A3S_Work
--runAsService
--windowsLogonAccount TC\TFSTEST
--windowsLogonPassword <TC AD Passowrd for the service account>
Further Reading
Microsoft - Azure DevOps Services - Self-Hosted Agents Overview
Microsoft - Azure DevOps Services - Self-hosted Windows Agents