Skip to main content

Team Service & TFS - Release Management and Multiple Environment Support

I was impressed to discover a new feature on Team Service and TFS 2015 - Release Management.
Release Management allow us two things that can improve our release procedures:
  • Define multiple environments and push the binaries (content) from one environment from another
  • Request manual approve before pushing the packages from one environment to another
Environments Definition
Once the CI finish the build, we can specify in what environment we want to push the output. Once the content is pushed to a specific environment, we can run any kind of steps, from simples once like Integration Tests to more complex one, where people interaction is required. 
Team Service support us to define one or more release definitions. Each release definitions represents the tasks that needs to be run on each environment. It can be a simple script that change a version, or adding/removing content from the build. In the end can be any action that needs to be executed when we deploy content to a specific environment.  

From one another we can push the content to another environment once:
  • The build is with success 
  • Time scheduler
  • Success of a previous deployment
The nice thing is that we can add a new environment directly from the UI. For each env. we can specify what are the tasks that we want to execute. Don't forget that once you defined an environment it might be more easily to clone the current environment and modify it based on your needs. Usually, at steps that needs to be executed on each environment there is a delta, but you might have some steps that are common.

On top of this we can deploy in the same time the output of a build or from another environment to one or multiple environments. This means that you can deploy in two env. (QA and Pre1Production). A similar thing that can be done on the other side - push the package to an env only of we are 'green' on multiple env.

For each environment we can have variables. In this way we can have different configuration for each separate env. From the usability perspective, the nice thing is that the list of variables that are defined contains also the value for all environment. In this way it is very easy to check or to compare what values are set.
From the security perspective, we are allowed to specify what users or group of users has access to each env. In this way you can have the dev. env. where only devs can access it n QA env. where only the testing team can access it. And so on other environments. 

Manual Approve
There are times when you cannot configure an automatic mechanism to deploy from one env. to another. Very often, you need a person that decided if a build goes to pre-production for example. Or you need to QA Lead to decide if the current build that is deployed in the QA Environment can go to the next environment or not.
For this kind of scenarios, we are allowed to specify that there is a need of a manual release approval. A list of persons or a group needs to be specified. This persons can approve a deployment before beeing push to it or after is deployed (pre/post-deployment approve).
In this way we can ensure that only if a specific person approves a release, the content is pushed to Pre-production or even to Production environment. 

On top of this you can specify a list of people that needs to approve the action. The options in this case are:
  • Any one user
  • All users in sequential order
  • All users in any order
In this way you can map any process flow and gates over it.

Conclusion
From a DevOps point of view, more and more features are added to TFS each month. With features like this, even complex flows and procedures can be mapped easily.

Comments

Popular posts from this blog

How to check in AngularJS if a service was register or not

There are cases when you need to check in a service or a controller was register in AngularJS.
For example a valid use case is when you have the same implementation running on multiple application. In this case, you may want to intercept the HTTP provider and add a custom step there. This step don’t needs to run on all the application, only in the one where the service exist and register.
A solution for this case would be to have a flag in the configuration that specify this. In the core you would have an IF that would check the value of this flag.
Another solution is to check if a specific service was register in AngularJS or not. If the service was register that you would execute your own logic.
To check if a service was register or not in AngularJS container you need to call the ‘has’ method of ‘inhector’. It will return TRUE if the service was register.
if ($injector.has('httpInterceptorService')) { $httpProvider.interceptors.push('httpInterceptorService&#…

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See http://go.microsoft.com/fwlink/?LinkId=260882 for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

Run native .NET application in Docker (.NET Framework 4.6.2)

Scope
The main scope of this post is to see how we can run a legacy application written in .NET Framework in Docker.

Context
First of all, let’s define what is a legacy application in our context. By a legacy application we understand an application that runs .NET Framework 3.5 or higher in a production environment where we don’t have any more the people or documentation that would help us to understand what is happening behind the scene.
In this scenarios, you might want to migrate the current solution from a standard environment to Docker. There are many advantages for such a migration, like:

Continuous DeploymentTestingIsolationSecurity at container levelVersioning ControlEnvironment Standardization
Until now, we didn’t had the possibility to run a .NET application in Docker. With .NET Core, there was support for .NET Core in Docker, but migration from a full .NET framework to .NET Core can be costly and even impossible. Not only because of lack of features, but also because once you…