Search code examples
azureazure-devops

Azure Deployment Groups vs Agent Pools


I am confused by the difference between deployment group and agent pool. I understand that Agent pools are for building and releasing artifacts in the pipeline.

I assumed Deployment group is for receiving app deployments. They are the target machines of a deployment. Therefore they might have a different agent software.

But this doc says "Every target machine in the deployment group requires an installed build and release agent". Does that mean build and release agent is not just for building & releasing also for accepting deployments? [MS/Docs/Provisioning Deployment Groups]


Solution

  • Does that mean build and release agent is not just for building & releasing also for accepting deployments?

    Yes, you are correct. The agents installed in agent pool and deployment group can be used for building and accepting deployments.

    For example, if you only have one server machine you are going to deploy to. You can actually using private agent pool( installing a self-hosted agent on the server machine). You can build and deploy your app using this self-hosted agent in the agent pool. But if you have multiple server machines you need to deploy to. You'd better use deployment groups.

    As below is described in the document:

    A deployment group is a logical set of deployment target machines that have agents installed on each one. Deployment groups represent the physical environments; for example, "Dev", "Test", "UAT", and "Production". In effect, a deployment group is just another grouping of agents, much like an agent pool.

    The main difference of Deployment groups and Agent Pools is where they can be used in the azure pipeline.

    Deployment groups can only be used in the Deployment group job in Classic release pipelines. See below screenshot.

    enter image description here

    Agent pools are available in both the release pipelines and build pipelines, but can only be used in normal agent job(not Deployment group job). See above screenshot.