OSDN Git Service

add grid-gpm role.
authorwhitestar <whitestar@gaea.test>
Tue, 25 Jun 2013 08:48:55 +0000 (17:48 +0900)
committerwhitestar <whitestar@gaea.test>
Tue, 25 Jun 2013 08:48:55 +0000 (17:48 +0900)
nodes/gpm00.grid.example.com.json [new file with mode: 0644]
roles/grid-gpm.rb [new file with mode: 0644]
roles/pleiades-gm.rb

diff --git a/nodes/gpm00.grid.example.com.json b/nodes/gpm00.grid.example.com.json
new file mode 100644 (file)
index 0000000..69f1306
--- /dev/null
@@ -0,0 +1,5 @@
+{
+  "run_list": [
+    "role[grid-gpm]"
+  ]
+}
diff --git a/roles/grid-gpm.rb b/roles/grid-gpm.rb
new file mode 100644 (file)
index 0000000..ef05123
--- /dev/null
@@ -0,0 +1,40 @@
+name 'grid-gpm'
+description 'Grid provisioning master node'
+
+run_list(
+  'role[ganglia-gmond]',
+)
+
+this_domain = 'grid.example.com'
+mcast_addr = '239.2.10.5'
+port = '8649'
+
+#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+
+default_attributes(
+)
+
+override_attributes(
+  'ganglia' => {
+    # gmond
+    'cluster' => {
+      'name' => 'ProvisioningMaster',
+      'owner' => this_domain
+    },
+    'udp_send_channels' => [
+      {
+        'mcast_join' => mcast_addr,
+        'host' => '',
+        'port' => port,
+        'ttl' => '1'
+      }
+    ],
+    'udp_recv_channels' => [
+      {
+        'mcast_join' => mcast_addr,
+        'port' => port,
+        'bind' => mcast_addr
+      }
+    ]
+  }
+)
index 796f1bd..c144100 100644 (file)
@@ -12,6 +12,9 @@ run_list(
 )
 
 this_domain = 'grid.example.com'
+mcast_addr = '239.2.11.3'
+port = '8649'
+polling_interval = '30'
 
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
@@ -30,9 +33,6 @@ default_attributes(
   },
 )
 
-mcast_addr = '239.2.11.3'
-port = '8649'
-
 override_attributes(
   'ganglia' => {
     # gmond
@@ -61,37 +61,37 @@ override_attributes(
     'data_sources' => [
       {
         :name => 'Nagios',
-        :polling_interval => '',
+        :polling_interval => polling_interval,
         :address_list => "nm0{0..1}.#{this_domain}".expand
       },
       {
         :name => 'Ganglia',
-        :polling_interval => '',
+        :polling_interval => polling_interval,
         :address_list => "gm0{0..1}.#{this_domain}".expand
       },
       {
         :name => 'Workflow',
-        :polling_interval => '',
+        :polling_interval => polling_interval,
         :address_list => "wf0{0..1}.#{this_domain}".expand
       },
       {
         :name => 'Proxy',
-        :polling_interval => '',
+        :polling_interval => polling_interval,
         :address_list => "pxy0{0..1}.#{this_domain}".expand
       },
       {
         :name => 'NameNode',
-        :polling_interval => '',
+        :polling_interval => polling_interval,
         :address_list => "nn0{0..1}.#{this_domain}".expand
       },
       {
         :name => 'JobTracker',
-        :polling_interval => '',
+        :polling_interval => polling_interval,
         :address_list => "jt0{0..1}.#{this_domain}".expand
       },
       {
         :name => 'DataNode00',
-        :polling_interval => '',
+        :polling_interval => polling_interval,
         :address_list => "dn0000{0..1}.#{this_domain}".expand
       }
     ]