1 min read
Azure DevOps Agent Pools
Agent pools in Azure DevOps organize and manage build agents for pipeline execution. This post covers configuring Microsoft-hosted and self-hosted agent pools.
Pool Types
# Microsoft-hosted agents
jobs:
- job: WindowsBuild
pool:
vmImage: 'windows-latest'
- job: LinuxBuild
pool:
vmImage: 'ubuntu-latest'
- job: MacBuild
pool:
vmImage: 'macos-latest'
# Self-hosted agent pool
jobs:
- job: OnPremBuild
pool:
name: 'MyAgentPool'
demands:
- docker
- Agent.OS -equals Linux
Agent Configuration
# Download and configure agent
./config.sh --unattended \
--url https://dev.azure.com/myorg \
--auth pat \
--token $PAT \
--pool MyAgentPool \
--agent my-agent-01 \
--acceptTeeEula \
--replace
# Run as service
sudo ./svc.sh install
sudo ./svc.sh start
Pool Management
# Capabilities and demands
agent_capabilities:
system:
- Agent.OS: Linux
- Agent.Version: 2.x
user_defined:
- docker
- node18
- dotnet7
pipeline_demands:
- docker
- dotnet7
Agent pools provide flexible compute resources for diverse build requirements.