4
votes

I have several self-hosted Azure DevOps agents (each installed on a dedicated on-prem server) and I need to perform reoccurring maintenance on them (i.e. patching, etc.). Is there's a good way to define those maintenance windows within Azure DevOps so that server admins could do their job without worrying to interrupt any ongoing build/release task?

There seem to be a setting related to configuring reoccurring maintenance (Organization Settings -> Agent Pools -> <Pool Name>-> Settings [tab]) but it seems as if it would apply to the whole pool and it's hard to tell which of the agents will be considered offline at which time slot. Unfortunately I couldn't find any documentation about it and not sure if there's something that Azure DevOps would also be doing on the agent machines (i.e. running cleanup, updating agents and so on)

Currently, the process involves a person with admin permissions in Azure DevOps to disable an agent allowing a server admin to perform regular maintenance and to re-enable it back when server admin is done. It would be great if a server admin could not involve an Azure DevOps Admin every time for such routines.

1
please confirm if you are satisfied with my answer or not. thanks in advance!Eriawan Kusumawardhono

1 Answers

4
votes

Due to the fact that you have your own Azure Pipelines agents, then the maintenance should be easier and you will have total control of either having automatic maintenance or not. If you use Microsoft's hosted agents, you could not update the hosted agents from Microsoft because these agents are maintained by Microsoft exclusively.

The best way to do this is by having more than one agent on one machine instance then organize the agents on one pool. If you have multiple pools, then you can configure Azure DevOps to have different maintenance window schedule on each pool to have different time, and give some time to download and configure itself.

For example, I usually configure the maintenance window on weekend days such as Sunday early morning once a month on certain date. And for any pools I have I gave them intervals of 40 minutes on each pool to have maintenance to give enough time for the agent to download, update and restart itself.

Please consult these documentation further for detailed explanation and use cases:

For Azure DevOps Server:

  1. https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops-2019
  2. https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/pools-queues?view=azure-devops-2019

For Azure DevOps Service (on cloud TFS, formerly Visual Studio Team Services):

  1. https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/agents?view=azure-devops
  2. https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/pools-queues?view=azure-devops