Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

Configuration Transforms in Octopus Deploy explained!

Before understanding “Configuration Transforms” in octopus deploy, lets understand what is “Web.config Transformation” in visual studio.

What is Web.config?
Web.config is an application configuration file of The Official Microsoft ASP.NET Site written in XML. It stays is the root directory of application and is responsible for controlling the application’s behaviour.

In Visual Studio, when you create a new MVC project or Web Forms Application, have you ever noticed that two config files apart from Web.config are added automatically? These are Web.Debug.config and Web.Release.config.

What is Transform File?
Here Web.Release.config is acting like a transform file. A transform file is an XML file that specifies how the Web.config file should be changed when it is deployed.

What is Purpose of config Transform file?
The purpose of these files is to generate a new Web.config file depending upon the environment. It’s extremely useful to store settings in these files, for example





debug = true //in development
debug= false //in production.

The advantage is that you don’t need to change the web.config since it is generated by the Web.Config Transformation Engine. It takes a source file (your project’s original web.config file) and a transform file (for example web.release.config) and produces an output file (web.config that is ready for the production environment).

Now lets understand a Problem
It order to automate the process of changing the Web.config file when you deploy it to

  • Different destination environments such as devlopement, staging, testing or
  • Different Build configuration or
  • Different Profile or
  • Custom

We need to have changed Web.config as per their environments, Build configuration and Profile. if the required configurations are lot and many required replace, Merge, insert, remove and some of the things based on condition, it become very tedius tasks everytime.

Most applications have settings in the Web.config file that must be different when the application is deployed. Automating the process of making these changes keeps you from having to do them manually every time you deploy, which would be tedious and error prone.

Thus solution is – Web.config File Transformations.

If you want to test a behaviour of Web.config File Transformations live, you may checkout The team at AppHarbor created a useful tool to help test configuration file transformations. Link – https://webconfigtransformationtester.apphb.com/

In order to understand more about basic behaviour of “Web.config File Transformations.
“, you may this short clip as well. Web.config File Transformations.

There are few good web refereneces as well.

Now lets understand “Configuration Transforms” in octopus deploy.

It is a common scenario to perform different configuration transforms depending on the Environment that is being deploying to. For example: Web.config may require different values for Development, Testing and Production. The Octopus configuration transforms feature supports common scenarios automatically by looking for Web.Development.config when deploying to Development and applying the appropriate configuration transformations to Web.config. While this is great for most people, there is sometimes a need to specify custom rules and do conditional transformations.

There are some useful url are given as below;

Rajesh Kumar
Follow me
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x