OSDN Git Service

extend the nagios recipe for all objects.
[metasearch/grid-chef-repo.git] / roles / grid-ns.rb
1 $LOAD_PATH.push("#{File.dirname(__FILE__)}/../_lib")
2 #${chef-repo}/_lib/grid.rb
3 require 'grid'
4
5 name 'grid-ns'
6 description 'Grid nameservice node'
7
8 run_list(
9   # TODO:
10   'role[node_commons]',
11   'role[grid-realm]',
12   'role[ganglia-gmond]'
13 )
14
15 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
16
17 mcast_addr = Grid::CLUSTERS[:base][:nameservices][:mcast_addr]
18 port = '8649'
19
20 default_attributes(
21 )
22
23 override_attributes(
24   'ganglia' => {
25     # gmond
26     'cluster' => {
27       'name' => Grid::CLUSTERS[:base][:nameservices][:alias],
28       'owner' => Grid::DOMAIN
29     },
30     ## static multi-cast
31     'static' => {
32       'udp_send_channels' => [
33         {
34           'mcast_join' => mcast_addr,
35           'host' => '',
36           'port' => port,
37           'ttl' => '1'
38         }
39       ],
40       'udp_recv_channels' => [
41         {
42           'mcast_join' => mcast_addr,
43           'port' => port,
44           'bind' => mcast_addr
45         }
46       ]
47     }
48   }
49 )
50