How to deploy Azure Pipelines agent?


Parameters 1

  • adminUsername [User name]
  • adminPassword [Password for user]
  • dnsLabelPrefix (default set: generated based on ResourceGroup.Id) [Public DNS for connection RDP]
  • vmName [VM Name for resource]
  • AccessIPNSG [IP will be added to NSG rule for RDP access]
  • tag [default set: “Project: AzureDevOpsAgent”]
  • DiskForVM [StorageAccount or Managed — choose disk for deployment VM]

Parameters 2

createresourcegroup-adoagent.param.json — those parameters define a resource group.

Parameters 3

script-post-configuration.ps1 — the script is responsible for installing the agent and preparing the necessary packages. If you need to install additional packages, add them in the section: # Install Packages — the easiest way is to use packages choco:

  • urlProjectADO [URL for your ADO project]
  • auth (default set: PAT) [Authentication method for your ADO]
  • token [Security token for your ADO]
  • pool (default set: default) [Pool name for agent in ADO]
  • agentname [default is same as VM name]
  • numberagents [default is 1 — you can deploy from 1 to 20 agents on one server]
  • instalAddtionalPackages [default is $true and is installing all what is needed for simple deployment to Azure — if you need .NET etc. please add manually]


vm-azure-devops-self-hosted-agents-ci.yml — in this file define precisely the data needed to install the agents — the address of your ADO project, the name of the pool, the number of agents. Group means the Library group in Azure DevOps where we securely transfer confidential data.
- name: SPNName
value: ‘Subscription-JustCloudPublic’
- name: location
value: ‘westeurope’
- name: urlProjectADO
value: ‘'
- name: pool
value: ‘Default’
- name: numberagents
value: 3
- group: ‘justcloudpublickeyvault’

Requirements — you need before you start implementing

  1. Azure Subscription
  2. PAT — Personal Access Token —
  3. Key Vault —

After deployment:

Azure DevOps agents



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store