Configuration templates:
Configuration for software applications is essential to
control their behavior. It includes secrets, endpoints, connection strings,
certificate references and many other settings. When the same software is
deployed to different environments, the values change. Multiple configurations
specific to environments begin to form and teams start leaning towards a
configuration store. As with all stores, a suitable service can automate the
computations associated with the store and make the results available over the web,
so a configuration service forms.
The variations between environments in configurations become
easier to manage only when the repetitions are moved to a single template. This
form of configuration splits the multiple copies of configurations into a template
and values set of files. There can be many values file, but their size will be small,
and they will be easier to read. The idea of templates to generate configmaps
for deployment is rampant throughout the industry on both windows and Linux
environments and hosting infrastructures that leverage this operating system.
The process of adding a new configuration to a deployed
application sometimes involves several manual steps. After the configuration
value is set, it must be deployed for consumption in every cluster,
environment, and machine function. This involves running a command using a
client for every cluster, environment, and machine function where the target
application is deployed. The client requires a configuration template and
configuration value file as inputs.
As mentioned, the configuration value file needs to be
unique for every cluster, environment, and machine function combination. One
way to automate it is to generate the configuration values file so that the
human involvement to edit it is removed and there is little chance for typo.
Tools are often used for this purpose.
While this solves a set of problems, it does not eliminate
the need to run the tool many times for creating configuration values in each
distinct deployment. Consequently, some
form of batching also makes its way into automations. The batch command merely
repeats the invocations once for each deployment so that the human involvement
to run them again and again is avoided. The output of the batch command is also
easy to read with the set pattern of invocations but with a different parameter
for the generated configuration values file.
This covers the deployment related automations for
configuration but it does not solve the syntax and semantics associated with
the templates. While Xpath for xml and similar for Json are popular ways to
store data and browse them, the syntax can be used just like a programming
language with repetitions using loops and counters. Some templates provide a veritable library of
builtin intrinsics and functions to use and thus make them more succinct.
No comments:
Post a Comment