2 # Copyright 2013-2014, whitestar
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 $LOAD_PATH.push("#{File.dirname(__FILE__)}/_lib")
18 #${chef-repo}/roles/_lib/grid.rb
21 cluster_name = 'praesepe'
22 cluster_sym = cluster_name.to_sym
23 datanode_prefix = 'dn1'
24 datanode_digit_nums = '4'
26 name "#{cluster_name}-dn"
27 description "#{cluster_name.capitalize} DataNode node"
32 'role[ganglia-gmond]',
33 "role[#{cluster_name}-node]"
38 mcast_addr = Grid::CLUSTERS[cluster_sym][:datanodes][:mcast_addr]
48 'name' => 'DataNode00000',
49 'owner' => Grid::DOMAIN
54 'udp_send_channels' => [
56 'mcast_join' => mcast_addr,
62 'udp_recv_channels' => [
64 'mcast_join' => mcast_addr,
71 ## automatic multi/uni-cast
72 'gmond_conf_type' => 'automatic',
74 'cluster_name_prefix' => 'DataNode', # DataNode#####
75 'cast_mode' => 'uni', # or multi
76 'domain' => Grid::DOMAIN,
77 #'node_prefix' => 'dn',
78 'node_prefix' => datanode_prefix,
79 #'digit_nums' => '5', # dn#####
80 'digit_nums' => datanode_digit_nums, # dn4####
81 'padstr' => '0', # dn00000
82 'first_node_num' => '0', # 1st node: dn00000.grid.example.com
83 #'last_node_num' => '999', # last node: dn00999.grid.example.com
84 'last_node_num' => '1', # last node: dn40001.grid.example.com
85 'head_node_nums' => '2', # heads of the 1st cluster: dn0000{0..1}.grid.example.com
86 'cluster_size' => '40', # heads of the 2nd cluster: dn0004{0..1}.grid.example.com
87 'mcast_join' => mcast_addr, # multi-cast mode only
89 'ttl' => '1', # multi-cast mode only
90 'bind' => mcast_addr # multi-cast mode only