OSDN Git Service

add yarn-installer recipe to the nodejs_utils cookbook.
[metasearch/grid-chef-repo.git] / roles / pleiades-dn.rb
index 6fd84fe..be98505 100644 (file)
@@ -1,3 +1,23 @@
+#
+# Copyright 2013-2014, whitestar
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+$LOAD_PATH.push("#{File.dirname(__FILE__)}/_lib")
+#${chef-repo}/roles/_lib/grid.rb
+require 'grid'
+
 name 'pleiades-dn'
 description 'Pleiades DataNode node'
 
@@ -10,7 +30,7 @@ run_list(
 
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
-mcast_addr = '239.2.11.20'
+mcast_addr = Grid::CLUSTERS[:pleiades][:datanodes][:mcast_addr]
 port = '8649'
 
 default_attributes(
@@ -21,7 +41,7 @@ override_attributes(
     # gmond
     'cluster' => {
       'name' => 'DataNode00000',
-      'owner' => 'grid.example.com'
+      'owner' => Grid::DOMAIN
     },
     ## static multi-cast
     'static' => {
@@ -44,7 +64,7 @@ override_attributes(
 =begin
     ## automatic multi/uni-cast
     'gmond_conf_type' => 'automatic',
-    'automatic' = {
+    'automatic' => {
       'cluster_name_prefix' => 'DataNode', # DataNode#####
       'cast_mode' => 'uni',                # or multi
       'domain' => 'grid.example.com',