OSDN Git Service

adds the halyard-on-docker role.
[metasearch/grid-chef-repo.git] / roles / pleiades-dn.rb
1 #
2 # Copyright 2013-2014, whitestar
3 #
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
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
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.
15 #
16
17 $LOAD_PATH.push("#{File.dirname(__FILE__)}/_lib")
18 #${chef-repo}/roles/_lib/grid.rb
19 require 'grid'
20
21 name 'pleiades-dn'
22 description 'Pleiades DataNode node'
23
24 run_list(
25   'role[node_commons]',
26   'role[grid-realm]',
27   'role[ganglia-gmond]',
28   'role[pleiades-node]'
29 )
30
31 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
32
33 mcast_addr = Grid::CLUSTERS[:pleiades][:datanodes][:mcast_addr]
34 port = '8649'
35
36 default_attributes(
37 )
38
39 override_attributes(
40   'ganglia' => {
41     # gmond
42     'cluster' => {
43       'name' => 'DataNode00000',
44       'owner' => Grid::DOMAIN
45     },
46     ## static multi-cast
47     'static' => {
48       'udp_send_channels' => [
49         {
50           'mcast_join' => mcast_addr,
51           'host' => '',
52           'port' => port,
53           'ttl' => '1'
54         }
55       ],
56       'udp_recv_channels' => [
57         {
58           'mcast_join' => mcast_addr,
59           'port' => port,
60           'bind' => mcast_addr
61         }
62       ]
63     }
64 =begin
65     ## automatic multi/uni-cast
66     'gmond_conf_type' => 'automatic',
67     'automatic' => {
68       'cluster_name_prefix' => 'DataNode', # DataNode#####
69       'cast_mode' => 'uni',                # or multi
70       'domain' => 'grid.example.com',
71       'node_prefix' => 'dn',
72       'digit_nums' => '5',       # dn#####
73       'padstr' => '0',           # dn00000
74       'first_node_num' => '0',   # 1st node:  dn00000.grid.example.com
75       'last_node_num'  => '999', # last node: dn00999.grid.example.com
76       'head_node_nums' => '2',   # heads of the 1st cluster: dn0000{0..1}.grid.example.com
77       'cluster_size' => '40',    # heads of the 2nd cluster: dn0004{0..1}.grid.example.com
78       'mcast_join' => mcast_addr, # multi-cast mode only
79       'port' => port,
80       'ttl' => '1',              # multi-cast mode only
81       'bind' => '239.2.11.71'    # multi-cast mode only
82     }
83 =end
84   }
85 )