Install Multiple Visual Studio Team Services (VSTS) Agents

Last updated: 05-05-2021

This template builds a Virtual Machine and supporting Resources with Visual Studio 2017 installed. It also installs and configures upto 4 VSTS build agents and links them to a VSTS Pool

This Azure Resource Manager (ARM) template was created by a member of the community and not by Microsoft. Each ARM template is licensed to you under a licence agreement by its owner, not Microsoft. Microsoft is not responsible for ARM templates provided and licensed by community members and does not screen for security, compatibility or performance. Community ARM templates are not supported under any Microsoft support programme or service and are made available AS IS without warranty of any kind.

Parameters

Parameter Name Description
modules Enter the Module(s) to install including the Version
publicIPDnsName Enter a DNS name to resolve to the Public IP Address
vmAdminUser The name of the Administrator Account to be created
vmAdminPassword The password for the Admin Account. Must be at least 12 characters long
vmSize Specifiy the size of VM required for the VM(s)
vstsAccount The Visual Studio Team Services account name, that is, the first part of your VSTSAccount.visualstudio.com
vstsAgentCount The number of Visual Studio Team Services agents to be configured on the Virtual Machine. Default is 3
vstsPersonalAccessToken The personal access token to connect to VSTS
vstsPoolName The Visual Studio Team Services build agent pool for this build agent to join. Use 'Default' if you don't have a separate pool.
_artifactsLocation The base URI where artifacts required by this template are located. When the template is deployed using the accompanying scripts, a private location in the subscription will be used and this value will be automatically generated.
_artifactsLocationSasToken The sasToken required to access _artifactsLocation. When the template is deployed using the accompanying scripts, a sasToken will be automatically generated.
location Location for all resources.
imagePublisher Specifiy the publisher of the vm image
imageOffer Specifiy the Offer of the vm image
imageSKU Specifiy the Offer of the vm image

Use the template

PowerShell

New-AzResourceGroup -Name <resource-group-name> -Location <resource-group-location> #use this command when you need to create a new resource group for your deployment
New-AzResourceGroupDeployment -ResourceGroupName <resource-group-name> -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/application-workloads/visualstudio/vm-vsts-agent/azuredeploy.json
Install and configure Azure PowerShell

Command line

az group create --name <resource-group-name> --location <resource-group-location> #use this command when you need to create a new resource group for your deployment
az group deployment create --resource-group <my-resource-group> --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/application-workloads/visualstudio/vm-vsts-agent/azuredeploy.json
Install and Configure the Azure Cross-Platform Command-Line Interface