Question
Kari Vatjus-Anttila · Jan 4

Property placeholders for Production configurations

Hello,

I have a question about defining properties for various of services, operations and processes in Productions. Let’s say I have developed a container running an IRIS instance with a single namespace and a production with pre-defined set of components. I’m planning to deploy this container to dev, staging and production environments. These different environments use different settings for the operations, etc. For example, dev-environment could use some test endpoint for an HTTP component, e.g. https://testdomain.com/test and production environment https://proddomain.com/prod. Because the properties might differ depending on the environment and the place where it is used, one should avoid hard-coding the settings directly into the Production.

My question is: Is it possible to define property placeholders for these settings, that might be different between environments, and load the settings from a file during container startup? For example, the HTTP endpoint in the previous example could be defined as ${http.endpoint}. The property could be defined in a property file as http.endpoint="https://testdomain.com/test".

Using property placeholders, one could define settings for different environments separately without customizing the Production case by case. This would make deployments easier by shipping the same docker image to everyone who needs it with a property file that works for the target environment.

Is this kind of behaviour possible or am I forced to create separate docker images for each env / each customer who uses the image? If not, this could be potentially a big problem if we need to build docker containers for each case separately instead of just using a property file with property placeholders.

Thank you for any help / insight into this matter!

Kari Vatjus-Anttila

Product version: IRIS 2021.2
00
1 0 2 59
Log in or sign up to continue

Use System Default Settings and set them on container startup via %ZSTART or OnStart (pass settings values inside via env vars or mounted file).

Production would get System Default Settings automatically when started.

We're using this approach and it works.

Thank you very much for your response.

Yes, I think that might work in our situation. I will read the docs and look at the %ZSTART / OnStart routines and how to use it.

Thanks for the help!

Kari