Deployment Groups in DevOps

 

Deployment groups is basically a logical set of deployment to target machines that have agents installed on each one of it.

 

Deployment group represents the physical environment for example dev test production. Deployment group is nothing but grouping of target machines. deployment group is all about logical grouping of resources.

 

Agent must be installed on each of this resources, but there is no need of no of agent pool.

 

 

Use case

When we create your release pipeline and if you're targeting to a dev environment Think in real time we will have only one VM. But there possibilities tat dev environment could have multiple Dev VMs.  Similarly multiple VMs for QA environment as well

 

So when we are creating a release pipeline. We need to target all these machines for my deployment.

  • Way 1: get three different pipelines created or three different states created for D1, D2, D3 and get your deployments done.
  • Way 2: other way around is get a ‘deployment group’ created. 
    • So when you create a pipeline you will be creating and targeting this group and when your deployment starts it will get replicated to all these three environments automatically.

 

 

 

Restrictions: -
deployment groups are only available for classic release pipeline guys.
It's not available for YAML based pipeline. in YAML it handle different ways

 

 

Create Deployment Groups

  • DevOps > Pipelines > Development Groups
  • Click button “Add Deployment Group”
  • Open Next Window
    • Deployment groups support 2 OS only windows and Linux
    • Set Agent Pool for each Target Machines
      • We have to run the script given in blue on each such target machines
      • Once we run this script on our target machines, those machine will start reflecting on next tab ‘Targets’
      • Assume we run this scripts on 5 machines and all 5 of them are showing in Targets ta b

 

 

 

User Deployment Groups
Go to release pipeline > Go to our last release > edit pipeline

 

Click link 1 Job 1 Task

  • Remove Agent job task (already there), as this not required now
    • Click remove button on right side
  • Add Deployment Group Job
    • Add Deployment Group we created earlier
    • Add SSH Group Task in this group by clicking + sign next to Digital Group Tab. Search Shell and add SSH
      • inside SSH add commands
      • All these task will get executed at my deployment group level, which is also acting all the machine. 
      • All the target machine is also acting as a agent, so there is no need of a agent pool directly.
      • We can execute my task on my target machines and this will be a parallel deployment.
      • Above changes will be deployed to all those 5 different machine part of our deployment

 

We can more machine or delete existing one from Deployment Groups

 


Related Question