You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Use deployment groups in Classic release pipelines
3
-
description: Learn how to create and use deployment groups, which are logical groups of target machines for Classic release pipelines in Azure Pipelines.
3
+
description: Learn how to create and use deployment groups in Classic release pipelines in Azure Pipelines.
Similar to an [agent pool](../../agents/pools-queues.md), a deployment group is a logical set of target machines that each have a deployment agent installed. Deployment groups can represent environments such as "Development," "Test," or "Production." Every physical or virtual machine (VM) in the deployment group interacts with Azure Pipelines to coordinate the deployment tasks. Deployment groups are different from [deployment jobs](../../process/deployment-jobs.md), which are collections of task-related steps defined in YAML pipelines.
17
+
Similar to an [agent pool](../../agents/pools-queues.md), a deployment group is a logical set of target machines, each have a deployment agent installed. Deployment groups typically represent environments such as *Development,*Test*, or *Production*. Each physical or virtual machine in the deployment group communicates with Azure Pipelines to coordinate deployment tasks. Deployment groups differ from [deployment jobs](../../process/deployment-jobs.md), which are collections of task-related steps defined in YAML pipelines.
18
18
19
-
>[!NOTE]
20
-
>Deployment groups are available only for Classic release pipelines.
19
+
Deployment groups give you a flexible way to manage and monitor your deployment targets. You can define the security context and runtime environment for agents, assign roles and permissions to team members, and get real-time visibility into deployments with live logs for each server. You can also use tags to target specific machines, making deployments more precise and efficient.
21
20
22
-
By using deployment groups, you can:
23
-
24
-
- Specify the security context and runtime targets for agents.
25
-
- Add users and give them appropriate permissions to administer, manage, view, and use the group.
26
-
- View live logs for each server while a deployment happens, and download logs to track deployments for individual servers.
27
-
- Use tags to limit deployments to specific sets of target servers.
21
+
> [!NOTE]
22
+
> Deployment groups are only available in Classic release pipelines.
28
23
29
24
## Prerequisites
30
25
31
-
- An Azure DevOps organization and project. To create an organization and project, see [Create a new organization](../../../organizations/accounts/create-organization.md) or [Create a project in Azure DevOps](../../../organizations/projects/create-project.md).
32
-
- Administrative access to at least one Windows or Linux physical or virtual machine to use as a deployment target.
26
+
|**Product**|**Requirements**|
27
+
|--------------------|--------------------|
28
+
|**Azure DevOps**| - An Azure DevOps [organization](../../../organizations/accounts/create-organization.md).<br>- An Azure DevOps [project](../../../organizations/projects/create-project.md).<br> - Administrator permissions on a Windows or Linux machine to install and configure the deployment agent. |
33
29
34
30
## Create a deployment group
35
31
36
-
1. From your Azure DevOps project, select **Pipelines** > **Deployment groups**.
37
-
38
-
:::image type="content" source="media/pipelines-deployment-groups.png" alt-text="A screenshot showing Deployment groups in the Pipelines menu.":::
32
+
1. Sign in to your Azure DevOps organization, and navigate to your project.
39
33
40
-
1.On the **Deployment groups** screen, select **New**, or select **Add a deployment group** if this deployment group is the first one in the project.
34
+
1.In your project, select **Pipelines**, then select **Deployment groups**.
41
35
42
-
:::image type="content" source="media/add-deployment-groups.png" alt-text="A screenshot showing Add a deployment group.":::
36
+
1. On the **Deployment groups** page, select **New**. If this is your first deployment group, select **Add a deployment group**.
43
37
44
38
1. Enter a **Deployment group name** and then select **Create**.
45
39
46
40
1. On the next screen, select **Windows** or **Linux** for the **Type of target to register**. A registration script is generated.
47
41
48
-
1. Select **Use a personal access token in the script for authentication**, and then select **Copy script to the clipboard**.
42
+
1. Select **Use a personal access token in the script for authentication**, then select **Copy script to the clipboard**.
49
43
50
44
1. Save the copied script to run on all the target machines in your deployment group.
51
45
52
-
:::image type="content" source="media/generated-script.png" alt-text="A screenshot showing the generated registration script and other settings.":::
46
+
:::image type="content" source="media/generated-script.png" alt-text="A screenshot displaying how to create a deployment group in Azure Pipelines.":::
53
47
54
48
## Register target servers
55
49
56
50
To register each target server in the deployment group:
57
51
58
-
1. Sign in to the machine with an administrative account and run the copied script. For Windows machines, use an elevated PowerShell command prompt.
59
-
60
-
:::image type="content" source="media/register-servers.png" alt-text="A screenshot that shows registering deployment groups servers.":::
52
+
1. Sign in to the machine using an account with administrator permissions, and run the copied script. For Windows machines, use an elevated PowerShell command prompt.
61
53
62
-
1.To assign tags that let you limit deployments to certain servers in a [deployment group job](../../process/deployment-group-phases.md), enter *Y* when prompted to enter tags, and then enter a tag or tags.
54
+
1.When prompted to add tags (can be used to target deployments to specific servers in a [deployment group job](../../process/deployment-group-phases.md)), enter Y, then provide one or more tags. Tags are case insensitive, limited to 256 characters each, and there's no limit to the number of tags you can use.
63
55
64
-
Tags are limited to 256 characters each, are case insensitive, and there's no limit to the number of tags you can use.
56
+
1. Once setup is complete, the script should return the following message:
65
57
66
-
After you set up a target server, the script should return the message `Service vstsagent.{organization-name}.{computer-name} started successfully`.
58
+
```
59
+
Service vstsagent.{organization-name}.{computer-name} started successfully.
60
+
```
67
61
68
62
## Install and upgrade agents
69
63
70
-
Every target server in the deployment group requires a deployment agent. The generated registration script for target servers installs an agent. Alternatively, you can use the following methods to install agents:
64
+
Every target server in the deployment group requires a deployment agent. The generated registration script for target servers installs an agent. Alternatively, you can install agents using one of the following methods:
71
65
72
-
-If the target servers are Azure VMs, you can easily set up your servers by [installing the Azure Pipelines agent extension](./howto-provision-deployment-group-agents.md#install-the-azure-pipelines-agent-azure-vm-extension) on each VM.
66
+
- For Azure VMs, you can easily set up your servers by [installing the Azure Pipelines agent extension](./howto-provision-deployment-group-agents.md#install-the-azure-pipelines-agent-azure-vm-extension) on each VM.
73
67
74
-
-You can use the [AzureResourceGroupDeploymentV2 task](./howto-provision-deployment-group-agents.md#use-the-azureresourcegroupdeploymentv2-task) in your release pipeline to create and register a deployment group dynamically.
68
+
- Use the [AzureResourceGroupDeploymentV2 task](./howto-provision-deployment-group-agents.md#use-the-azureresourcegroupdeploymentv2-task) in a release pipeline to dynamically create and register deployment group agents.
75
69
76
-
For more information about these methods, see [Provision agents for deployment groups](howto-provision-deployment-group-agents.md).
70
+
See [Provision agents for deployment groups](howto-provision-deployment-group-agents.md) for more details.
77
71
78
-
To upgrade the agents on target servers to the latest version without having to redeploy them, select the **More actions** ellipsis next to the deployment group on the **Deployment groups** page and select**Update targets**. For more information, see [Azure Pipelines agents](../../agents/agents.md).
72
+
To upgrade deployment agents to the latest version without redeploying, go to the **Deployment groups** page, select the **More actions** ellipsis next to your deployment group, and choose **Update targets**. See [Agents](../../agents/agents.md) for more details.
79
73
80
74
:::image type="content" source="media/update-targets-deployment-groups.png" alt-text="A screenshot showing how to update targets in deployment groups.":::
81
75
82
76
## Deployment pools
83
77
84
-
A deployment pool is a set of target servers that are available to the entire Azure DevOps organization. To create and update deployment pools, you need Project Collection Administrator permissions in the Azure DevOps organization.
78
+
A deployment pool is a collection of target servers available across your entire Azure DevOps organization. To create or manage deployment pools, you must have Project Collection Administrator permissions.
85
79
86
-
When you create a new deployment pool for an organization, you can automatically provision corresponding deployment groups for selected projects or all projects in the organization. These deployment groups have the same target servers as the deployment pool.
80
+
When you create a new deployment pool, you can automatically provision corresponding deployment groups in selected projects or across all projects in the organization. These deployment groups share the same target servers as the deployment pool.
87
81
88
-
You can manually trigger an agent version upgrade for all servers in the pool by selecting the **More actions** ellipsis next to the deployment pool in **Deployment pools**and selecting**Update targets**.
82
+
To upgrade the agent version on all servers in a deployment pool, go to **Deployment pools**, select the **More actions** ellipsis next to the pool, and choose **Update targets**.
89
83
90
-
:::image type="content" source="media/update-targets-pools.png" alt-text="A screenshot showing how to update targets in deployment pools.":::
84
+
:::image type="content" source="media/update-targets-pools.png" alt-text="A screenshot displaying how to update targets in deployment pools.":::
91
85
92
-
## Monitor release status
86
+
## Share deployment groups
93
87
94
-
While a release pipeline is running, you can view the live logs for each target server in your deployment group. When the deployment finishes, you can download the log files for each server to examine the deployments and debug any issues.
88
+
You can share deployment groups with other projects in your Azure DevOps organization. To make a deployment group available to other projects:
95
89
96
-
:::image type="content" source="media/deployment-groups-release-summary.png" alt-text="A screenshot showing deployment groups release logs.":::
90
+
1. Sign in to your Azure DevOps organization, and navigate to your project.
97
91
98
-
## Share a deployment group
92
+
1. Select **Pipelines** > **Deployment groups**. Select your deployment group and then select **Manage**.
99
93
100
-
You can share deployment groups with other projects in the organization. To provision your deployment group for other projects:
94
+
:::image type="content" source="media/manage-deployment-group.png" alt-text="A screenshot displaying the details page of a deployment group.":::
101
95
102
-
1.From your Azure DevOps project, select **Pipelines** > **Deployment groups**.
103
-
104
-
1. Select your deployment group and then select **Manage**.
96
+
1. In the list of projects, select the ones you want to share the deployment group with, and then select **Save**.
97
+
98
+
:::image type="content" source="media/deployment-group-share-with-project.png" alt-text="A screenshot displaying how to share with other projects.":::
105
99
106
-
:::image type="content" source="media/manage-deployment-group.png" alt-text="A screenshot showing Manage in the deployment group.":::
100
+
1. After saving, the selected projects will see the shared deployment group listed under **Deployment groups**.
107
101
108
-
1. Select projects from the list to share to, and then select **Save**.
102
+
:::image type="content" source="media/shared-deployment-group.png" alt-text="A screenshot showing a shared new deployment group.":::
109
103
110
-
:::image type="content" source="media/deployment-group-share-with-project.png" alt-text="A screenshot showing sharing a deployment group with a project.":::
104
+
## Automatically deploy to new target servers
111
105
112
-
The included projects now have the shared deployment group listed in **Deployment groups**.
106
+
You can configure your environment to automatically deploy the last successful release when new target servers are added to a deployment group:
113
107
114
-
:::image type="content" source="media/shared-deployment-group.png" alt-text="A screenshot showing a shared new deployment group.":::
108
+
1. Sign in to your Azure DevOps organization, and navigate to your project.
115
109
116
-
## Automatically deploy to new target servers
110
+
1. Select **Pipelines** > **Releases**, then select your release pipeline.
117
111
118
-
When new target servers are added to a deployment group, you can configure the environment to automatically deploy the last successful release to the new targets.
112
+
1. Select the post deployment icon to open the **Post-deployment conditions** screen, and enable the **Auto redeploy trigger**.
119
113
120
-
1. From your release pipeline definition, select the post deployment icon.
121
-
1. On the **Post-deployment conditions** screen, enable the **Auto redeploy trigger**.
122
114
1. Under **Select events**, select **New target with required tags becomes available**.
115
+
123
116
1. Under **Select action**, select **Redeploy the last successful deployment on this environment**.
124
117
125
-
:::image type="content" source="../media/deployment-group-add-targets.png" alt-text="A screenshot showing the Auto redeploy trigger settings.":::
118
+
:::image type="content" source="../media/deployment-group-add-targets.png" alt-text="A screenshot displaying how to enable the Auto redeploy trigger.":::
0 commit comments