From ae3375a289a71d91844122e999258d0fff4a28d7 Mon Sep 17 00:00:00 2001 From: Tim Kuhlman Date: Fri, 13 Jun 2014 09:16:21 -0600 Subject: [PATCH] Convert to requiring storm to run rather than running standalone --- README.md | 2 +- attributes/default.rb | 2 -- metadata.rb | 2 +- recipes/default.rb | 21 +-------------------- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index cec45ea..90d3da2 100644 --- a/README.md +++ b/README.md @@ -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 ------------ diff --git a/attributes/default.rb b/attributes/default.rb index d733aa8..883031d 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -1,3 +1 @@ default[:mon_thresh][:data_bag] = 'mon_thresh' - -default[:mon_thresh][:log_dir] = '/var/log/mon-thresh' diff --git a/metadata.rb b/metadata.rb index 46070e2..8d696f2 100644 --- a/metadata.rb +++ b/metadata.rb @@ -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' diff --git a/recipes/default.rb b/recipes/default.rb index 71bd6d2..bef3871 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -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')