Note
This step creates an agent to run deployment actions. The agent needs to be a Windows machine with Git and Az CLI installed. Git bash needs to be added to the PATH.
Click Project settings
-> Agent pools
-> Add pool
. Select Self-hosted
type and input the name of the pool.
The agent needs to be a Windows machine in your Corp network that can remote access all the machines on edge. Connect to the machine. Download a setup script from ado-self-hosted-runner.ps1 and run it on the machine.
The script will
- Check Git is installed. If not, Git will be downloaded and installed.
- Check Az CLI is installed. If not, Az CLI will be downloaded and installed.
- Add remote PowerShell client settings for CredSSP auth.
- Download AzDO agent binary and configure.
A detailed instruction can be found here. A step-by-step screenshots is provided in this page as of Sep. 2024.
Click Personal access tokens
.
Click Show all scopes
.
Select Agent Pools -> Read & manage
and Deployment Groups -> Read & manage
.
Click Create
. Copy the value of PAT. Paste to the line Enter personal access token
.
Press enter to use the default agent pool. If you created agent pool in the previous step or you want to use non-default pool, input the name.
Press enter to use the computer name.
Press enter to use the default value.
Input Y
to run as service.
Use an admin account to run the service. Use <machine_name>\<admin_name>
to use a local admin account. Use <domain>\<domain_account>
or <user_id>@<corp_domain>
to use a domain account.
Press enter to restart the agent service.
Open .pipelines/deploy-infra.yml
. Change line 5.
pool: <your_pool_name> # TODO: Change this to your pool name
Example
pool: Default