Integration Server 10.15 | Microservices Runtime Guide | Using Configuration Variables Templates with Microservices Runtime | Approaches for Using a Configuration Variables Template with Microservices Runtime
 
Approaches for Using a Configuration Variables Template with Microservices Runtime
Because a configuration variables template can be used with a Microservices Runtime running in a Docker container or an on-premises Microservices Runtime, there are multiple approaches to using the template. The approach you select determines the template file name, the template file location, whether the template file is part of a Docker image, and how to start the Microservices Runtime so that Microservices Runtime applies the template.
To help determine which approach to use, decide the following:
*Will the Microservices Runtime with which you want to use the template run in a Docker container or on-premises (outside of a Docker container)?
*If Microservices Runtime runs in a Docker container, do you want to include the template as part of the Docker image or external to the image?
*Do you want to hard code values for variables in the template or use environment (ENV) variables to specify some or all values?
*Do you want to use multiple configuration variables templates or just one?
The answers to the above questions help determine which approach to use, which in turn, determines the files that you need to create, where you place the configuration variables template, the name of the file, and how to start the Microservices Runtime so that Microservices Runtime applies the template values.
The following table describes the possible approaches for using a configuration variables template with Microservices Runtime
Approach
Description and requirements
Docker image does not include template which does not use ENV variables
Microservices Runtime runs in a Docker container, the template is not included in the Docker image, and configuration variables values are hard coded in the template only. The template does not use ENV variables.
Template file name: application.properties or a user-defined name
Template location: A location that is accessible to the Docker container.
Startup: The docker run command includes the SAG_IS_CONFIG_PROPERTIES environment variable which specifies the name and location of one or more configuration variables templates and/or a directory containing templates.
Docker image does not include template and template uses ENV variables
Microservices Runtime runs in a Docker container, the template is not included in the Docker image, and configuration variable values are hard coded in the template and/or the template uses environment variables.
Template file name: application.properties or a user-defined name. If you are using multiple template files, the file extension must be *.properties.
Template location: A location that is accessible to the Docker container.
If you are using ENV variables for some or all of the variable values, refer to the Docker documentation or the documentation for your container orchestration tool for more information about how to specify the ENV variables for Docker containers.
Startup: The docker run command includes the SAG_IS_CONFIG_PROPERTIES environment variable which specifies the name and location of the configuration variables templates and/or a directory containing templates. If using the docker run command, the command must also include options --env, -e or --env-file options for setting the ENV variables in the container.
Docker image includes template which uses ENV variables
Microservices Runtime runs in a Docker container, the configuration variables template is part of the Docker image, and the template uses environment variables for some or all the values in the template.
Template name: application.properties
Template location is one of the following:
* Integration Server_directory /instances/instanceName/application.properties
* Integration Server_directory /application.properties
If you are using ENV variables for some or all of the variable values, refer to the Docker documentation or the documentation for your container orchestration tool for more information about how to specify the ENV variables for Docker containers.
Startup: The docker run command must include --env, -e or --env-file options for setting the ENV variables in the container.
On-premise Microservices Runtime installation does not include template and template does not use ENV variables.
Microservices Runtime runs on-premise, configuration variables values are hard coded in the template only, and the template is not included in the Microservices Runtime file system. The template does not use ENV variables.
Template name: application.properties or a user-defined name
Template location: A location that is accessible to the Microservices Runtime.
Startup: Microservices Runtime startup includes the SAG_IS_CONFIG_PROPERTIES ENV variable which specifies the name and location of one or more configuration variables templates and/or a directory containing templates.
On-premise Microservices Runtime includes template which does not use ENV variables.
Microservices Runtime runs on-premise and a configuration variables template defines all the values. The template does not use ENV variables.
Template name: application.properties
Template location is one of the following:
* Integration Server_directory /instances/instanceName/application.properties
* Integration Server_directory /application.properties
Startup: This approach does not require any special steps at startup.
Note:
This approach does not support using multiple template files to set configuration.
On-premises Microservices Runtime includes template which uses ENV variables
Microservices Runtime runs on-premises and a configuration variables template hard codes the values and/or uses environment variables for the values.
Template name: application.properties
Template location is one of the following:
* Integration Server_directory /instances/instanceName/application.properties
* Integration Server_directory /application.properties
Environment variables can be specified in Integration Server_directory /bin/setenv.bat(sh) files or ENV variables can be pre-defined in your environment.
For an Integration Server with an Microservices Runtime license, environment variables can be specified in Integration Server_directory profiles/IS_instanceName/bin/custom_setenv.bat(sh) files or ENV variables can be pre-defined in your environment.
Startup: This approach does not require any special steps at startup.
Note:
This approach does not support using multiple template files to set configuration.