Sharing of Deployment Groups across projects

Abhishek Agrawai

Last year we released Deployment Groups in Public Preview during the May 2017 timeframe, which enabled customers to deploy software to their IaaS machines.  One of the big pieces of feedback we received was that this only partially addressed the scenario of customers sharing their IaaS machines (deployment targets) across multiple applications. For example, this didn’t address the branch office scenario where multiple applications are installed on the same machine, or the enterprise scenario where a central admin manages resources while Project users just consume the resources. Reason: While it was possible to use a Deployment Group across multiple release definitions in the same VSTS project, it was not possible to share a Deployment Group across VSTS projects.

We are excited to announce that Deployment Groups can now be shared across projects also.  This blog post will guide you through how this can be done.

Deployment Pools

Although the blog title says “Sharing of Deployment Groups”, what is actually being shared projects is the backing Deployment Pool.

A quick word about Deployment Pools and Deployment Groups: The relationship between Deployment Pools and Deployment Groups is similar to the relationship between Agent Pools and Agent Queues. A Deployment Pool exists at the account level and is the actual container of the deployment agents (targets), whereas the Deployment Group is a layer over it which makes these targets available to release definitions in a project. Earlier, there was a one-one mapping between a Deployment Pool and a Deployment Group i.e. each Deployment Group had a dedicated Deployment Pool, and therefore there was no need to expose the Deployment Pool concept to the user. But now that the deployment targets can be shared across projects, we have exposed Deployment Pools in the product.

A Deployment Pool can be shared with another project if the following three conditions are true:

(1) The user sharing the Deployment Pool is a “User” for the pool.

(2) The user sharing the Deployment Pool has permissions to create a Deployment Group in the project where it is being shared.

(3) The project does not already have a Deployment Group backed by the same pool.

Note that the tags set on the deployment targets are project scoped e.g. a deployment target might be tagged as “Web” in Project1 but might be tagged as “MiddleTier” in Project2.

Sharing a Deployment Group with other projects

This section will walk you through the process of sharing the Deployment Group named RmDeploymentGroup across projects.

We work in the VSOnline project of our VSTS account and one of the Deployment Groups we use is named RmDeploymentGroup, whose main purpose is to install software on machines that are newly added to our test pool.

clip_image002[4]

Currently this is used only within the VSOnline project, but assume that there is a need to share this Deployment Group with another project in the account, say the AppInsights project. This could be achieved by the following steps:

  1. Go to the relevant Deployment Group – RmDeploymentGroup in this case – and click on “Manage” next to the newly exposed agent pool.

clip_image004[4]

  1. This takes you to the VSOnline-RmDeploymentGroup Deployment Pool (which is at the account level). Select the project(s) with which you would like to share this Deployment Pool – in this case the AppInsights project – and press Save.

clip_image006[4]

  1. Now navigate to the AppInsights project. You can do this either by browsing and selecting this project:

clip_image008[4]

Or you can do this by going to “All Deployment Pools” -> finding VSOnline-RmDeployentGroup, and selecting one of the projects where it is shared:

clip_image010[4]

  1. You will now notice that there is a new Deployment Group available in this project.

clip_image012[4]

Navigating to the Deployment Group -> Details tab will indicate that this deployment group has the same backing deployment pool.

clip_image014[4]

You can now use this Deployment Group in a release definition in the new project.

Other ways of creating and sharing Deployment Pools

You can create a Deployment Pool directly using “+ New” and then make it available to whatever projects you want:

clip_image016[4]

Alternatively, if you have permissions to use a Deployment Pool in a project, you can go to the newly available “Available Pools” tab, find the Deployment Pool that you want to use in the project, and press “+” next to it.

clip_image018[4]

Note that both the above are available only if you have “Use” permissions on the pool.

Conclusion

We’re excited for you to try out the Deployment Group sharing feature, and we look forward to your feedback in the Developer Community.

0 comments

Discussion is closed.

Feedback usabilla icon