SlideShare a Scribd company logo
With msbuild and msdeployContinuous DeploymentDelivery -----------
AbstractIf you are deploying your software manually, you are doing it wrong. If you deploying once a month, you are doing it wrong. If you as a developer are deploying from Visual Studio by clicking "Publish", you are doing it wrong. If a bug-fix takes you 1 hour but your customer needs to wait a week until he gets it, you are doing it wrong. Manual deployments are NOT fun. There is a nice way on how to automate the deployment with TFS 2010, msbuild and msdeploy.
Continuous Delivery with TFS msbuild msdeploy
http://twitter.com/#!/DEVOPS_BORAT/status/76767436543758336
Continous DeploymentDeploy continously...After each change...To a certain env...Continous DeliveryBe production ready...through dev cycle...release any time...
Peter GfaderAustralia (my fun)Italy (my country)German (my language)blog.gfader.com (my findings)@peitor (my conversations)www.SSW.com.au (my company)
Deployment AgendaPainGoalsHow ToStart from scratchExisting SystemBest Practices
How do you deploy?
How do you deploy?Web App
Client App
SharePoint
CRM...Manual
Publish from VS
Xcopy
Deploy.docx
Deploy.ps
Pain
"Only Bob knows how to deploy ... And he is on holidays..."
http://twitter.com/#!/DEVOPS_BORAT/status/55321627000455168
Manual deployments are error proneDeployment Instructions.docx
Manual deployments take hours instead of minutes or secondsDeployment Instructions.docx
Manual deployments take hours instead of minutes or secondsLong feedback cycle We want fail fastDeployment Instructions.docx
Deployments late in the development processcause stress on the "deployment day"
Hard!Configuration Existing dataUpdatesStarting/StopExternal dependencies
Manual != fun
http://twitter.com/#!/DEVOPS_BORAT/status/62745218931359744
Goals
Deliver business value faster
Deliver business value fasterYou spent an hour on a bug fix, but customers will not see it for months
http://twitter.com/#!/DEVOPS_BORAT/status/82255123526598656
Fail fast and early in the development process
Fail fast and early in the development processOn the "Go Live Day" you realize: Production hardware is missing an important feature
Release small increments
Release small incrementsDeploying often, less number of defects
Start from scratchhttp://continuousdelivery.com/2010/02/continuous-delivery/
This is the hard part, but some rules of thumbHow To
How ToStart from Scratch Existing Environment
Start from scratch
Start from scratch1. Setup Continous Integration
Start from scratch1. Setup Continous IntegrationCI toolsTFSTeamCityCruiseControl.NET
Start from scratch1. Setup Continous IntegrationCI toolsBuild automationmsBuildnAntnRakeFinalBuilder
Start from scratch2. Have automated tests
Start from scratch2. Have automated testsUnitIntegrationSmokeAcceptanceStresstestBVTWTF?
3. Setup packaging software
3. Setup packaging software
3. Setup packaging software
3. Setup packaging softwareResult
Install of package    ----------- - ---
4. Configuration
4. ConfigurationXML Transforms vsXML Parametrization
1. Web transformsApplied on every deployment
Part of VS2010 (no UI)
XML transform engine is wrapped in msBuild1. Web transformsEverything that is not environment specific1. Web transformsEverything that is not environment specific
E.g.Remove all dev settingsDebug options..
2. Web parameterizationApplied on every deployment
Run through msDeploy2. Web parameterization2 partsDeclare parametersSet parameters
Additional Configuration settings
Declare Parameters
Set Parameters
Set Parameters
4. Target environments
Run
Run
Existing EnvironmentDeployment Instructions.docx
Existing EnvironmentDocument your manual deployment processSoftware artefactsConfiguration artefactsTarget environment(s)
http://twitter.com/#!/DEVOPS_BORAT/status/54693053142798336
Existing Environment2. Improve in baby stepsIdentify your most expensive manual stepAutomate thatRinse and repeat
Existing EnvironmentEveryone should work together
Deployment @AuctionsPlus   On a napkin
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
Automated DeploymentWed night @Sydney .NET UG
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
Best practices
http://twitter.com/#!/DEVOPS_BORAT/status/65880152705470464
Deploy earlyDeployment is never easy, so try to deploy as soon as possible to remove all roadblocks
http://twitter.com/#!/DEVOPS_BORAT/status/61213294949707776
Have a rollback plan
Continuous Delivery with TFS msbuild msdeploy
Have a DashboardLatest Builds?Environment, version?Everything healthy?
Continuous Delivery with TFS msbuild msdeploy
Continuous Delivery with TFS msbuild msdeploy
Have a guinea pigAB testing
Have a clone of your production environment
Have everything under source control
Have everything under source controlDeployment artefacts.bat.ps
Log failed and successful builds
Continuous Delivery with TFS msbuild msdeploy
Only let the PO deploy to Production
Continuous Delivery with TFS msbuild msdeploy
AutomateAutomateAutomateAutomateAutomateAutomateAutomateAutomateAutomate
Continuous Delivery with TFS msbuild msdeploy

More Related Content

ODP
Continuous Integration using TFS
PPTX
Continuous Integration and Continuous Deployment in Enterprise scenario
PPTX
Silverlight vs HTML5 - Lessons learned from the real world...
PDF
PDF
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
PPTX
Flusso Continuous Integration & Continuous Delivery
PPTX
Continuous delivery applied
ZIP
Continuous Integration, Build Pipelines and Continuous Deployment
Continuous Integration using TFS
Continuous Integration and Continuous Deployment in Enterprise scenario
Silverlight vs HTML5 - Lessons learned from the real world...
Usg Web Tech Day 2016 - Continuous Integration, Deployment, and Delivery
Flusso Continuous Integration & Continuous Delivery
Continuous delivery applied
Continuous Integration, Build Pipelines and Continuous Deployment

What's hot (20)

PPTX
What Visual Studio Code can do for Java Development
KEY
Continuous Integration, the minimum viable product
PPTX
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
PDF
Continuous integration
PPTX
Continuous Delivery
PPTX
Adrian marinica continuous integration in the visual studio world
PPTX
Back to basic: continuous integration (Madrid DevOps)
PDF
Release Management in TFS 2015
PDF
Simple Continous Integration
PPTX
DevOps - Understanding Core Concepts (Old)
ODP
Enterprise Workflows When You Aren't Enterprise
PPT
Continuous integration
PDF
Introduction to Continuous Integration
PDF
5 step bim automation roadmap - shed manufacturers e book
PPT
Continous Integration: A Case Study
ODP
Continous integration
PPTX
Advanced deployment scenarios (netcoreconf)
PPTX
Advanced deployment scenarios
PDF
Principles and Practices in Continuous Deployment at Etsy
PPTX
Qa in CI/CD
What Visual Studio Code can do for Java Development
Continuous Integration, the minimum viable product
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Continuous integration
Continuous Delivery
Adrian marinica continuous integration in the visual studio world
Back to basic: continuous integration (Madrid DevOps)
Release Management in TFS 2015
Simple Continous Integration
DevOps - Understanding Core Concepts (Old)
Enterprise Workflows When You Aren't Enterprise
Continuous integration
Introduction to Continuous Integration
5 step bim automation roadmap - shed manufacturers e book
Continous Integration: A Case Study
Continous integration
Advanced deployment scenarios (netcoreconf)
Advanced deployment scenarios
Principles and Practices in Continuous Deployment at Etsy
Qa in CI/CD
Ad

Viewers also liked (20)

PPTX
TFS Build - Continuous Integration
PPTX
Continuous Delivery With Team Foundation Server
PDF
Innovation durch Scrum und Continuous Delivery
PPTX
Advanced Silverlight
PPTX
Testing with VS2010 - A Bugs Life
PDF
Continous Delivery in Action
PPTX
Introducing Continuous Integration Using Vsts
PPTX
CI with TFS
PPTX
Install, configure and customize TFS 2013
PPT
CI via TFS
PPTX
Reports with SQL Server Reporting Services
PPTX
Clean Code Development
PPTX
Continous delivery
PDF
OLAP – Creating Cubes with SQL Server Analysis Services
PPTX
Lean & Agile DevOps with VSTS and TFS 2015
PPTX
Continuous integration with teamcity
PPTX
SSAS - Other Cube Browsers
PPTX
DevOps and Continuous Delivery with Visual Studio 2015 and VSTS
PPTX
Application Lifecycle Management with TFS
PPSX
TFS Build - Continuous Integration
Continuous Delivery With Team Foundation Server
Innovation durch Scrum und Continuous Delivery
Advanced Silverlight
Testing with VS2010 - A Bugs Life
Continous Delivery in Action
Introducing Continuous Integration Using Vsts
CI with TFS
Install, configure and customize TFS 2013
CI via TFS
Reports with SQL Server Reporting Services
Clean Code Development
Continous delivery
OLAP – Creating Cubes with SQL Server Analysis Services
Lean & Agile DevOps with VSTS and TFS 2015
Continuous integration with teamcity
SSAS - Other Cube Browsers
DevOps and Continuous Delivery with Visual Studio 2015 and VSTS
Application Lifecycle Management with TFS
Ad

Similar to Continuous Delivery with TFS msbuild msdeploy (20)

PPTX
Continuous deployment
PDF
Continuous Deployment (english)
PPT
Making the Agile Leap to Continuous Deployment
PPTX
Continuous Deployment
PDF
DevOps - the Future of Agile - Why/What/How - from Enterprise DevOps Israel 2015
PPT
Scaling DevOps Beyond Teams with Azure
PPTX
How Azure DevOps can boost your organization's productivity
PDF
Devops
PDF
2016 09-dev opsjourney-devopsdaysoslo
PPTX
Continuous Delivery in the real world - techniques to reduce the developers b...
PPTX
Enterprise Devops Presentation @ Magentys Seminar London May 15 2014
PPTX
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
PPTX
Deployment taken seriously with Octopus Deploy and TeamCity
PPT
Continuous Deployment
PDF
Ross Snyder, Etsy, SXSW Lean Startup 2013
PPTX
Intro To Continuous Delivery
PDF
Саша Белецкий "Continuous Delivery в продуктовой разработке"
PPTX
So you-want-to-go-faster
PPTX
Continuously delivering software to big brands (fullscreen edition)
PPTX
ExpertsLive Session Deck
Continuous deployment
Continuous Deployment (english)
Making the Agile Leap to Continuous Deployment
Continuous Deployment
DevOps - the Future of Agile - Why/What/How - from Enterprise DevOps Israel 2015
Scaling DevOps Beyond Teams with Azure
How Azure DevOps can boost your organization's productivity
Devops
2016 09-dev opsjourney-devopsdaysoslo
Continuous Delivery in the real world - techniques to reduce the developers b...
Enterprise Devops Presentation @ Magentys Seminar London May 15 2014
Automatic deployment on .NET web stack (Minsk .NET meetup 12.02.14)
Deployment taken seriously with Octopus Deploy and TeamCity
Continuous Deployment
Ross Snyder, Etsy, SXSW Lean Startup 2013
Intro To Continuous Delivery
Саша Белецкий "Continuous Delivery в продуктовой разработке"
So you-want-to-go-faster
Continuously delivering software to big brands (fullscreen edition)
ExpertsLive Session Deck

More from Peter Gfader (20)

PDF
Achieving Technical Excellence in Your Software Teams - from Devternity
PDF
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
PDF
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
PPTX
How to make more impact as an engineer
PDF
13 explosive things you should try as an agilist
PPTX
You cant be agile if your code sucks
PDF
Use Scrum and Continuous Delivery to innovate like crazy!
PPTX
Speed = $$$
PPTX
Qcon london2012 recap
PPTX
Data Mining with SQL Server 2008
PPT
Business Intelligence with SQL Server
PPTX
SQL Server - Full text search
PPTX
Usability AJAX and other ASP.NET Features
PPTX
Work with data in ASP.NET
PPTX
Introduction to ASP.NET
PPT
Web services, WCF services and Multi Threading with Windows Forms
PPT
N-Tier Application with Windows Forms - Deployment and Security
PPTX
Better User Experience with .NET
PPTX
C# advanced topics and future - C#5
PPTX
.NET and C# introduction
Achieving Technical Excellence in Your Software Teams - from Devternity
You Can't Be Agile If Your Testing Practices Suck - Vilnius October 2019
You Cant Be Agile If Your Code Sucks (with 9 Tips For Dev Teams)
How to make more impact as an engineer
13 explosive things you should try as an agilist
You cant be agile if your code sucks
Use Scrum and Continuous Delivery to innovate like crazy!
Speed = $$$
Qcon london2012 recap
Data Mining with SQL Server 2008
Business Intelligence with SQL Server
SQL Server - Full text search
Usability AJAX and other ASP.NET Features
Work with data in ASP.NET
Introduction to ASP.NET
Web services, WCF services and Multi Threading with Windows Forms
N-Tier Application with Windows Forms - Deployment and Security
Better User Experience with .NET
C# advanced topics and future - C#5
.NET and C# introduction

Recently uploaded (20)

PDF
Trump Administration's workforce development strategy
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Yogi Goddess Pres Conference Studio Updates
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
01-Introduction-to-Information-Management.pdf
PDF
Chinmaya Tiranga quiz Grand Finale.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
GDM (1) (1).pptx small presentation for students
PPTX
Lesson notes of climatology university.
Trump Administration's workforce development strategy
Microbial disease of the cardiovascular and lymphatic systems
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Yogi Goddess Pres Conference Studio Updates
2.FourierTransform-ShortQuestionswithAnswers.pdf
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
O7-L3 Supply Chain Operations - ICLT Program
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
O5-L3 Freight Transport Ops (International) V1.pdf
01-Introduction-to-Information-Management.pdf
Chinmaya Tiranga quiz Grand Finale.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Computing-Curriculum for Schools in Ghana
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
GDM (1) (1).pptx small presentation for students
Lesson notes of climatology university.

Continuous Delivery with TFS msbuild msdeploy

Editor's Notes

  • #2: Continuous Delivery with TFS, msbuild and msdeployFeel free to copy and use.Drop me a note before though: [email protected] http://blog.gfader.com/
  • #4: If you are at the stage where you actually have to think about deployment, that is a Success!There are heaps of projects that didn't get so far .... and I was working on some...
  • #6: Continuous Delivery"Keeping systems production-ready throughout development, so that they can be released to users at any time"  Continuous Deployment"Deploy continuously to a certain environment"
  • #9: From VS: PublishDocx
  • #10: From VS: PublishDocx
  • #19: Deployment is hard, because of configuration and starting/stopping of external dependencies (web-servers, DBs, queues, external services, …)(web-servers, DBs, queues, external services, …)
  • #26: Small feedback cycle
  • #27: Small feedback cycle
  • #28: Less number of defects
  • #29: Less number of defects
  • #30: Goal of tests: Is application production-ready?
  • #33: I have VS2010 + TFS as build server + a website hosted on DiscountASPhttp://twitter-fish.com/http://twitter-fish.com/Latest/
  • #34: Devs check in code to Version control, The automated CI system monitors changes in source control and gets changes. Build and runs all tests. Results are posted back on a portalCI tools are the triggers that listen to various “events’ in the network (a check-in to source control, for example could be a trigger. You can configure these tools to do a few simple things when an event happens. One of those things can be to invoke one of the tools in the previous list. Some of the CI tools, though, include a few simple built in build atomation power (such as built in MSBuild support, or running tests)
  • #35: Devs check in code to Version control, The automated CI system monitors changes in source control and gets changes. Build and runs all tests. Results are posted back on a portalCI tools are the triggers that listen to various “events’ in the network (a check-in to source control, for example could be a trigger. You can configure these tools to do a few simple things when an event happens. One of those things can be to invoke one of the tools in the previous list. Some of the CI tools, though, include a few simple built in build atomation power (such as built in MSBuild support, or running tests)
  • #36: Devs check in code to Version control, The automated CI system monitors changes in source control and gets changes. Build and runs all tests. Results are posted back on a portalCI tools are the triggers that listen to various “events’ in the network (a check-in to source control, for example could be a trigger. You can configure these tools to do a few simple things when an event happens. One of those things can be to invoke one of the tools in the previous list. Some of the CI tools, though, include a few simple built in build atomation power (such as built in MSBuild support, or running tests)
  • #41: In your Build definitionGo to “Process” -> “Advanced” -> “MSBuild arguments” and enter:a.    /p:DeployOnBuild=Trueb.    /p:DeployTarget=MsDeployPublish/p:Configuration=Release/p:CreatePackageOnPublish=True /p:DeployIisAppPath=[TwitterFish]/p:MsDeployServiceUrl=https://[DiscountAspSERVER]:8172/msdeploy.axd/p:AllowUntrustedCertificate=True
  • #43: Or use VS2010http://kb.discountasp.net/KB/a792/how-do-i-deploy-visual-studio-2010-web-application.aspx
  • #49: Tell MSDEPLOY this is a config setting
  • #50: Tell MSDEPLOY this is a config setting
  • #59: Identifysoftware artefactsconfiguration artefactstarget environment(s)
  • #62: (Dev's, Ops, DBAs)
  • #73: Deployment is never easy, so try to deploy as soon as possible to remove all roadblocksJuval Löwy encourages the build master to deploy after a couple of days after the project start.
  • #75: Even with automated tests and UAT there can always slip through a broken release...
  • #77: Which version of your software is installed in which environment
  • #80: Deploy to a staging environment, once 100% happy deploy to productionNew Zealand is Facebook guinea pig
  • #81: Have a clone of your production environment where you deploy and test your software
  • #82: Deployment artefacts. Trace changes, have history, evolution of code
  • #83: Deployment artefacts. Trace changes, have history, evolution of code
  • #86: Authorization
  • #90: http://twitter.com/#!/DEVOPS_BORAT/status/65880152705470464
  • #96: http://twitter.com/#!/DEVOPS_BORAT/status/65880152705470464