Also based on @SloshBurch and @feth inputs, I came to the following conclusion:
Prerequisites
- We want to have one artifact, which can be deployed to multiple environments
- We want to minimize custom logic to apply env variables
- We want to easily check if all required env variables are in place
Solution
- we build one single tar file for an app (it's the same for all environments)
- before deploy we check if all env variables are in place (currently we use a deployment repo with configurations and jenkins to store our secrets). This is checked via a groovy script
- we deploy our current version to the splunk instance, deleting all local-files (see remarks below)
- we assemble a rest call via groovy and execute it against our splunk instance (see remarks below)
- we restart the splunk instance
Remarks
For some apps/parts of apps it's good that you can configure them via the interface. For having control I want it in version control/a config-service. Deleting the local-files ensure that state. Unfortunately the ui doesn't seem to allow the sett configs only partially, like it's done with the api calls to /servicesNS/nobody/{{ splunkApp }}/properties/{{ splunkConfigPath }} .
For system wide config it's really nice to have config apps. But, ... I like to be more transparent about what app needs which config.
... View more