Continuous Delivery of Windows Azure Cloud Services (DEV310) 9/15/2018 10:05 AM DEV310 Continuous Delivery of Windows Azure Cloud Services (DEV310) Paul Yuknewicz Principal Program Manager Lead, Visual Studio paulyuk@microsoft.com Microsoft Corporation © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Session Goals Automate complete delivery process of Cloud Services TechEd 2012 9/15/2018 10:05 AM Session Goals Automate complete delivery process of Cloud Services Integrate with overall software app dev lifecycle Customize for your unique environment © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Agenda Overview Configuring build server Automate package build using MSBuild Push packages to Azure using PowerShell scripts Build and deploy packages using TFS Team build (on prem) Build and deploy packages using TFS Build Service (cloud) Customizations and best practices throughout
Application Development Lifecycle Developer Machine Build Server Fix Bugs (repeat as necessary) Check In Open/Close Bugs Build targets & scripts Development F5 Deploy Nightly Build -OR- Continuous Integration Windows Azure SDK for .NET Testing Staging TFS Build Server Warm-blooded user testing Web & Azure Projects Build Web & Azure DLL’s CSPKG Automated testing Deploy using PowerShell or WF Run Tests ?
Continuous integration (CI) 9/15/2018 10:05 AM demo Our first CI Continuous integration (CI) © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Configuring Build Server Principles TechEd 2012 9/15/2018 10:05 AM Configuring Build Server Principles Package build task is fast and disconnected Deployment pushes handled in separate tasks/activities/scripts Developers own the app source code, not build server Fidelity with manual / VS package build Fast failure with validation and logs © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Configuring Build Server Considerations TechEd 2012 9/15/2018 10:05 AM Configuring Build Server Considerations Automation runner (MSBuild, TFS Build, scripts, 3rd party) MSBuild tools and build targets (Web, Azure SDK, etc) Windows Azure SDK (allows partial install w/o VS tools, side by side version) PowerShell scripts and Azure SDK cmdlets Process identity, access control, and secrets Triggers Drop locations Log and trace output locations © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Configuring Build Server Pre-reqs TechEd 2012 9/15/2018 10:05 AM Configuring Build Server Pre-reqs .NET Framework 4.0 (includes MSBuild) Required MSBuild targets: Windows Azure SDK – Windows Azure Authoring Tools (1.6 or 1.7) Windows Azure Tools for Visual Studio (doesn’t require VS) Microsoft.WebApplication.targets (copy from VS2010 or VS2012) MSBuild install paths: VS 2010: \Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0 VS 2012: \Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Create a cloud package with MSBuild Getting started set PATH=%PATH%;"C:\Windows\Microsoft.NET\Framework\4.0“ MSBuild /target:Publish Notes: Same output as Visual Studio Package command: CSPKG + CSCFG files Publishes to <ProjectDir>\bin\<Configuration>\app.publish\ Ensure this is the appropriate path to MSBuild to match your target .NET framework version TFS: set these in the MSBuild Arguments property of the process template / build definition
Create a cloud package with MSBuild Optional parameters Override cloud config file to publish: MSBuild /t:Publish /p:TargetProfile=Test Override drop location: MSBuild /target:Publish /p:PublishDir=\\myserver\drops\
Continuous integration (CI) 9/15/2018 10:05 AM demo Build cloud packages Continuous integration (CI) © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Deploy using PowerShell Pre-reqs TechEd 2012 9/15/2018 10:05 AM Deploy using PowerShell Pre-reqs Windows Azure PowerShell 0.6.0+ cmdlets PublishSettings file with management certificate Pre-built package build output Storage account created Cloud Service container created Cloud Service certificate created and uploaded (optional: for RDP or SSL) Tip: publish with Visual Studio cloud tools first, or else you must use portal + PowerShell to provision resources © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Provisioning resources in PowerShell Create a Cloud Service container example: New-AzureService -ServiceName myservicedns -Location ‘West US’ -Label ‘myservicedns’ Create a storage account example: New-AzureStorageAccount –StorageAccountName mystoragedns -Location ‘West US’ -Label ‘ mystoragedns’ List all locations (data centers) and affinity groups: Get-AzureLocation Get-AzureAffinityGroup
Upload RDP certificates in PowerShell First, locate the cert(s) in the cloud configuration (.cscfg) file for your target environment: <Certificates> <Certificate name="Microsoft.WindowsAzure.Plugins.RemoteAccess.PasswordEncryption" thumbprint="C33B6C432C25581601B84C80F86EC2809DC224E8" thumbprintAlgorithm="sha1" /> </Certificates> Upload certificate from the user store matching the thumbprint (above): Add-AzureCertificate -serviceName 'myservicedns' -CertToDeploy (get-item cert:\CurrentUser\MY\C33B6C432C25581601B84C80F86EC2809DC224E8
Execute the PowerShell script to publish Example 1: publish to a staging environment on the same service before performing a VIP swap PowerShell c:\scripts\windowsazure\PublishCloudService.ps1 –environment Staging -serviceName myservicedns -storageAccountName mystoragedns -packageLocation c:\drops\app.publish\ContactManager.Azure.cspkg -cloudConfigLocation c:\drops\app.publish\ServiceConfiguration.Cloud.cscfg Example 2: publish to a test environment in a separate cloud service PowerShell c:\scripts\windowsazure\PublishCloudService.ps1 –environment Production -serviceName testservicedns -storageAccountName mystoragedns -packageLocation c:\drops\app.publish\ContactManager.Azure.cspkg -cloudConfigLocation c:\drops\app.publish\ServiceConfiguration.Cloud.cscfg
Publish using PowerShell 9/15/2018 10:05 AM demo Publish using PowerShell Continuous deployment (CD) © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Configuring TFS build (on-premise) TechEd 2012 9/15/2018 10:05 AM Configuring TFS build (on-premise) Create a build definition Leverage existing TFS server and build agents Set MSBuild Arguments Wire up PowerShell script in process template workflow (XAML) Set Azure specific process properties (cloud service, storage account, publish settings, locations, etc) © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Publish using TFS (on prem) 9/15/2018 10:05 AM demo Publish using TFS (on prem) Continuous deployment (CD) © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Configuring TFS elastic build service (cloud) TechEd 2012 9/15/2018 10:05 AM Configuring TFS elastic build service (cloud) Set up TFS publishing in Azure portal Wizard does this for you Enables communication between TFS and Azure using OAuth Creates a build definition with Azure process template & activities Sets the solution to build if one exists in depot Sets Continuous Integration trigger (i.e. build/deploy on check-in) What you can do Customize trigger Customize solution to build and solution config Override all cloud specific properties © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Publish using Team Foundation Service (tfspreview.com) demo Publish using Team Foundation Service (tfspreview.com) Continuous deployment (CD) © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Summary Automation of complete Cloud Services delivery process TechEd 2012 9/15/2018 10:05 AM Summary Automation of complete Cloud Services delivery process Integrates with overall software app dev lifecycle Flexible to your unique environments Complete guidance & code available: On-premise: https://www.windowsazure.com/en-us/develop/net/common-tasks/continuous-delivery/#step1 Team Foundation Service: https://www.windowsazure.com/en-us/develop/net/common-tasks/publishing-with-tfs/ © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Related Content Breakout Sessions: Visual Studio Product Demo Stations DEV362 -- From Development to Production: Optimizing for Continuous Delivery (Tues 1:30pm, Jamie Cool) AZR205 -- App Deployment Options for Windows Azure (Tues 5pm, Vishal Joshi) DEV314 -- Azure Development Using Visual Studio (Thurs 10:15am, Paul Yuknewicz) Visual Studio Product Demo Stations Find Me Later At… Product Demo Stations (Visual Studio) or email paulyuk@microsoft.com
DEV Track Resources Visual Studio Home Page :: http://www.microsoft.com/visualstudio/en-us Somasegar’s Blog :: http://blogs.msdn.com/b/somasegar/ Jason Zander’s Blog :: http://blogs.msdn.com/b/jasonz/ Facebook :: http://www.facebook.com/visualstudio Twitter :: http://twitter.com/#!/visualstudio
Resources Learning TechNet http://europe.msteched.com Connect. Share. Discuss. http://europe.msteched.com Microsoft Certification & Training Resources www.microsoft.com/learning TechNet Resources for IT Professionals http://microsoft.com/technet Resources for Developers http://microsoft.com/msdn
Submit your evals online 9/15/2018 10:05 AM Evaluations Submit your evals online http://europe.msteched.com/sessions © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/15/2018 10:05 AM © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9/15/2018 10:05 AM © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.