I am trying to install the VSTS Agent as an extension through an ARM template. Unfortunately I can't find the list of parameters that it needs. There is documentation for most of the custom extensions for Compute, except VSTS https://docs.microsoft.com/en-us/azure/virtual-machines/windows/extensions-configuration-samples?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json
Here is the block that'll go in the ARM template, can u suggest what parameters need to go into the properties section?
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('vmName'),'/VsAgent')]",
"location": "uksouth",
"properties": {
"publisher": "Microsoft.Compute",
"type": "TeamServicesAgent",
"typeHandlerVersion": "1.9",
"autoUpgradeMinorVersion": true,
"settings": {
"Name": "",
?????
"commandToExecute": "???"
}
},
"dependsOn": [ ]
}
Tarun
I have made some progress and cobbled together the following...
{
"apiVersion": "2015-06-15",
"type": "Microsoft.Compute/virtualMachines/extensions",
"name": "[concat(variables('vmName'),'/TeamServicesAgent')]",
"location": "uksouth",
"properties": {
"publisher": "Microsoft.VisualStudio.Services",
"type": "TeamServicesAgent",
"typeHandlerVersion": "1.0",
"autoUpgradeMinorVersion": true,
"settings": {
"VstsAccountName": "[parameters('vstsAccount')]",
"TeamProject": "[parameters('TeamProject')]",
"DeploymentGroup": "[parameters('DeploymentGroup')]",
"AgentName": "[parameters('vmName')]",
"Tags": "[parameters('Tags')]"
},
"protectedSettings": {
"PATToken": "[parameters('personalAccessToken')]"
}
},
"dependsOn": []
}
It however fails with the following error message...
{
"status": "Failed",
"error": {
"code": "ResourceDeploymentFailure",
"message": "The resource operation completed with terminal provisioning state 'Failed'.",
"details": [
{
"code": "VMExtensionHandlerNonTransientError",
"message": "Handler 'Microsoft.VisualStudio.Services.TeamServicesAgent' has reported failure for VM Extension 'TeamServicesAgent' with terminal error code '1009' and error message: 'Enable failed for plugin (name: Microsoft.VisualStudio.Services.TeamServicesAgent, version 1.11.0.0) with exception Command C:\\Packages\\Plugins\\Microsoft.VisualStudio.Services.TeamServicesAgent\\1.11.0.0\\enable.cmd of Microsoft.VisualStudio.Services.TeamServicesAgent has exited with Exit code: -1'"
}
]
}
}
@chshrikh for deployment group question.
@tarunaroraonline can you please pull details error from Azure portal. Go to VM -> extensions -> Team Services Agent -> click on "view detailed status"
The parameters look fine.
@tarunaroraonline also please provide us your VSTS account name.
@chshrikh, please assign this issue to me and Tejas
Thank for offering to help. Looking at the logs, the error message is clear. The extension fails to download the Team services agent. The question is, where is the agent being downloaded from? I am behind a proxy in the Azure IaaS Vm...
@bishal-pdMSFT The VSTS account name is centrica-emt
@tarunaroraonline Agent gets downloaded from our agent's github repo.
However, currently TeamAgent VM extension does not explicitly use proxy settings which is resulting in this error.
@bishal-pdMSFT The trouble is GitHub uses s3.amazon.com to store the artifacts, which isn't white listed in many enterprises since you have to open access to all of s3 since there isn't a specific pattern in the URL that will allow you to open up subset of access. It would be great if you could server up the extension from an Azure blob store instead?
What are the plans for enabling proxy support for the TeamAgent VM extension?
Hi Tarun( @tarunaroraonline ),
I have added this to our backlog. No time-lines yet :)
@RoopeshNair Is there a work around you could propose in the interim?
@tarunaroraonline
Can they white-list or bypass proxy for https://github.com/Microsoft/vsts-agent/releases/download/* and visualstudio account url?
Roopesh we've already white listed .github.com unfortunately github redirects to s3.amazon for all artifacts which is what's causing the real problem.
we have a backlog item to server up from azure blob instead of relying on GH releases (which uses s3 internally)
When is this likes to be available?
It's the story after next in our agent backlog. I would guess early in the new year
@bryanmacfarlane When is this expected to release?
@tarunaroraonline the agent release is already on Azure Blob Storage since https://github.com/Microsoft/vsts-agent/releases/tag/v2.126.0
Ace! @TingluoHuang can this extension be used to simply deploy a VSTS agent for build (or does it only support deployment group)?
If it supports agent only, should i pass empty values for tags and deployment group? How do I specify the agent queue this should be assigned to?
Is there a schema available for this extension somewhere so i can find out the settings that can be configured?
@tarunaroraonline agent extension supports only deployment group agents.
@RoopeshNair @bryanmacfarlane @TingluoHuang... Please can i confirm that the update all agents option in VSTS uses the new Microsoft Edge URL (Microsoft Blob) rather than GitHub to download the agent?
@tarunaroraonline - yes it does. Actually, the backend just has an url by platform in the DB so it's up to us where it points. But, as of the last couple of releases, we have started pointing VSTS at the azure CDN.
I am going to close this as the original question has been solved.
Agent download got blocked by proxy rules
Good Read !