OSDN Git Service

update roles.
[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 mcast_addr = '239.2.11.10'
11 port = '8649'
12
13 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
14
15 default_attributes(
16 )
17
18 override_attributes(
19   'ganglia' => {
20     # gmond
21     'cluster' => {
22       'name' => 'DataNode00000',
23       'owner' => 'grid.example.com'
24     },
25     ## static multi-cast
26     'static' => {
27       'udp_send_channels' => [
28         {
29           'mcast_join' => mcast_addr,
30           'host' => '',
31           'port' => port,
32           'ttl' => '1'
33         }
34       ],
35       'udp_recv_channels' => [
36         {
37           'mcast_join' => mcast_addr,
38           'port' => port,
39           'bind' => mcast_addr
40         }
41       ]
42     }
43 =begin
44     ## automatic multi/uni-cast
45     'gmond_conf_type' => 'automatic',
46     'automatic' = {
47       'cluster_name_prefix' => 'DataNode', # DataNode#####
48       'cast_mode' => 'uni',                # or multi
49       'domain' => 'grid.example.com',
50       'node_prefix' => 'dn',
51       'digit_nums' => '5',       # dn#####
52       'padstr' => '0',           # dn00000
53       'first_node_num' => '0',   # 1st node:  dn00000.grid.example.com
54       'last_node_num'  => '999', # last node: dn00999.grid.example.com
55       'head_node_nums' => '2',   # heads of the 1st cluster: dn0000{0..1}.grid.example.com
56       'cluster_size' => '40',    # heads of the 2nd cluster: dn0004{0..1}.grid.example.com
57       'mcast_join' => mcast_addr, # multi-cast mode only
58       'port' => port,
59       'ttl' => '1',              # multi-cast mode only
60       'bind' => '239.2.11.71'    # multi-cast mode only
61     }
62 =end
63   }
64 )