Integration Server 10.15 | Microservices Runtime Guide | Using Configuration Variables Templates with Microservices Runtime | Editing a Configuration Variables Template
 
Editing a Configuration Variables Template
 
Encrypting Values for the Variables Template
Using a Kubernetes Secret with a Configuration Variables Template
Creating New Assets with the Configurations Variable Template
After you generate a configuration variables template from a Microservices Runtime, you modify the configuration variables template to contain the property values that you want applied to a Microservices Runtime at startup. You can hard code values or specify an environment variable as the value. You can also encrypt values or use a Kubernetes Secret to protect sensitive data. In addition, you can also add assets to the template.
Keep the following information in mind when you edit a configuration variables template.
*Any value that you specify must meet the requirements for the associated property. For example, global variable values cannot exceed 255 characters. If the value is not valid, failures will occur at runtime, either during server initialization or when clients start sending in requests.
*A configuration variables template can be used to change the configuration information for assets that already exist on the Microservices Runtime.
*You can add assets for some asset types to a Microservices Runtime by adding key-value pairs to a template. Any asset that you create must meet the naming requirements for the asset. If it does not, the improperly configured asset might result in Microservices Runtime failure at startup or during operations. For a list of assets that you can add, Creating New Assets with the Configurations Variable Template.
*A configuration variables template generated from Microservices Runtime lists only assets that existed on the Microservices Runtime from which you generated the template. You can add an asset for an asset type for which asset creation is allowed via a configuration variables template. If asset creation is not allowed for that type but you know the asset will exist on the Microservices Runtime that will use the template, you can add the asset and the necessary key-value pairs to the template. At startup, if the template specifies a value for a non-existent asset, the Microservices Runtime logs a message to the configuration variables log.
For more information about assets and properties and the corresponding key name, see Configuration Variables Template Assets.
*When Microservices Runtime generates an application.properties template, any properties that contain an alias name with a period (.) include another period as an escape character. For example, for a JMS connection alias named my.JMS.alias, the template property corresponding to the Client ID in the alias the name: jms.my..JMS..Alias.clientID=value
Do not remove the period (.) acting as the escape character.
If you edit the template by adding a key-value pair for an asset property and the asset property includes an alias name with a period (.), make sure to add another period to serve as the escape character.
*To supply a value in the configuration variables template
1. Open the template in a text editor.
2. For each key for which you want to supply a value, do one of the following:
To
Enter this for the property value
Hard code a value
The value you want to use.
Use an environment value as the value
The name of the environment variable in the format: $env{environmentVariableName}
Where environmentVariableName is the name of the environment variable. For example: $env{JDBC_URL}
Use a Kubernetes Secret as the value
$secret{SecretName}
Where secretName is the key for the secret whose value you want to use. For example: $secret{mySecretPassword}
For more information about using a Kubernetes Secret with a configuration variables template, see Using a Kubernetes Secret with a Configuration Variables Template.
Encrypt a value
Use Microservices Runtime Administrator to generate an encrypted value and then copy that value into the template. For more information see, Encrypting Values for the Variables Template.
While Microservices Runtime accepts clear text passwords as well as encrypted ones, Software AG recommends that you encrypt all passwords and other sensitive data in your configuration variables templates.
3. Repeat the above step for each key that you want to set.
4. To add an asset, add the key-value pair for each property of the asset that you want to set.
For example, to add a global variable, insert the following into the template:
globalvariable.globalVariableName.value
Where globalVariableName is the name of the global variable that you want to create.
5. Repeat step 4 for every asset that you want to create.
6. Save the template.