Convert to requiring storm to run rather than running standalone

This commit is contained in:
Tim Kuhlman 2014-06-13 09:16:21 -06:00
parent 1f2f31bc4b
commit ae3375a289
4 changed files with 3 additions and 24 deletions

View File

@ -1,6 +1,6 @@
mon_thresh Cookbook
===================
This cookbook sets up a standalone mon-thresh, a cluster setup is not supported.
This cookbook sets up a mon-thresh which runs under storm. It is assumed this cookbook is installed on the storm nimbus node.
Requirements
------------

View File

@ -1,3 +1 @@
default[:mon_thresh][:data_bag] = 'mon_thresh'
default[:mon_thresh][:log_dir] = '/var/log/mon-thresh'

View File

@ -4,4 +4,4 @@ maintainer_email "hpcs-mon@hp.com"
license 'All rights reserved'
description 'Installs/Configures mon_thresh'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.1.3'
version '0.2.0'

View File

@ -8,26 +8,7 @@ service 'mon-thresh' do
provider Chef::Provider::Service::Upstart
end
# Create the log file directory
directory node[:mon_thresh][:log_dir] do
action :create
recursive true
owner 'thresh'
group 'thresh'
mode 0755
end
file '/etc/default/mon-thresh' do
action :create
owner 'root'
group 'root'
mode 0644
content "export LOGDIR=#{node[:mon_thresh][:log_dir]}"
notifies :restart, "service[mon-thresh]"
end
# todo - I need an encrypted credentials data bag
# todo - an encrypted credentials data bag
credentials = { 'mysql' => { 'user' => 'thresh', 'password' => 'password'}}
settings = data_bag_item(node[:mon_thresh][:data_bag], 'mon_thresh')