DevOps: Release Management (MS RM 2015)
Date: 2015-09-01 10:30:12
Microsoft's Release Management 2015 product with Team Foundation Server 2013 can be used to automate code deployments. Here is a quick overview.
Release Management enables a continuous and automated “develop – test – deploy” application workflow.
Here is a workflow example
- A programmer updates the code base
- The code is automatically built
- The code is automatically deployed to the first stage of servers
- The code is validated/approved by a stakeholder and moves to the next stage
Release Management supports a rapid release cadence through a path of stages and environments. Paths have Acceptance, Deployment, Validation, and Approval Steps which require stakeholder approval (manual/automated) to move through. Each Stage / Environment can have different Stakeholders, Notifications, and Servers.
Release Management is tied to TFS and will pull out Build Versions and Locations. A deployment of the software can be initiated by the developer from Visual Studio by using the Release Management Build Template definition. This template adds 3 additional fields: Configuration to Release, Release Build, Release Target Stage. Deployments can also be kicked off by using the RM REST API i.e. we can kick off releases at scheduled times. Configuration files can be updated/removed (or file contents adjusted) via Release Management as the release is deployed to an environment.
Build Definitions need to be setup to automate application builds and drop locations.
The intent is to be able to deploy all application components and configuration to a target server from the Release Management server. There are 2 deployment methods: Agent and Agentless (vNext). Agentless uses PowerShell (v4) and Desired State Configuration.
TFS Web Server, TFS Database Server, TFS Build Server(s)
Release Management 2015 Server (can use TFS DB Server), Release Management 2015 Client
- Remote Target Servers (for software deployment)
Deploy Service Account with local administrator permissions (can have a different account per environment)
Windows Remote Management Enabled (winrm quickconfig) or (winrm qc –transport:HTTP)
Port 5985 (Windows 2012 R2), Check WinRM Listener (winrm e winrm/config/listener)
PowerShell Remoting Enabled (Enable-PSRemoting -Force -SkipNetworkProfileCheck)
Windows 2008 R2 requires Windows Management Framework 4.0
Windows Management Framework 5.0 is in Preview (MS supported) and has more features
If using web deploy packages then the Web Servers need Web Deploy 3.5
Event Viewer Logs
Applications and Services Logs – Microsoft – Windows – Desired Configuration State
Custom PS Resources need deployed to
Custom PS Modules need deployed to
Temporary Release Management Deploy File directory is
Here is where the bulk of the configuration and setup is performed to start the automated continuous deployment of an application.
Release Path (figure)
Pieces of Release Management (RM)
- General Administration
Users: Domain users to Approve Release and utilize RM
Groups: Add TFS or Active Directory Groups for Release Approvals
Stage Types: Stages an application deployment moves through: QA, Preview, Stage, Prod
Technology Types: Types of technology (Web, Database) that can be associated with a server
Servers: Remote Target Servers that will have an application/setting deployed to it
Environments: A Grouping of Servers
Release Paths: Approval Workflow, i.e. Paths through the different Stages & Environments an application deployment will go through and who will approve the steps
Components: Package/Application(s) that are deployed, copied to the remote target server
Release Template: Ties the Release Path with Components, a Visual Studio Build Definition, and Actions necessary to deploy an application
This is where Action Workflows are created
Initialization of a Release Template which starts an application deployment through the Release Path which starts the Approval process
Start a Release from a Template (figure)
Approve or Reject the Release via the client (figure)
Approve or Reject the Release via the Web Page (figure)
Monitor the Release (figure)
Configure the PS/DSC Actions (figure)
Release Path (figure)