OSDN Git Service

add squeeze-backports support to the apt_utils::mirror recipe.
[metasearch/grid-chef-repo.git] / roles / pleiades-hm.rb
1 $LOAD_PATH.push("#{File.dirname(__FILE__)}/../_lib")
2 #${chef-repo}/_lib/grid.rb
3 require 'grid'
4
5 name 'pleiades-hm'
6 description 'Pleiades HBase Master node'
7
8 run_list(
9   'role[node_commons]',
10   'role[grid-realm]',
11   'role[ganglia-gmond]',
12   'role[pleiades-node]'
13 )
14
15 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
16
17 this_subcluster = Grid::CLUSTERS[:pleiades][:hbasemasters]
18 mcast_addr = this_subcluster[:mcast_addr]
19 port = '8649'
20 =begin
21 # uni-cast
22 udp_send_channels4ucast = []
23 this_subcluster[:nodes].first(2).each {|host|
24   udp_send_channels4ucast.push(
25     {
26       'mcast_join' => '',
27       'host' => "#{host}.#{Grid::DOMAIN}",
28       'port' => port,
29       'ttl' => ''
30     }
31   )
32 }
33 =end
34
35 default_attributes(
36 )
37
38 override_attributes(
39   'ganglia' => {
40     # gmond
41     'cluster' => {
42       'name' => this_subcluster[:alias],
43       'owner' => Grid::DOMAIN
44     },
45     'static' => {
46       ## static multi-cast
47       'udp_send_channels' => [
48         {
49           'mcast_join' => mcast_addr,
50           'host' => '',
51           'port' => port,
52           'ttl' => '1'
53         }
54       ],
55       'udp_recv_channels' => [
56         {
57           'mcast_join' => mcast_addr,
58           'port' => port,
59           'bind' => mcast_addr
60         }
61       ]
62 =begin
63       ## static uni-cast
64       'udp_send_channels' => udp_send_channels4ucast,
65       'udp_recv_channels' => [
66         {
67           'mcast_join' => '',
68           'port' => port,
69           'bind' => ''
70         }
71       ]
72 =end
73     }
74   }
75 )