Building a Deployment Pipeline with MSDeploy: Part 2 – Terminology Primer
I'm continuing my series on building a deployment pipeline. This post clears up some terminology and defines the basic concepts.
MSDeploy
Officially called Web Deploy, MSDeploy is a technology for primarily deploying web applications and their dependencies, though you could use it to deploy almost anything. Currently in it's third version, it's distributed as an API with an accompanying command line tool, but only the latter of which will be covered in this series.
MSDeploy defines the following concepts:
- Providers deploy certain types of objects, be it a website, a database or a directory.
- Verbs indicate which operation should be performed on the source and dest providers. Usually "sync", though "delete" and "dump" can be useful.
- Parameters define what aspects of a deployment can be changed and can perform anything from web.config modifications to changing the name of the website being deployed to.
- Rules modify how providers deploy, typically dealing with specific scenarios. Examples include disabling deletes and preventing "harmful" deletes.
- Link Extensions (also called Links) enable or disable whether certain objects are included with their associated providers. Examples include application pools, certificates, and files.
- Skip Rules1 allow specific deployment objects (or only specific actions to a deployment object) to be excluded from the deployment.
- Replace Rules1 modify aspects of any deployment object (except file contents).
1 Technically Skip and Replace are implemented as rules, but the command line syntax is different so it's easier to consider them separate.
Web Publishing Pipeline
The Web Publishing Pipeline (hereafter be referred to as WPP) is a set of MSBuild targets that Visual Studio 2010/12 uses to integrate it's "Publish" process with MSDeploy (among other things).
WPP's integration with MSBuild and Visual Studio provide a number of perks:
- Publish Profiles are MSBuild files with a pubxml extension and contain all the settings required to deploy to a specific environment.
- MSBuild's "convention over configuration" is brought to the packaging and deployment process
There are some downsides, though:
- Extending the deployment process requires both an understanding of the base MSDeploy feature and how to get to it via WPP.
- WPP doesn't support all the features of MSDeploy (specifically certain command line options).
- It's primarily been designed around "One Click Publishing" via the Visual Studio IDE
Still, this deployment pipeline makes use of WPP, simply because Publish Profiles are much more convenient for managing target environments and less jarring for developers new to the technology.