Closed jvrplmlmn closed 7 years ago
Looks like templates/default/st2.conf.erb
is outdated and unsync from the original st2.conf
file.
Here is the default config /etc/st2/st2.conf
which is shipped with packaging: https://github.com/StackStorm/st2/blob/master/conf/st2.prod.conf
Apart of that, I'm :-1: with the templating approach on Chef side (https://github.com/StackStorm/chef-stackstorm/blob/master/templates/default/st2.conf.erb).
Instead of templating, chef-stackstorm
should just use original st2.conf
installed by default via packaging. If user needs to overwrite some specific conf settings - chef cookbook should edit the default file /etc/st2/st2/conf
.
Otherwise it will always go out of sync, for example when StackStorm core team changes some recommended defaults in st2.conf
.
chef cookbook should edit the default file
/etc/st2/st2/conf
.
Sorry if I'm not following @armab, but you mean /etc/st2/st2.conf
?
@jvrplmlmn You're right, /etc/st2/st2.conf
.
Sorry for the typo.
But in that case, if a user of the cookbook wants to overwrite a value, they need to use their own file
/ template
and override the default one. Or which alternative are you proposing? Using something like crudini
?
I checked that every st2*
service definition has a EnvironmentFile
like:
EnvironmentFile=-/etc/sysconfig/st2notifier
Is it possible to override those default values in this files?
crudini
Yeah, something like that. For Puppet there is puppetlabs/inifile
, probably something similar exists for Chef. IDK.
Actually, nevermind.
I just checked that https://github.com/StackStorm/chef-stackstorm/blob/master/templates/default/st2.conf.erb is 1 year old (!), so it's from very very old StackStorm installation (before we even introduced new packages).
So just sync-ing default values in https://github.com/StackStorm/chef-stackstorm/blob/master/templates/default/st2.conf.erb and https://github.com/StackStorm/st2/blob/master/conf/st2.package.conf should be good and easy enough.
Thinking about the balance and not messing with Chef practices
Using the latest version of this cookbook, on CentOS 7.2, with StackStorm 2.0.0, results in most
st2*
services not starting up. The/etc/st2/st2.conf
file is missing several options.Most references to the logging configuration files are wrong, since they point to
/etc/st2api/...
and at least with 2.0.0 the configuration files are in/etc/st2/...
:Probably the packaging has changed where the configuration files are created.