Closed kbrowns closed 4 years ago
@kbrowns The "best" way to do this varies, but I've found using Groovy snippets via jenkins_script
or dropping them into $JENKINS_HOME/init.groovy.d/some-config-bit.groovy
to get processed on Jenkins startup to be effective. The only downside of the latter is you need to make sure the scripts don't require additional restarts of Jenkins or it can get tricky to track that state. Both methods can be challenging in that the scripts should be 'idempotent' ie they can be run multiple times but only make changes once otherwise your service might restart every time it converges.
@espolestra thank you for your response. We’ve found jenkins_script to be a very effective way to do this
Depending on how complex your needs are, https://github.com/jenkinsci/configuration-as-code-plugin seems to work quite well for adjusting configuration values from deployed yaml files (but I've only really done simple things so far with it, so cannot give an universal endorsement).
Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.
Closing due to inactivity. If this is still an issue please reopen or open another issue. Alternatively drop by the #sous-chefs channel on the Chef Community Slack and we'll be happy to help! Thanks, Sous-Chefs.
Cookbook version
6.0.0
Chef-client version
12.21.3
Platform Details
AWS Linux 2
Scenario:
Would like guidance on the best way to manage server level and plugin level (say LDAP) configuration on the master with this cookbook. I'm not finding any exposed means for setting up values in the config.xml file on the master. In past lives when I've written the automation from scratch, I template or poke the config.xml file directly. Is that the recommended way to do this while using this cookbook?