Changed mon to monasca everywhere

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
This commit is contained in:
Craig Bryant 2014-08-06 13:41:59 -06:00
parent 921642edb8
commit 4adbd6cd57
6 changed files with 21 additions and 19 deletions

2
.gitignore vendored Executable file
View File

@ -0,0 +1,2 @@
.bundle
.cookbooks

View File

@ -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
<th>Default</th>
</tr>
<tr>
<td><tt>[:mon_thresh][:data_bag]</tt></td>
<td><tt>[:monasca_thresh][:data_bag]</tt></td>
<td>String</td>
<td>Data bag to use</td>
<td><tt>mon_thresh</tt></td>
<td><tt>monasca_thresh</tt></td>
</tr>
</table>
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

View File

@ -1,3 +1,3 @@
# encoding: UTF-8
#
default[:mon_thresh][:data_bag] = 'mon_thresh'
default[:monasca_thresh][:data_bag] = 'monasca_thresh'

View File

@ -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'

View File

@ -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

View File

@ -1,7 +1,7 @@
metricSpoutThreads: 2
metricSpoutTasks: 2
# log location? node['mon_thresh']['log_dir']
# log location? node['monasca_thresh']['log_dir']
metricSpoutConfig:
kafkaConsumerConfiguration: