OSDN Git Service

add ganglia recipe's uni-cast setting support.
[metasearch/grid-chef-repo.git] / roles / pleiades-dn.rb
1 name 'pleiades-dn'
2 description 'Pleiades DataNode node'
3
4 run_list(
5   'role[grid-realm]',
6   'role[ganglia-gmond]',
7   'role[pleiades-node]'
8 )
9
10 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
11
12 default_attributes(
13 )
14
15 mcast_addr = '239.2.11.10'
16 port = '8649'
17
18 override_attributes(
19   'ganglia' => {
20     # gmond
21     'cluster' => {
22       'name' => 'DataNode00',
23       'owner' => 'grid.example.com'
24     },
25     # multi-cast
26     'udp_send_channels' => [
27       {
28         'mcast_join' => mcast_addr,
29         'host' => '',
30         'port' => port,
31         'ttl' => '1'
32       }
33     ],
34     'udp_recv_channels' => [
35       {
36         'mcast_join' => mcast_addr,
37         'port' => port,
38         'bind' => mcast_addr
39       }
40     ]
41 =begin
42     ## uni-cast
43     'huge_cluster_unicast' = {
44       'enabled' => false,
45       'domain' => 'grid.example.com',
46       'node_prefix' => 'dn',
47       'digit_nums' => '5',      # dn#####
48       'padstr' => '0',          # dn00000
49       'first_node_num' => '0',  # 1st node:  dn00000.grid.example.com
50       'last_node_num'  => '999',# last node: dn00999.grid.example.com
51       'head_node_nums' => '2',  # heads of the 1st cluster: dn0000{0..1}.grid.example.com
52       'cluster_size' => '40',   # heads of the 2nd cluster: dn0004{0..1}.grid.example.com
53       'port' => '8649'
54     }
55 =end
56   }
57 )