Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSTS build agents - Can one computer run multiple build agents?

Tags:

azure-devops

I have a Windows VM that hosts a VSTS build agent. Due to the number and length of builds that are running I would like to know whether multiple build agents can be hosted on one computer? That would allow a dedicated agent for slow builds, and a dedicated agent for quick builds.

https://www.visualstudio.com/en-us/docs/build/admin/agents/v2-windows

like image 213
James Newton-King Avatar asked Nov 25 '16 03:11

James Newton-King


People also ask

What is a Vsts agent?

This repository contains images for the Visual Studio Team Services (VSTS) agent that runs tasks as part of a build or release. VSTS agent images are tagged according to the base OS, an optional Team Foundation Server (TFS) version, and tools that are installed.

How do I add agents in agent pool?

Navigate to your project and choose Project settings, Agent pools. Navigate to your project and choose Project settings, Agent pools. Navigate to your project and choose Settings (gear icon) > Agent Queues. At this time you can view information about agent pools and queues, but not edit them, using the Azure CLI.

How do I add self hosted agent to Azure DevOps?

Azure DevOps Server 2019 and Azure DevOps Server 2020 Log on to the machine using the account for which you've prepared permissions as explained above. In your web browser, sign in to Azure DevOps Server 2019, and navigate to the Agent pools tab: Choose Azure DevOps, Organization settings. Choose Agent pools.


2 Answers

Yes you can run multiple agents in a single VM.

Make two directories say Agent1 and Agent2, extract the agent in each one of them and configure them with different names against your VSTS/TFS account.

It should work out of the box.

like image 73
Harshil Lodhi Avatar answered Oct 12 '22 02:10

Harshil Lodhi


We run 4 agent jobs per machine concurrently with no issues. As mentioned above, should work out of the box. Just make sure you clean up directories. We have a script to do it every night

like image 28
ylerner Avatar answered Oct 12 '22 02:10

ylerner