4adbd6cd57
Changed mon-thresh to monasca-thresh Changed mon_thresh to monasca_thresh in databags Put config file in /etc/monasca Change to use the monasca-thresh deb This will not work without corresponding changes to monasca-vagrant Change-Id: I3ea41c982f9fa522c777f3832198deac8cba9655
28 lines
705 B
Ruby
28 lines
705 B
Ruby
# encoding: UTF-8
|
|
#
|
|
# The user/group thresh are created by the package, as well as /etc/monasca/
|
|
package 'monasca-thresh' do # The package depends on openjdk-7-jre-headless
|
|
action :upgrade
|
|
end
|
|
|
|
service 'monasca-thresh' do
|
|
action :enable
|
|
end
|
|
|
|
# TODO: an encrypted credentials data bag
|
|
credentials = { 'mysql' => { 'user' => 'thresh', 'password' => 'password' } }
|
|
settings = data_bag_item(node[:monasca_thresh][:data_bag], 'monasca_thresh')
|
|
|
|
template '/etc/monasca/thresh-config.yml' do
|
|
action :create
|
|
owner 'root'
|
|
group 'thresh'
|
|
mode '640'
|
|
source 'thresh-config.yml.erb'
|
|
variables(
|
|
credentials: credentials,
|
|
settings: settings
|
|
)
|
|
notifies :restart, 'service[monasca-thresh]'
|
|
end
|