Integration Server 10.15 | Microservices Runtime Guide | Using Configuration Variables Templates with Microservices Runtime | What Does a Configuration Variables Template Look Like?
 
What Does a Configuration Variables Template Look Like?
A configuration variables template is a properties file that contains configuration data as a series of key-value pairs where the key name reflects the asset and particular asset property for which you can supply a value. For example, jndi.DEFAULT_IS_JNDI_PROVIDER.providerURL=nsp://myHost:9000 indicates that the JNDI provider alias named DEFAULT_IS_JNDI_PROVIDER has a URL of nsp://myHost:9000.
When a configuration variables template is generated from an existing Microservices Runtime, the template is populated with configuration data from the Microservices Runtime instance. The template content reflects the Microservices Runtime configuration at the time Microservices Runtime generated the template. For example, the configuration variables template lists a key-value pair for each defined global variable.
The generated configuration variables template does not contain key-value pairs for all of configuration information for Microservices Runtime.
Below is an excerpt of a configuration variables template:
#Sample Generated Template
#Wed Jun 20 17:13:40 EDT 2018
email.WmRoot.myEmailPort.host=exchange
email.WmRoot.myEmailPort.password=******
email.WmRoot.myEmailPort.server_port=7891
email.WmRoot.myEmailPort.user=user123ispasswordexpirationsettings.
jms.DEFAULT_IS_JMS_CONNECTION.clientID=DEFAULT_IS_JMS_CLIENT
jndi.DEFAULT_IS_JNDI_PROVIDER.providerURL=nsp\://localhost\:9000
settings.watt.server.compile=C\:\\IS_10-3\\June6\\jvm\\jvm\\bin\\javac -
classpath {0} -d {1} {2}
settings.watt.ssh.jsch.ciphers=aes256-ctr,aes192-
ctr,arcfour,arcfour128,arcfour256,aes128-ctr,aes128-cbc,3des-ctr,3des-
cbc,blowfish-cbc,aes192-cbc,aes256-cbc
Only specific values can be supplied via the template for an asset. For example, for a JMS connection alias a configuration variables template lists a key-value pair for the clientID, user, and password properties. The template omits key-value pairs for all other properties.
In the template, each property name follows this pattern: assetType.assetName.propertyName=value where assetType is the type of administrative asset, assetName is the name given to the asset such as an alias name, and propertyName is the asset property for which you can set a value.
For example, following are key-value pairs for a global variable named serverhost, a global variable named serverport, the DEFAULT_IS_JMS_CONNECTION connection alias, and the JDBC pool alias named webMPool:
globalvariable.serverhost.value=server123.example.com
globalvariable.serverport.value=5555
jms.DEFAULT_IS_JMS_CONNECTION.clientID=DEFAULT_IS_JMS_CLIENT
jms.DEFAULT_IS_JMS_CONNECTION.password=******
jms.DEFAULT_IS_JMS_CONNECTION.user= userA
jdbc.webMPool.dbURL=jdbc:wm:oracle://testserver:1521;serviceName=webm
jdbc.webMPool.password=******
jdbc.webMPool.userid=jdbcuserTest
To change the assigned values in a configuration variables template, use a text editor to open the template and make changes. Any value you specify for a property must adhere to the requirements for that property. For example, the global variable value cannot exceed 255 characters. For passwords or other types of values that should be encrypted, Microservices Runtime Administrator provides a utility to encrypt a value. Microservices Runtime Administrator uses AES to encrypt the values, specifically AES/ECB/PKCS5Padding. Alternatively, you can use a Kubernetes secret for confidential values such as passwords.
You can also add an asset by editing the configuration variables template. Not all assets for which you can edit configuration in a configuration variables template can be created via a template.
As an alternative to “hard coding” a value for a property in a template, you can specify an environment variable (ENV variable) as the value of a property in the configuration variables template. The following line specifies that the JDBC pool URL for the alias webMPool should be set to the value of the environment variable named JDBC_URL: jdbc.webMPool.dbURL=$env{JDBC_URL}
If you opt to use an ENV variable as a value for configuration variables, make sure that you specify the values for ENV variables defined in the configuration variables template. 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.