10 Steps To Improving Your Deployment Process To Microsoft Environments
10 Steps To Improving Your Deployment Process To Microsoft Environments
10 Steps to Improving
your Deployment Process to
Microsoft Environments
APPLICATION DEPLOYMENTS At XebiaLabs, we have decades of combined experience deploying to, and
supporting customers deploying to, complex Microsoft and .NET environments.
1. Require Silent Installers
Based on this wide-ranging knowledge, we have collected a list of practices
2. Look Out for Local and recommendations that can help you improve your application deployment
Admin Permissions process to your Microsoft-based middleware stack.
3. Look Out for UAC
Many of the following practices, which we have grouped into Application
4. Look Out for System Restarts
Deployments, .NET Deployments and General sections, are applicable and
5. Learn About PowerShell valuable in other middleware environments too. We also discuss issues
6. Learn About WinRM specific to Microsoft systems and applications.
DEPLOYMENTS TO IIS
Ideally, of course, your applications will not require any elevated permissions and
can be installed using e.g. a Power User account.
xebialabs.com
White Paper
xebialabs.com
White Paper 3
In the first place, it assumes that all the configuration settings – websites,
application pools etc. – have already been set up in IIS. This may still be a
reasonably infrequent task relative to web content updates, but with increasing
capabilities around automatically provisioning new environments and scaling
existing ones it is important that your deployment automation can handle
configuration settings as well as file transfers.
In addition, XCOPY and ROBOCOPY do not handle file copies atomically, i.e.
either copying all the files successfully or making no changes to the target system.
If a problem occurs halfway through the file transfer, you will be left with a
partially updated site. Some additional logic to copy first to a staging location,
followed by an atomic rename or update of the website’s physical path, is a
common solution to this particular challenge.
2. Avoid MSIs
Although MSIs are the workhorses for many application deployments to
Microsoft platforms, they are not well suited to IIS deployments. Firstly, it’s hard
xebialabs.com
White Paper 4
Such repackaging is also often required to make settings such as the target
website name configurable in order to be able to deploy to different environments.
This is especially common when MSIs are provided by developers, based on the
development environment.
Even when MSIs are created flexibly enough to suit the needs of the various
target environments, they still present a “closed” interface that does not allow
for easy preview of the various steps that will be, or tracking of the actions
that are being, performed. This results in a lack of visibility into the multi-
step process of a typical IIS application update.
Rollback support is good but the silent install capabilities of MSIs are still brittle:
if an incorrect input value is entered or unexpected errors occur, msiexec can still
attempt to throw up dialog boxes that cannot cannot be closed automatically.
This allows the website and application pool settings to be tailored to match
the needs of one specific application, rather than becoming the common
denominator for many apps where e.g. one application needing basic
authentication may mean that all applications are accessible in that way.
xebialabs.com
White Paper 5
Almost inevitably, successive changes lead to these files drifting out of sync,
with new entries not correctly propagated to all versions, copy-pasting of
new entries leading to values for e.g. the dev environment appearing in the
QA file etc. The overhead and potential for error of managing multiple
files can be avoided if only a single version of Web.config is maintained.
This version contains placeholders for all environment specific settings
which are automatically replaced by the appropriate values at deployment
time, based on the target environment.
General
1. Consider the Entire Microsoft Stack
Microsoft offers a family of products, and while automating one part of the
stack such as IIS is a good step, if there are still manual processes in place for
all the other components that make up real-world applications - database
updates, registry changes etc. - there are still error-prone links in the chain.
Most Microsoft products expose decent automation interfaces, and PowerShell
is slowly becoming the unified mechanism to handle multiple products.
Identify a strategy to leverage PowerShell to unify point solutions.
Ensure your automation can handle all the steps required to deploy
your applications. Otherwise, you’ll again be left with error-prone steps
outside the Microsoft stack.
xebialabs.com
White Paper 6
Configuration changes required for a new version simply take place as part
of the deployment to the next environment – no waiting around for the
middleware team to deal with a configuration request. Even better, backing
those configuration changes out again is as simple as downgrading to the
old application version: no more IIS installations with lots of potentially
“stale” configuration resources about which nobody can say whether
they are still in use or not.
If you are able to modify your applications to handle slightly different runtimes,
or are starting a greenfield project, consider fully-managed platforms such as
Azure’s PaaS layer. These dramatically reduce the effort required to provide
automated, “on-demand” development and runtime environments.
xebialabs.com
White Paper 7
About XebiaLabs
XebiaLabs develops enterprise-scale Continuous Delivery and DevOps software, providing companies with the
visibility, automation and control to deliver software faster and with less risk. Global market leaders rely on XebiaLabs to
meet the increasing demand for accelerated and more reliable software releases.
xebialabs.com