diff --git a/.gitignore b/.gitignore new file mode 100755 index 0000000..e92c322 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.bundle +.cookbooks diff --git a/README.md b/README.md index 90d3da2..cef5bec 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -mon_thresh Cookbook +monasca_thresh Cookbook =================== -This cookbook sets up a mon-thresh which runs under storm. It is assumed this cookbook is installed on the storm nimbus node. +This cookbook sets up a monasca-thresh which runs under storm. It is assumed this cookbook is installed on the storm nimbus node. Requirements ------------ @@ -16,16 +16,16 @@ Attributes Default - [:mon_thresh][:data_bag] + [:monasca_thresh][:data_bag] String Data bag to use - mon_thresh + monasca_thresh Data Bags --------- -The node[:mon_thresh][:data_bag] data bag is used for all items. +The node[:monasca_thresh][:data_bag] data bag is used for all items. The following data bag items are used: - thresh - Holds basic configuration details of the threshold engine diff --git a/attributes/default.rb b/attributes/default.rb index d0ef9ed..1f608b5 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -1,3 +1,3 @@ # encoding: UTF-8 # -default[:mon_thresh][:data_bag] = 'mon_thresh' +default[:monasca_thresh][:data_bag] = 'monasca_thresh' diff --git a/metadata.rb b/metadata.rb index d212c5e..fa4a4af 100644 --- a/metadata.rb +++ b/metadata.rb @@ -1,9 +1,9 @@ # encoding: UTF-8 # -name 'mon_thresh' -maintainer 'Monitoring Team' -maintainer_email 'hpcs-mon@hp.com' +name 'monasca_thresh' +maintainer 'Monasca Team' +maintainer_email 'monasca@lists.launchpad.net' license 'All rights reserved' -description 'Installs/Configures mon_thresh' +description 'Installs/Configures monasca_thresh' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.2.0' +version '0.2.1' diff --git a/recipes/default.rb b/recipes/default.rb index 1bfd150..5453bda 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -1,27 +1,27 @@ # encoding: UTF-8 # -# The user/group thresh are created by the package, as well as /etc/mon/ -package 'mon-thresh' do # The package depends on openjdk-7-jre-headless +# 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 'mon-thresh' do +service 'monasca-thresh' do action :enable end # TODO: an encrypted credentials data bag credentials = { 'mysql' => { 'user' => 'thresh', 'password' => 'password' } } -settings = data_bag_item(node[:mon_thresh][:data_bag], 'mon_thresh') +settings = data_bag_item(node[:monasca_thresh][:data_bag], 'monasca_thresh') -template '/etc/mon/mon-thresh-config.yml' do +template '/etc/monasca/thresh-config.yml' do action :create owner 'root' group 'thresh' mode '640' - source 'mon-thresh-config.yml.erb' + source 'thresh-config.yml.erb' variables( credentials: credentials, settings: settings ) - notifies :restart, 'service[mon-thresh]' + notifies :restart, 'service[monasca-thresh]' end diff --git a/templates/default/mon-thresh-config.yml.erb b/templates/default/thresh-config.yml.erb similarity index 98% rename from templates/default/mon-thresh-config.yml.erb rename to templates/default/thresh-config.yml.erb index 821429f..285af00 100755 --- a/templates/default/mon-thresh-config.yml.erb +++ b/templates/default/thresh-config.yml.erb @@ -1,7 +1,7 @@ metricSpoutThreads: 2 metricSpoutTasks: 2 -# log location? node['mon_thresh']['log_dir'] +# log location? node['monasca_thresh']['log_dir'] metricSpoutConfig: kafkaConsumerConfiguration: