Azure-pipelines-agent: On-Prem Update All Agents

Created on 22 Nov 2016  路  19Comments  路  Source: microsoft/azure-pipelines-agent

Agent version and platform

Version of your agent? 2.105.6


Windows Server

VSTS type and version

On-Prem TFS 2017


2016 november release


If VisualStudio.com, what is your account name? http://account.visualstudio.com

What's not working?

Is it possible to update the agents through "Agent Pools -> All Pools -> Pool -> Update All Agents"? Currently when I try to do this, my agents(AgentListener) shuts off and nothing happens.

How do you update agents On-Premise? Do I have to download it from here?

question

Most helpful comment

So, just to be clear: using on-prem TFS, you have to uninstall the existing agent, then install the new agent to do an upgrade? If this is the case, is there a way (maybe using the API) to automatically assign custom capabilities for each agent? Our agents have some custom capabilities that we've added, and re-adding them after reinstalling the agent for an upgrade is time consuming, since it seems to be a manual process. I didn't see any API calls relating to agents in the documentation, so I was wondering if there was a way to automatically add them.

Is there any possible ETA on when the "Update All Agents" functionality will work for on-prem TFS? Any help would be appreciated!

All 19 comments

@Gimpan update all agents will update all your agents within the pool to the latest version within the same major version.
in TFS2015, we shipped the new build agent which is version 1.x, it only works for windows platform.
in TFS2017, we shipped a newer major version agent 2.x, it written in dotnet core, which will works in Linux and OSX as well.
Your TFS server has the knowledge of all the agent version we shipped. we don't support update across major version, which mean, 1.x agents will not update to 2.x
Since you already in 2.105.6, which is the latest version for TFS2017, you won't get any update until 2017 QU1.

If you want 2.x agents on prem, go to the admin pages and download the agent. TFS 2017 RTM points to 2.105.6. You can manually download a later one from releases in this repo if you need to (there's a bug fix you need in a later version). As Ting pointed out, QU1 will point to a later agent. The server points to the agent version it was tested and released with.

Sorry to bring this back up be we need https://github.com/Microsoft/vsts-agent/issues/898 deployed to all of our build agents (about 70). Is there a way to "teach" TFS 2017 update 2 about it so we don't have to manually deploy it?

I have found that the _update agents_ will not work on premise, with TFS 2017 Update 2. For instance, if an agent is 2.117.2 and I choose to run update agents, it will not update them to 2.124.0

I can do this manually with a powershell script using post/etc, but was hoping that the update process would have removed the need to update individual agents with bug fixes

@sheldonhull 2.117.2 is the latest version of the agent at the time we shipped with 2017 QU2
https://github.com/Microsoft/vsts-agent/releases/tag/v2.117.2
I think we can add a feature to allow on-prem customer keep updating their agent to latest.
@chrisrpatterson @bryanmacfarlane for thoughts.

I agree. This is on our backlog along. Right now you can download latest from github but that's a manual update. (download, unzip, config).

So, just to be clear: using on-prem TFS, you have to uninstall the existing agent, then install the new agent to do an upgrade? If this is the case, is there a way (maybe using the API) to automatically assign custom capabilities for each agent? Our agents have some custom capabilities that we've added, and re-adding them after reinstalling the agent for an upgrade is time consuming, since it seems to be a manual process. I didn't see any API calls relating to agents in the documentation, so I was wondering if there was a way to automatically add them.

Is there any possible ETA on when the "Update All Agents" functionality will work for on-prem TFS? Any help would be appreciated!

@bryanmacfarlane @TingluoHuang following up a while later. Hoping you can clarify if this was ever completed or any general idea of timeframe. Would like to ensure my on-prem agents are updated without all the scripted workaround I've had to use. A chocolately package or feed url for direct download of latest would simplify it a lot, vs parsing github release listing to match with regex. thanks!

@sheldonhull - it's schedule for the next sprint as we're targettng next major release of on prem TFS.

So will this be available for TFS 2017 v2 as part of the new agent, or will it require a new TFS version? Thanks!

It will require server work so it will be available on upgrade. The server offers the update feature for versions it knows about.

@bryanmacfarlane ok, so i still need to manually update agent if I'm on an older version but want the latest minor releases applied?

If this is the case, could you consider adding some type of consistent feed url or chocolately package so it would be easy to script he update. Right now I have to parse github body text and it has changed slightly so things break. Someway to get release listing in consistent format for windows would be great

Was there any more progress on this? I'm facing the same issue and it's unfortunate the on-prem agent update seems kludgy.

The feature is in Azure DevOps Server 2019
https://docs.microsoft.com/en-us/tfs/release-notes/azuredevops2019#locally-update-your-agent

How do you configure the path to the local agent zip file?

I would also like to know how to configure the path to the local agent zip file. Can't find any documentation on the process, just that it supposedly can be done.

@kjsmithtx https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops-2019#can-i-update-my-v2-agents-that-are-part-of-an-azure-devops-server-pool?

For those on TFS it's also a Choco package now. Just run Choco upgrade azuredevopsagent . This saved me a lot of time

Was this page helpful?
0 / 5 - 0 ratings