{"id":3251,"date":"2012-06-07T13:00:00","date_gmt":"2012-06-07T13:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/bharry\/2012\/06\/07\/announcing-continuous-deployment-to-azure-with-team-foundation-service\/"},"modified":"2024-05-02T14:50:04","modified_gmt":"2024-05-02T21:50:04","slug":"announcing-continuous-deployment-to-azure-with-team-foundation-service","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/bharry\/announcing-continuous-deployment-to-azure-with-team-foundation-service\/","title":{"rendered":"Announcing Continuous Deployment to Azure with Team Foundation Service"},"content":{"rendered":"<p>I mentioned earlier this week in my <a href=\"http:\/\/blogs.msdn.com\/b\/bharry\/archive\/2012\/06\/04\/team-foundation-services-updates-6-4.aspx\">sprint 31 deployment post<\/a> that we were working on some bigger things I wasn\u2019t ready to talk about yet.\u00a0 Well, this is one of them\u2026.<\/p>\n<p>As development organizations are trying to improve the cycle times on their development process \u2013 getting ideas through development and into production and collecting feedback faster and faster, they are looking for ways to streamline the process.\u00a0 You hear a lot of talk these days about \u201cDevOps\u201d and \u201cNoOps\u201d.\u00a0 Both are rapidly evolving perspectives on how to improve the interaction between development and production with the goal of improving the cycle time and the application quality.\u00a0 One of the evolving practices in this space is \u201cContinuous Deployment\u201d \u2013 getting new versions of the app into production (or a production like environment) continuously to exercise the muscle and see the results.<\/p>\n<p>Today, we unveiled a partnership between <a href=\"http:\/\/www.windowsazure.com\/\">Azure<\/a> and our <a href=\"http:\/\/www.tfspreview.com\">Team Foundation Service<\/a> that enables automated deployment of either Windows Azure Websites or Windows Azure Cloud Services.\u00a0 By default, we configure automated deployments with every checkin but you can modify that to do scheduled or manual deployments \u2013 basically anything you can do with a TFS Build.<\/p>\n<p>Getting started is really easy.\u00a0 The below is not intended to be a full fidelity tutorial, but rather an overview of what you can expect the experience to be like.\u00a0 For a step by step tutorial check out: <a href=\"http:\/\/www.windowsazure.com\/en-us\/develop\/net\/common-tasks\/publishing-with-tfs\/\">http:\/\/www.windowsazure.com\/en-us\/develop\/net\/common-tasks\/publishing-with-tfs\/<\/a><\/p>\n<p><strong>**Important** &#8211; <\/strong>To enable the new continuous deployment features we created a new build process template called AzureContinuousDeployment.11.xaml. This process template lives in source control at $\/&lt;teamprojectname&gt;\/BuildProcessTemplates folder.\u00a0 If you create a new Team Project, it will automatically be added for you.\u00a0 Existing projects won&#8217;t have that process template and we were a little loathe to go and insert it into everyone&#8217;s existing source control.\u00a0 As such, you will need to add it yourself if you want to configure continuous deployment.\u00a0 If you try to connect your azure account to your existing projects your will get the following error.<\/p>\n<p>Failed to link TFS project &#8216;MS&#8217; with your web site \u2018&lt;websitename&gt;\u2019<\/p>\n<p>TF42073: The value cannot be null (Parameter name: Process)<\/p>\n<p>I&#8217;ve attached the xaml file you will need to this blog post.\u00a0 You can map the BuildProcessTemplates folder into a workspace on your machine, download the xaml file from this post and then drag it into Source Control Explorer or copy it to the folder and add it either from the command line or the GUI, etc.\u00a0 Once that is done you can use the wizard to setup a continuous deployment build definition.<\/p>\n<p><strong>**Update**<\/strong> \u2013 There\u2019s an additional step.\u00a0 In addition to checking in the new build process template, you need to create a build definition that is configured to use it.\u00a0 You can read the comments below by Thomas Quinn on the detailed steps for doing that.<\/p>\n<p><span style=\"font-size: large;\">Walk-through<\/span><\/p>\n<p>In this walk-through I\u2019m going to show doing an Azure Website.<\/p>\n<p>You start with an Azure account.\u00a0 If you have one already, you\u2019re good to go.\u00a0 If not, you can go to <a href=\"http:\/\/www.windowsazure.com\/\">http:\/\/www.windowsazure.com\/<\/a> to signup \u2013 either with a free trial or a full account (both will work with the new continuous deployment capabilities).\u00a0 Once you have your Azure account, create a website and go to the website dashboard on the Azure portal.\u00a0 On the bottom right, you\u2019ll find a link to \u201cSetup TFS publishing\u201d.\u00a0 Click that and it will launch a wizard to connect your TFS project to the Azure application.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3146.image_thumb_647DCC48.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16062\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3146.image_thumb_647DCC48.png\" alt=\"Image 3146 image thumb 647DCC48\" width=\"806\" height=\"495\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3146.image_thumb_647DCC48.png 806w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3146.image_thumb_647DCC48-300x184.png 300w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3146.image_thumb_647DCC48-768x472.png 768w\" sizes=\"(max-width: 806px) 100vw, 806px\" \/><\/a><\/p>\n<p>The wizard will allow you to connect to an existing Team Foundation Service account or create a new one.\u00a0 Either way, once you have the account, enter it in the \u201cuser name\u201d field and click \u201cAuthorize Now\u201d.\u00a0 That will take you through a little authorization wizard.\u00a0 Then it will take you to a page to choose the Team Project that the source for your app is in.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/8030.image_thumb_25D6B427.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16063\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/8030.image_thumb_25D6B427.png\" alt=\"Image 8030 image thumb 25D6B427\" width=\"604\" height=\"434\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/8030.image_thumb_25D6B427.png 604w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/8030.image_thumb_25D6B427-300x216.png 300w\" sizes=\"(max-width: 604px) 100vw, 604px\" \/><\/a><\/p>\n<p>At this point, your Azure and Team Foundation Service accounts are linked.\u00a0 As part of linking the accounts, we also created a continuous integration build definition that will build and deploy your app to Azure each time you check in.\u00a0 So the next thing you might want to do is go to Visual Studio and check in a new web site or a change to an existing one and watch it deploy.\u00a0 If you are using the <a href=\"http:\/\/blogs.msdn.com\/b\/bharry\/archive\/2012\/05\/31\/visual-studio-tfs-2012-release-candidate-available-today.aspx\">VS 2012 Release Candidate that we announced last week<\/a>, you can just click the Visual Studio icon at the bottom of the Azure page and that will open Visual Studio, connected to the project you\u2019ve configured.\u00a0 If not, you can just go run VS 2010 and connect to your Team Foundation Service account.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/0511.image_thumb_722E47C8.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16064\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/0511.image_thumb_722E47C8.png\" alt=\"Image 0511 image thumb 722E47C8\" width=\"644\" height=\"750\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/0511.image_thumb_722E47C8.png 644w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/0511.image_thumb_722E47C8-258x300.png 258w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/a><\/p>\n<p>You can see the deployment results either by looking at the TFS build report or by looking in the Azure Portal\u2026<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/5488.image_thumb_29282602.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16066\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/5488.image_thumb_29282602.png\" alt=\"Image 5488 image thumb 29282602\" width=\"644\" height=\"348\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/5488.image_thumb_29282602.png 644w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/5488.image_thumb_29282602-300x162.png 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/a><\/p>\n<p>You can also see deployment results from inside the Team Foundation Service web UI\u2026<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3323.Deployed-Builds-in-TFS-Portal_thumb_6ECCB020.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-16067\" src=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3323.Deployed-Builds-in-TFS-Portal_thumb_6ECCB020.png\" alt=\"Image 3323 Deployed Builds in TFS Portal thumb 6ECCB020\" width=\"644\" height=\"396\" srcset=\"https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3323.Deployed-Builds-in-TFS-Portal_thumb_6ECCB020.png 644w, https:\/\/devblogs.microsoft.com\/bharry\/wp-content\/uploads\/sites\/8\/2012\/06\/3323.Deployed-Builds-in-TFS-Portal_thumb_6ECCB020-300x184.png 300w\" sizes=\"(max-width: 644px) 100vw, 644px\" \/><\/a><\/p>\n<p>There\u2019s really only a little bit of \u201cmagic\u201d here.\u00a0 Clearly we\u2019ve done some OAuth work to enable TFS and Azure to collaborate.\u00a0 For now, that OAuth work is private but we expect to open it up in the future for more service to service integrations.\u00a0 We\u2019ve also added a new concept of a \u201cdeployment environment\u201d that contains the necessary information to connect to a deployment endpoint, securely storing credentials, etc.\u00a0 Beyond that, all of this integration really comes down to a new set of TFS Build workflow tasks that are able to perform Windows Azure deployments.\u00a0 We also added a little bit of new UI in the build explorer in Web Access to show and manage deployment status.<\/p>\n<p>It\u2019s natural to ask if you can do this with your on premises TFS server.\u00a0 Of, course you can do automated deployment to local environments using Lab Management.\u00a0 There are also manual ways to <a href=\"http:\/\/www.windowsazure.com\/en-us\/develop\/net\/common-tasks\/continuous-delivery\/\">configure an on premises TFS Build to deploy to Azure<\/a>.\u00a0 As you can see from the article, there are a lot of steps.\u00a0 As our new Azure continuous deployment feature matures, we expect to bring more of the capability and simplicity into our on-premises TFS product as well.\u00a0 We think of what\u2019s out there now as a \u201cpreview\u201d like the rest of the Team Foundation Service currently is.<\/p>\n<p>If you are doing any Azure development, I hope you will find that this is a really awesome way to streamline your development process.\u00a0 Give it a try and please share any feedback you have.\u00a0 You can use our forums at: <a href=\"http:\/\/social.msdn.microsoft.com\/Forums\/en-US\/category\/windowsazureplatformctp\">http:\/\/social.msdn.microsoft.com\/Forums\/en-US\/category\/windowsazureplatformctp<\/a><\/p>\n<p>I look forward to hearing from you\u2026<\/p>\n<p>Brian<\/p>\n<p><a href=\"https:\/\/msdnshared.blob.core.windows.net\/media\/MSDNBlogsFS\/prod.evol.blogs.msdn.com\/CommunityServer.Components.PostAttachments\/00\/10\/31\/60\/27\/AzureContinuousDeployment.11.xaml\">AzureContinuousDeployment.11.xaml<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I mentioned earlier this week in my sprint 31 deployment post that we were working on some bigger things I wasn\u2019t ready to talk about yet.\u00a0 Well, this is one of them\u2026. As development organizations are trying to improve the cycle times on their development process \u2013 getting ideas through development and into production and [&hellip;]<\/p>\n","protected":false},"author":244,"featured_media":14617,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[11,5],"class_list":["post-3251","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-announcement","tag-tfs"],"acf":[],"blog_post_summary":"<p>I mentioned earlier this week in my sprint 31 deployment post that we were working on some bigger things I wasn\u2019t ready to talk about yet.\u00a0 Well, this is one of them\u2026. As development organizations are trying to improve the cycle times on their development process \u2013 getting ideas through development and into production and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts\/3251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/users\/244"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/comments?post=3251"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/posts\/3251\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/media\/14617"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/media?parent=3251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/categories?post=3251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/bharry\/wp-json\/wp\/v2\/tags?post=3251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}