To fulfil the client brief, IPCOS initiated the development of a tool to manage the different configuration files.
The tool we used for this project was a C# program that utilizes data files stored in JSON. The program instantiates template files of the configuration files and produces the actual configuration files for each site and environment. The templates contain tags, which will be replaced by a regular expression of the data values. The data values themselves can also contain these tags, which means that the text replacement will be applied recursively until no more tags remain.
The methodology we chose grouped the data files into different levels:
- Global data files
- Environment-specific data files
- Site-specific data files
- Site and environment-specific data files
The same data value name can appear on multiple levels, but the most specific one will be used when resolving the value of that name. By using tags in values, it is possible to define a template at a higher level, where the components of the template will be defined at more specific levels.
As a result, it was possible to build the data files in a normalised way.
Building the tool took a couple of days. Converting the existing data files to templates and extracting the data tags took about a week. The work was done by a single person. The tool is now used by the entire global team.
Changing the configuration files used to take hours when done manually, while it is now a matter of minutes. All changes are now guaranteed to be consistent over all configuration files, reducing the number of bugs due to incorrect configurations. The entire team accepts the tool, and all developers know how to run it. There is no fear of making changes to configuration files because everyone is confident that it is done correctly and fast.