Logback config, puppet and application versions -


i busy testing new approach managing java application uses logback on puppet-managed host, , wondering if had advice on best approach this. stuck catch 22 situation.

the java application deployed host automated system (ci). deployment writes application version number file (e.g. /etc/app.version may contain "0001")

the logback config file (logback.xml) managed puppet.

i trying configure application include it's version number in logging layout (e.g. <pattern>version: %version%</pattern> . however, not sure on approach, there isn't "include" function logback config file (to include file version number logback config). @ same time, don't see way puppet client-side template build, using host-side file (i've tried using template approach, template compiled on puppet server side).

any idea's on how working?

i write custom fact. facts executed on client.

eg:

logback/manifests/init.pp

file { '/etc/logback.xml':   content => template('logback/logback.xml.erb') } 

logback/templates/logback.xml.erb

... <pattern>version: <%= scope.lookupvar('::my_app_version') %></pattern> ... 

logback/lib/facter/my_app_version.rb

facter.add('my_app_version')   setcode     begin        file.read('/etc/app.version')     rescue        nil     end   end end 

hope helps. think in puppet < 3.0 have set "pluginsync = true" in puppet.conf work.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -