{"id":39565,"date":"2018-01-11T12:04:28","date_gmt":"2018-01-11T12:04:28","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/devops\/?p=39565"},"modified":"2019-02-14T15:50:23","modified_gmt":"2019-02-14T23:50:23","slug":"sharing-of-deployment-groups-across-projects","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/sharing-of-deployment-groups-across-projects\/","title":{"rendered":"Sharing of Deployment Groups across projects"},"content":{"rendered":"<p>Last year we <a href=\"https:\/\/devblogs.microsoft.com\/devops\/announcing-public-preview-of-the-new-deployment-groups-in-release-management\/\">released Deployment Groups<\/a> in Public Preview during the May 2017 timeframe, which enabled customers to deploy software to their IaaS machines.\u00a0 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\u2019t 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.<\/p>\n<p>We are excited to announce that Deployment Groups can now be shared across projects also.\u00a0 This blog post will guide you through how this can be done.<\/p>\n<h3>Deployment Pools<\/h3>\n<p>Although the blog title says \u201cSharing of Deployment Groups\u201d, what is actually being shared projects is the backing Deployment Pool.<\/p>\n<p>A quick word about Deployment Pools and Deployment Groups: The relationship between Deployment Pools and Deployment Groups is similar to the <a href=\"https:\/\/docs.microsoft.com\/en-us\/vsts\/build-release\/concepts\/agents\/pools-queues\">relationship between Agent Pools and Agent Queues<\/a>. 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.<\/p>\n<p>A Deployment Pool can be shared with another project if the following three conditions are true:<\/p>\n<p>(1) The user sharing the Deployment Pool is a \u201cUser\u201d for the pool.<\/p>\n<p>(2) The user sharing the Deployment Pool has permissions to create a Deployment Group in the project where it is being shared.<\/p>\n<p>(3) The project does not already have a Deployment Group backed by the same pool.<\/p>\n<p>Note that the tags set on the deployment targets are project scoped e.g. a deployment target might be tagged as \u201cWeb\u201d in Project1 but might be tagged as \u201cMiddleTier\u201d in Project2.<\/p>\n<h3>Sharing a Deployment Group with other projects<\/h3>\n<p>This section will walk you through the process of sharing the Deployment Group named RmDeploymentGroup across projects.<\/p>\n<p>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.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image00243.jpg\"><img decoding=\"async\" width=\"680\" height=\"207\" title=\"clip_image002[4]\" alt=\"clip_image002[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0024_thumb3.jpg\" border=\"0\" \/><\/a><\/p>\n<p>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:<\/p>\n<ol>\n<li>Go to the relevant Deployment Group \u2013 RmDeploymentGroup in this case \u2013 and click on \u201cManage\u201d next to the newly exposed agent pool.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image00442.jpg\"><img decoding=\"async\" width=\"667\" height=\"421\" title=\"clip_image004[4]\" alt=\"clip_image004[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0044_thumb2.jpg\" border=\"0\" \/><\/a><\/p>\n<ol>\n<li>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 \u2013 in this case the AppInsights project \u2013 and press Save.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image00642.jpg\"><img decoding=\"async\" width=\"674\" height=\"384\" title=\"clip_image006[4]\" alt=\"clip_image006[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0064_thumb1.jpg\" border=\"0\" \/><\/a><\/p>\n<ol>\n<li>Now navigate to the AppInsights project. You can do this either by browsing and selecting this project:<\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image00842.jpg\"><img decoding=\"async\" width=\"672\" height=\"321\" title=\"clip_image008[4]\" alt=\"clip_image008[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0084_thumb1.jpg\" border=\"0\" \/><\/a><\/p>\n<p>Or you can do this by going to \u201cAll Deployment Pools\u201d -&gt; finding VSOnline-RmDeployentGroup, and selecting one of the projects where it is shared:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image01041.jpg\"><img decoding=\"async\" width=\"684\" height=\"273\" title=\"clip_image010[4]\" alt=\"clip_image010[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0104_thumb1.jpg\" border=\"0\" \/><\/a><\/p>\n<ol>\n<li>You will now notice that there is a new Deployment Group available in this project.<\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image01241.jpg\"><img decoding=\"async\" width=\"689\" height=\"289\" title=\"clip_image012[4]\" alt=\"clip_image012[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0124_thumb1.jpg\" border=\"0\" \/><\/a><\/p>\n<p>Navigating to the Deployment Group -&gt; Details tab will indicate that this deployment group has the same backing deployment pool.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image01441.jpg\"><img decoding=\"async\" width=\"692\" height=\"477\" title=\"clip_image014[4]\" alt=\"clip_image014[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0144_thumb1.jpg\" border=\"0\" \/><\/a><\/p>\n<p>You can now use this Deployment Group in a release definition in the new project.<\/p>\n<h3>Other ways of creating and sharing Deployment Pools<\/h3>\n<p>You can create a Deployment Pool directly using \u201c+ New\u201d and then make it available to whatever projects you want:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image01641.jpg\"><img decoding=\"async\" width=\"692\" height=\"170\" title=\"clip_image016[4]\" alt=\"clip_image016[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0164_thumb1.jpg\" border=\"0\" \/><\/a><\/p>\n<p>Alternatively, if you have permissions to use a Deployment Pool in a project, you can go to the newly available \u201cAvailable Pools\u201d tab, find the Deployment Pool that you want to use in the project, and press \u201c+\u201d next to it.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/6\/2019\/05\/clip_image01841.jpg\"><img decoding=\"async\" width=\"692\" height=\"173\" title=\"clip_image018[4]\" alt=\"clip_image018[4]\" src=\"https:\/\/devblogs.microsoft.com\/devops\/wp-content\/uploads\/sites\/6\/2018\/01\/clip_image0184_thumb1.jpg\" border=\"0\" \/><\/a><\/p>\n<p>Note that both the above are available only if you have \u201cUse\u201d permissions on the pool.<\/p>\n<h3>Conclusion<\/h3>\n<p>We\u2019re excited for you to try out the Deployment Group sharing feature, and we look forward to your feedback in the <a href=\"https:\/\/developercommunity.visualstudio.com\/spaces\/21\/index.html\">Developer Community<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last year we released Deployment Groups in Public Preview during the May 2017 timeframe, which enabled customers to deploy software to their IaaS machines.\u00a0 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 [&hellip;]<\/p>\n","protected":false},"author":123,"featured_media":45953,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[226,1],"tags":[],"class_list":["post-39565","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ci","category-devops"],"acf":[],"blog_post_summary":"<p>Last year we released Deployment Groups in Public Preview during the May 2017 timeframe, which enabled customers to deploy software to their IaaS machines.\u00a0 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 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/39565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/123"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=39565"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/39565\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/45953"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=39565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=39565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=39565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}