
If you are developing complex systems, you probably thought about automating the steps associated with the release. Imagine that you are creating a complex multi-component web site whose infrastructure is divided into several servers.
A very tempting scenario is when your continuous integration and build process continues with the automatic deployment of this site. At the same time, certain conditions and criteria are met, for example, it is required that a build that is ready for deployment in an operational environment passes all tests and is approved by responsible people from the team. Inevitably, there are a number of points that complicate the build process, you have to create deployment scripts. If we take into account the approval process, it becomes clear that such automation can be quite time-consuming. Fortunately, Team Foundation Server 2013 includes a number of tools that will greatly simplify release management.
By the way, on February 6,
ALM Summit Russia conference will be held within which we will describe in detail the possibilities of Team Foundation Server 2013 for release management, and readers of habrakhabr have the opportunity to use a 50% discount, for this it is enough to use the promotional code
alm14_VS .
Release Management Architecture
A new toolkit that was included in the Team Foundation Server 2013 release was developed by InCycle. Previously, this product was known as InRelease and proved to be excellent. The overall architecture is presented below:

- Release Management Server. A server component, which in turn consists of a database, an approval process controller, and a dispatcher that synchronizes activities with target servers.
- Release Management Client. A client component that is of two types, a web client and a desktop (WPF) client. Testers interact with these clients and managers involved in the approval process.
- Release Management Deployer . Component automation deployments that are installed on target servers. It should be noted that the Release Management Server does not require any access rights settings on the clients since the deployment process is based on pull requests made from the client.
Based on this architecture, a wide variety of deployment options can be built, including web applications, desktop applications, and multicomponent complex systems.
Deployment Management
One of the most labor-intensive parts of release automation is the deployment of the assembled components of a product. Depending on the architecture of the system being developed, this process may consist of many steps that require fine tuning and the preparation of various scripts. Their further testing and debugging can take a lot of time. If you use release management components in TFS 2013, then you have ready-made scripts and components that can greatly facilitate this task.

')
These components allow you to manage virtual machines, run processes, copy files and much more without programming scripts.
In addition to this, there are rollback mechanisms in these components, in case something went wrong and failures occurred during the deployment process. Settings allow you to provide steps that will return the status of systems to the original.
Customization of release preparation processes and deployment steps is done in the visual editor:

At the same time, you can configure the target deployment environment in more detail with the help of Actions (for example, create a virtual website in IIS, create a new virtual machine in Azure, and much more:

In addition to this, there are release configuration management components. For the test environment, one set of configuration files and parameters will be prepared; for the production environment, another. This mechanism works through tokenization of configuration files, and depending on the target environment, the required parameter values will be inserted into the file.
Release Approval Processes
In the process of continuous integration of changes created many builds. Some of them may not meet the conditions of acceptance, and some eventually will be those assemblies that have the right level of quality and are ready for deployment in a production environment. Release management tools provide approval mechanisms. The process of release preparation is formalized and divided into several stages. In addition, at each stage there may be an approval phase based on criteria, for example, passing unit tests, or a responsible person.

Such a mechanism can significantly reduce the risks of deploying a raw build in a production environment, and you can always track the progress of each stage.
Once again, I would like to note that at the
ALM Summit Russia conference a special report will be prepared on release management, within which it will be described in more detail both about the capabilities of this tool and its configuration. If you want to attend this conference, be sure to take advantage of the current 50% discount on the ticket using the promotional code
alm14_VS . This will give you the opportunity not only to get first-hand information, but also to talk with experts and ask additional questions. See you at the conference and more releases ready for use!
