Sunday 6 July 2014

Visual Studio Release Management

Do we need to manage software releases/deployments in a well planned methodology? Do we need to track the details of the releases/deployments? Do we need to have a proper rollback strategy if something goes wrong in a deployment to production? I could keep asking more and more questions like this related to the software release management, and always the answer would be “YES”.
So what are our options, in terms of Microsoft ALM set of tools. TFS Lab environments can be used, but can we use it for production releases automation? Yes, if the client is willing to provide trusted access to production environment, via TFS Lab environments. But in most cases client would not like this. To add more pain to this Lab environments deployments would over utilize the build servers, with long running deployments. The solution for all this pain is addressed well in, new Visual Studio 2013 Release Management.
First we need to understand “Why” we need to manage releases. This post in NorthWest Cadence provides great insight.
There are three major components in VS 2013 Release Management.
1. Release Management Server.
Set of windows and web services that act as the core part of the release management. There is a portal providing approval capability to the release check points, without having to install Release Management Client or Visual Studio.
2. Release Management Client.
Windows Presentation Foundation (WPF) application provide the interface to manage the releases and configurations of release management.
3. Deployment Agent
Resides in target servers in the environment and performs the deployment actions such as installing, uninstalling, configuration etc. of software components.
Each of above performs its own duty, and resides in different computers. Together they make deployment automation a possibility with all the visibility and traceability expected in proper Application Lifecycle Management process.
The following diagram extracted from VS 2013 Release Management Installation Guide provides overview of “How it works”.

000

Even though above picture shows TFS, it is not mandatory to have TFS for VS Release Management to work. If the TFS is available can be tightly integrated with it. If not it could obtain payload for the deployment from any accessible drop locations (UNC path). This means the deployment could be even something not developed with .Net .
Below diagram from VS 2013 Release Management Installation Guide  explains communication between components of release management.

0000

The most important thing here is the Deployment Agent is downloading the components for deployment as a pull request. Nothing is pushed from Release Management Server to Deployment Agent. This enables the possibility of Release Management Server not requiring access to Production environments. Deployment Agent notify Release Management Server it’s availability via heartbeat.

Let’s start our journey to explore Visual Studio Release Management by setting up an environment step by step, with my series of blog posts in next few weeks.
1. Setup Release Management Server.
2. Setup Release Management Client.
3. Setup Deployment Agent.
4. Configure SMTP.
5. Configure TFS Connection
6. Setup Stage Types.
7. Setup Servers & Environments.
8. Setup Release Path.
9. Demo Release Template - Part 1.
10. Demo Release Template - Part 2.

4 comments:

Unknown said...

Release Management provides a continuous deployment solution that makes release cycles repeatable, visible, and more efficient by automating deployments through every environment from test to production. What is Application Packaging

Anonymous said...

Excellent Post! It helps me lot to configure Release Management.. Thanks :)

Tushar said...

Hi,

I have installed RM Server on the same VM as of TFS server.
I am able to browse Url http://localhost:1000/ReleaseManagement with Service account ( TFS VM )
But when I try to browse the same RM web Url from a different VM and with different user it throws 403 Forbidden Error.
http://:1000/ReleaseManagement

Note : All the machines are on the same Domain



Could you please help to know, why it gives error as 403 - Forbidden: Access is denied

Thanks in Advance !!

Chaminda Chandrasekara said...

Hi Tushar
Have you allowed port 1000 from your server?
In addition to that set the release management web config in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Release Management\web\web.config

<Microsoft.TeamFoundation.Release.Data.Properties.Settings>
<setting name="MaxReceivedMessageSize" serializeAs="String">
<value>10067108864</value>
</setting>
<setting name="ActiveDirectoryServiceRef_ActiveDirectoryService"
serializeAs="String">
<value>http://yourserver:1000/ActiveDirectoryService.asmx</value>
</setting>
<setting name="ConfigurationServiceRef_ConfigurationService"
serializeAs="String">
<value>http://yourserver:1000/ConfigurationService.asmx</value>
</setting>
<setting name="DeploymentControllerServiceRef_DeploymentControllerService"
serializeAs="String">
<value>http://yourserver:1000/DeploymentControllerService.asmx</value>
</setting>
<setting name="FileTransferServiceRef_FileTransferService" serializeAs="String">
<value>http://yourserver:1000/FileTransferService.svc/mex</value>
</setting>
<setting name="ListProviderServiceRef_ListProviderService" serializeAs="String">
<value>http://yourserver:1000/ListProviderService.asmx</value>
</setting>
<setting name="NotificationServiceRef_NotificationService" serializeAs="String">
<value>http://yourserver:1000/NotificationService.asmx</value>
</setting>
<setting name="TfsServiceRef_TfsService" serializeAs="String">
<value>http://yourserver:1000/TfsService.asmx</value>
</setting>
<setting name="LoggerServiceRef_LoggerService" serializeAs="String">
<value>http://yourserver:1000/LoggerService.asmx</value>
</setting>
<setting name="UpdaterServiceRef_UpdaterService" serializeAs="String">
<value>http://yourserver:1000/UpdateService.asmx</value>
</setting>
<setting name="ApprovalRequestEmailLanding" serializeAs="String">
<value>http://yourserver:1000/ReleaseManagement</value>
</setting>
<setting name="ServiceBaseUrl" serializeAs="String">
<value>http://yourserver:1000/</value>
</setting>
</Microsoft.TeamFoundation.Release.Data.Properties.Settings>
</applicationSettings>

If you are setting up https you need additional steps https://support.microsoft.com/en-us/kb/2905743

Popular Posts