Upload
david-truxall
View
1.582
Download
4
Tags:
Embed Size (px)
DESCRIPTION
One of the great features of .Net when it first released was Xcopy deployment. No more .dll registrations, just copy the files to the web server. While this was a great feature for Microsoft developers, new problems emerged, specifically around managing web.config. Sections like connection strings and custom errors need to be managed between environments, which meant many copies of the files or scripts to change them. Other necessary steps, like managing permissions and IIS configuration were still outside the Xcopy process. A recent tool, MSDeploy, is now integrated into Visual Studio 2010 and makes managing these issues easier. Besides web.config, MSDeploy also manages file deployments and synchronization, ACLs, and IIS settings. If your deployments have multiple steps, need ReadMe files, or can’t be done by someone outside your team, you need to learn MSDeploy!
Citation preview
The Demise of Xcopy Deployment
David Truxall, Ph.D.
MSDeploy
One-Click Publish
Who Am I?
www.davidtruxall.com/
Developer – Troubleshooter – Trainer - Consultant
@davetrux
Agenda
• About MSDeploy• IIS Console• Visual Studio 2010• Command-Line
MSDeploy
One-Click Publish
Why MSDeploy?
IIS 6 IIS 7
Where do I get it?
• Web Platform Installer• Separate download• Visual Studio 2010
Architecture
• Provider Based
• Package• Deploy• Synchronize
Verbs• dump• sync• delete• getDependencies• getParameters• getSystemInfo
MSDeploy Process
IIS
PackageFile
MSDeploy Create thePackage
MSDeploy
IIS
VS 2010
Command-line
PowerShell
Deployment• Using IIS Manager UI • Using command file created by Visual Studio 10 • Using command line using MSDeploy.exe • Using Power Shell support provided by MS Deploy • Using managed APIs provided by MS Deploy
Create the Package
Deploy the Package
Providers
CertificatesCOM objects
File System GAC
Machine Config
App PoolsACLs
IIS
SQL Server
MySQL
Registry
Custom
Integrates with IIS Console
• UI• Import/Export– Synchronization– Migration
Remember Today’s Password: Elastic Syntax
Agent Service
IIS Demo
Visual Studio 2010
Managing Web.config
• Transformation– Connection strings– Custom errors
• At Publish, not at Build
Publishing
• Offline• Online
Package
• Manifest• Contents
VS 2010 Demo
Command-Line
msdeploy.exe -verb:<verbName> -source:<provider>[=<pathToProviderObject> [,<providerSetting>=<providerSettingValue>]] [-dest:<provider>[=<pathToProviderObject> [,<providerSetting>=<providerSettingValue>]] ] [-<MSDeployOperationSetting> ...]
Command-Line Demo
Continuous Integration
<Exec Command='"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe"
-verb:sync -source:contentpath="$(DropLocation)\$(BuildNumber)\Release\Site" -dest:contentpath=\\TESTSERVER\Site' ContinueOnError="false" />
Building A Dev Server
• Configure IIS Management Service• Open firewall port (8172)• Install MSDeploy
PowerShell in Action
Thanks!
www.davidtruxall.com
@davetrux
www.linkedin.com/in/davetrux
Slideshare.net/davetrux