OSDN Git Service

add openldap::client recipe.
authorwhitestar <whitestar@gaea.test>
Thu, 27 Jun 2013 11:10:39 +0000 (20:10 +0900)
committerwhitestar <whitestar@gaea.test>
Thu, 27 Jun 2013 11:10:39 +0000 (20:10 +0900)
31 files changed:
cookbooks/ganglia/attributes/default.rb
cookbooks/ganglia/templates/centos/etc/ganglia/gmond.conf
cookbooks/ganglia/templates/default/etc/ganglia/gmond.conf
cookbooks/openldap/CHANGELOG.md [new file with mode: 0644]
cookbooks/openldap/README.md [new file with mode: 0644]
cookbooks/openldap/attributes/default.rb [new file with mode: 0644]
cookbooks/openldap/metadata.rb [new file with mode: 0644]
cookbooks/openldap/recipes/client.rb [new file with mode: 0644]
cookbooks/openldap/recipes/default.rb [new file with mode: 0644]
cookbooks/openldap/templates/centos/etc/nslcd.conf [new file with mode: 0644]
cookbooks/openldap/templates/centos/etc/openldap/ldap.conf [new file with mode: 0644]
cookbooks/openldap/templates/default/etc/ldap/ldap.conf [new file with mode: 0644]
cookbooks/openldap/templates/default/etc/nslcd.conf [new file with mode: 0644]
roles/ganglia-gmond-ucast-localhost.rb
roles/grid-adm.rb
roles/grid-gm.rb
roles/grid-gpm.rb
roles/grid-ns.rb
roles/grid-zk-colo00.rb
roles/krb5-client.rb [new file with mode: 0644]
roles/ldap-client.rb [new file with mode: 0644]
roles/nameservice-client.rb
roles/pleiades-dn.rb
roles/pleiades-gm.rb
roles/pleiades-gw.rb
roles/pleiades-jt.rb
roles/pleiades-nm.rb
roles/pleiades-nn.rb
roles/pleiades-pxy.rb
roles/pleiades-wf.rb
roles/test-on-localhost.rb

index 2741bda..4b8fc8e 100644 (file)
@@ -30,14 +30,17 @@ default['ganglia']['data_sources'] = [
 default['ganglia']['gridname'] = 'MyGrid'
 # e.g. ['127.0.0.1', '169.229.50.165', 'my.gmetad.org']
 default['ganglia']['trusted_hosts'] = []
+
 # gmond.conf
+default['ganglia']['gmond_conf_type'] = 'static'  # or 'automatic'
+## this attribute has effect only if gmond_conf_type is 'static'
 default['ganglia']['cluster']['name'] = 'unspecified'
 default['ganglia']['cluster']['owner'] = 'unspecified'
 default['ganglia']['cluster']['latlong'] = 'unspecified'
 default['ganglia']['cluster']['url'] = 'unspecified'
 default['ganglia']['host']['location'] = 'unspecified'
-## 1. multi-cast (default)
-default['ganglia']['udp_send_channels'] = [
+## 1. static multi-cast (default)
+default['ganglia']['static']['udp_send_channels'] = [
   {
     'mcast_join' => '239.2.11.71',
     'host' => '',
@@ -45,7 +48,7 @@ default['ganglia']['udp_send_channels'] = [
     'ttl' => '1'
   }
 ]
-default['ganglia']['udp_recv_channels'] = [
+default['ganglia']['static']['udp_recv_channels'] = [
   {
     'mcast_join' => '239.2.11.71',
     'port' => '8649',
@@ -58,8 +61,8 @@ default['ganglia']['tcp_accept_channels'] = [
   }
 ]
 =begin
-## 2. e.g. uni-cast
-default['ganglia']['udp_send_channels'] = [
+## e.g. 2. static uni-cast
+default['ganglia']['static']['udp_send_channels'] = [
   {
     'mcast_join' => '',
     'host' => 'localhost',
@@ -67,7 +70,7 @@ default['ganglia']['udp_send_channels'] = [
     'ttl' => ''
   }
 ]
-default['ganglia']['udp_recv_channels'] = [
+default['ganglia']['static']['udp_recv_channels'] = [
   {
     'mcast_join' => '',
     'port' => '8649',
@@ -75,20 +78,24 @@ default['ganglia']['udp_recv_channels'] = [
   }
 ]
 =end
-## 3. automatic unicast setup for huge cluster (e.g. Hadoop DataNodes)
-# if huge_cluster_unicast.enabled, udp_send_channels and udp_recv_channels have no effect.
-default['ganglia']['huge_cluster_unicast'] = {
-  'enabled' => false,
+## e.g. 3. automatic multi/uni-cast setup for huge cluster (e.g. Hadoop DataNodes)
+default['ganglia']['automatic'] = {
+  'cluster_name_prefix' => 'DataNode', # DataNode#####
+  'cast_mode' => 'uni',                # or multi
   'domain' => 'grid.example.com',
   'node_prefix' => 'dn',
-  'digit_nums' => '5',      # dn#####
-  'padstr' => '0',          # dn00000
-  'first_node_num' => '0',  # 1st node:  dn00000.grid.example.com
-  'last_node_num'  => '999',# last node: dn00999.grid.example.com
-  'head_node_nums' => '2',  # heads of the 1st cluster: dn0000{0..1}.grid.example.com
-  'cluster_size' => '40',   # heads of the 2nd cluster: dn0004{0..1}.grid.example.com
-  'port' => '8649'
+  'digit_nums' => '5',       # dn#####
+  'padstr' => '0',           # dn00000
+  'first_node_num' => '0',   # 1st node:  dn00000.grid.example.com
+  'last_node_num'  => '999', # last node: dn00999.grid.example.com
+  'head_node_nums' => '2',   # heads of the 1st cluster: dn0000{0..1}.grid.example.com
+  'cluster_size' => '40',    # heads of the 2nd cluster: dn0004{0..1}.grid.example.com
+  'mcast_join' => '239.2.11.71', # multi-cast mode only
+  'port' => '8649',
+  'ttl' => '1',              # multi-cast mode only
+  'bind' => '239.2.11.71'    # multi-cast mode only
 }
+
 # ganglia-web
 ## default: white list
 default['ganglia']['web']['Order'] = 'Deny,Allow'
index 0b8430e..19f3c86 100644 (file)
@@ -15,12 +15,47 @@ globals {
   send_metadata_interval = 0 /*secs */
 }
 
+<%
+cluster_name = nil
+head_nodes = []
+
+case node['ganglia']['gmond_conf_type']
+when 'static'
+  cluster_name = node['ganglia']['cluster']['name']
+when 'automatic'
+  #this_node = node[:fqdn]
+  # for Test
+  this_node = "dn00040.grid.example.com"
+  conf = node['ganglia']['automatic']
+  this_domain = conf['domain']
+  node_prefix = conf['node_prefix']
+  head_node_nums = conf['head_node_nums'].to_i
+  digit_nums = conf['digit_nums'].to_i
+  padstr = conf['padstr']
+  first_node_num = conf['first_node_num'].to_i
+  last_node_num = conf['last_node_num'].to_i
+  cluster_size = conf['cluster_size'].to_i
+
+  (first_node_num..last_node_num).step(cluster_size) do |i|
+    first_head = node_prefix + i.to_s.rjust(digit_nums, padstr) + ".#{this_domain}"
+    next_first_head = node_prefix + (i + cluster_size).to_s.rjust(digit_nums, padstr) + ".#{this_domain}"
+    if first_head <= this_node \
+      && this_node < next_first_head then
+      cluster_name = conf['cluster_name_prefix'] + i.to_s.rjust(digit_nums, padstr)
+      (i...(i + head_node_nums)).each do |j|
+        head_nodes.push(node_prefix + j.to_s.rjust(digit_nums, padstr) + ".#{this_domain}")
+      end
+      break
+    end
+  end
+end
+-%>
 /*
  * The cluster attributes specified will be used as part of the <CLUSTER>
  * tag that will wrap all hosts collected by this instance.
  */
 cluster {
-  name = "<%= node['ganglia']['cluster']['name'] %>"
+  name = "<%= cluster_name %>"
   owner = "<%= node['ganglia']['cluster']['owner'] %>"
   latlong = "<%= node['ganglia']['cluster']['latlong'] %>"
   url = "<%= node['ganglia']['cluster']['url'] %>"
@@ -45,41 +80,9 @@ host {
 #  ttl = 1
 #}
 <%
-huge_cluster_unicast = node['ganglia']['huge_cluster_unicast']
-if huge_cluster_unicast['enabled'] then
-  this_node = node[:fqdn]
-  this_domain = huge_cluster_unicast['domain']
-  node_prefix = huge_cluster_unicast['node_prefix']
-  head_node_nums = huge_cluster_unicast['head_node_nums'].to_i
-  digit_nums = huge_cluster_unicast['digit_nums'].to_i
-  padstr = huge_cluster_unicast['padstr']
-  first_node_num = huge_cluster_unicast['first_node_num'].to_i
-  last_node_num = huge_cluster_unicast['last_node_num'].to_i
-  cluster_size = huge_cluster_unicast['cluster_size'].to_i
-
-  head_nodes = []
-  (first_node_num..last_node_num).step(cluster_size) do |i|
-    first_head = node_prefix + i.to_s.rjust(digit_nums, padstr) + ".#{this_domain}"
-    next_first_head = node_prefix + (i + cluster_size).to_s.rjust(digit_nums, padstr) + ".#{this_domain}"
-    if first_head <= this_node \
-      && this_node < next_first_head then
-      (i...(i + head_node_nums)).each do |j|
-        head_nodes.push(node_prefix + j.to_s.rjust(digit_nums, padstr) + ".#{this_domain}")
-      end
-      break
-    end
-  end
-
-  head_nodes.each do |fqdn|
--%>
-udp_send_channel {
-  host = <%= fqdn %>
-  port = <%= node['ganglia']['huge_cluster_unicast']['port'] %>
-}
-<%
-  end
-else
-  node['ganglia']['udp_send_channels'].each do |channel|
+case node['ganglia']['gmond_conf_type']
+when 'static'
+  node['ganglia']['static']['udp_send_channels'].each do |channel|
 -%>
 udp_send_channel {
 <%
@@ -88,7 +91,7 @@ udp_send_channel {
 -%>
   mcast_join = <%= mcast_join %>
 <%
-    end
+  end
 -%>
 <%
     host = channel['host']
@@ -110,19 +113,33 @@ udp_send_channel {
 }
 <%
   end
-end
+when 'automatic'
+  if node['ganglia']['automatic']['cast_mode'] == 'multi' then
 -%>
-
-/* You can specify as many udp_recv_channels as you like as well. */
+udp_send_channel {
+  mcast_join = <%= node['ganglia']['automatic']['mcast_join'] %>
+  port = <%= node['ganglia']['automatic']['port'] %>
+  ttl = <%= node['ganglia']['automatic']['ttl'] %>
+}
 <%
-if node['ganglia']['huge_cluster_unicast']['enabled'] then
+  elsif node['ganglia']['automatic']['cast_mode'] == 'uni' then
+    head_nodes.each do |fqdn|
 -%>
-udp_recv_channel {
-  port = <%= node['ganglia']['huge_cluster_unicast']['port'] %>
+udp_send_channel {
+  host = <%= fqdn %>
+  port = <%= node['ganglia']['automatic']['port'] %>
 }
 <%
-else
-  node['ganglia']['udp_recv_channels'].each do |channel|
+    end
+  end
+end
+-%>
+
+/* You can specify as many udp_recv_channels as you like as well. */
+<%
+case node['ganglia']['gmond_conf_type']
+when 'static'
+  node['ganglia']['static']['udp_recv_channels'].each do |channel|
 -%>
 udp_recv_channel {
 <%
@@ -145,13 +162,29 @@ udp_recv_channel {
 }
 <%
   end
+when 'automatic'
+  if node['ganglia']['automatic']['cast_mode'] == 'multi' then
+-%>
+udp_recv_channel {
+  mcast_join = <%= node['ganglia']['automatic']['mcast_join'] %>
+  port = <%= node['ganglia']['automatic']['port'] %>
+  bind = <%= node['ganglia']['automatic']['bind'] %>
+}
+<%
+  elsif node['ganglia']['automatic']['cast_mode'] == 'uni' then
+-%>
+udp_recv_channel {
+  port = <%= node['ganglia']['automatic']['port'] %>
+}
+<%
+  end
 end
 -%>
 
 /* You can specify as many tcp_accept_channels as you like to share
    an xml description of the state of the cluster */
 <%
-node['ganglia']['udp_recv_channels'].each do |channel|
+node['ganglia']['tcp_accept_channels'].each do |channel|
 -%>
 tcp_accept_channel {
   port = <%= channel['port'] %>
index e3b9d5a..212035a 100644 (file)
@@ -14,11 +14,46 @@ globals {
   send_metadata_interval = 0     
 } 
 
+<%
+cluster_name = nil
+head_nodes = []
+
+case node['ganglia']['gmond_conf_type']
+when 'static'
+  cluster_name = node['ganglia']['cluster']['name']
+when 'automatic'
+  #this_node = node[:fqdn]
+  # for Test
+  this_node = "dn00040.grid.example.com"
+  conf = node['ganglia']['automatic']
+  this_domain = conf['domain']
+  node_prefix = conf['node_prefix']
+  head_node_nums = conf['head_node_nums'].to_i
+  digit_nums = conf['digit_nums'].to_i
+  padstr = conf['padstr']
+  first_node_num = conf['first_node_num'].to_i
+  last_node_num = conf['last_node_num'].to_i
+  cluster_size = conf['cluster_size'].to_i
+
+  (first_node_num..last_node_num).step(cluster_size) do |i|
+    first_head = node_prefix + i.to_s.rjust(digit_nums, padstr) + ".#{this_domain}"
+    next_first_head = node_prefix + (i + cluster_size).to_s.rjust(digit_nums, padstr) + ".#{this_domain}"
+    if first_head <= this_node \
+      && this_node < next_first_head then
+      cluster_name = conf['cluster_name_prefix'] + i.to_s.rjust(digit_nums, padstr)
+      (i...(i + head_node_nums)).each do |j|
+        head_nodes.push(node_prefix + j.to_s.rjust(digit_nums, padstr) + ".#{this_domain}")
+      end
+      break
+    end
+  end
+end
+-%>
 /* If a cluster attribute is specified, then all gmond hosts are wrapped inside 
  * of a <CLUSTER> tag.  If you do not specify a cluster tag, then all <HOSTS> will 
  * NOT be wrapped inside of a <CLUSTER> tag. */ 
 cluster { 
-  name = "<%= node['ganglia']['cluster']['name'] %>"
+  name = "<%= cluster_name %>"
   owner = "<%= node['ganglia']['cluster']['owner'] %>"
   latlong = "<%= node['ganglia']['cluster']['latlong'] %>"
   url = "<%= node['ganglia']['cluster']['url'] %>"
@@ -32,41 +67,9 @@ host {
 /* Feel free to specify as many udp_send_channels as you like.  Gmond 
    used to only support having a single channel */
 <%
-huge_cluster_unicast = node['ganglia']['huge_cluster_unicast']
-if huge_cluster_unicast['enabled'] then
-  this_node = node[:fqdn]
-  this_domain = huge_cluster_unicast['domain']
-  node_prefix = huge_cluster_unicast['node_prefix']
-  head_node_nums = huge_cluster_unicast['head_node_nums'].to_i
-  digit_nums = huge_cluster_unicast['digit_nums'].to_i
-  padstr = huge_cluster_unicast['padstr']
-  first_node_num = huge_cluster_unicast['first_node_num'].to_i
-  last_node_num = huge_cluster_unicast['last_node_num'].to_i
-  cluster_size = huge_cluster_unicast['cluster_size'].to_i
-
-  head_nodes = []
-  (first_node_num..last_node_num).step(cluster_size) do |i|
-    first_head = node_prefix + i.to_s.rjust(digit_nums, padstr) + ".#{this_domain}"
-    next_first_head = node_prefix + (i + cluster_size).to_s.rjust(digit_nums, padstr) + ".#{this_domain}"
-    if first_head <= this_node \
-      && this_node < next_first_head then
-      (i...(i + head_node_nums)).each do |j|
-        head_nodes.push(node_prefix + j.to_s.rjust(digit_nums, padstr) + ".#{this_domain}")
-      end
-      break
-    end
-  end
-
-  head_nodes.each do |fqdn|
--%>
-udp_send_channel {
-  host = <%= fqdn %>
-  port = <%= node['ganglia']['huge_cluster_unicast']['port'] %>
-}
-<%
-  end
-else
-  node['ganglia']['udp_send_channels'].each do |channel|
+case node['ganglia']['gmond_conf_type'] 
+when 'static' 
+  node['ganglia']['static']['udp_send_channels'].each do |channel|
 -%> 
 udp_send_channel {
 <%
@@ -97,19 +100,33 @@ udp_send_channel {
 }
 <%
   end
+when 'automatic'
+  if node['ganglia']['automatic']['cast_mode'] == 'multi' then
+-%>
+udp_send_channel {
+  mcast_join = <%= node['ganglia']['automatic']['mcast_join'] %>
+  port = <%= node['ganglia']['automatic']['port'] %>
+  ttl = <%= node['ganglia']['automatic']['ttl'] %>
+}
+<%
+  elsif node['ganglia']['automatic']['cast_mode'] == 'uni' then
+    head_nodes.each do |fqdn|
+-%>
+udp_send_channel {
+  host = <%= fqdn %>
+  port = <%= node['ganglia']['automatic']['port'] %>
+}
+<%
+    end
+  end
 end
 -%>
 
 /* You can specify as many udp_recv_channels as you like as well. */ 
 <%
-if node['ganglia']['huge_cluster_unicast']['enabled'] then
--%>
-udp_recv_channel {
-  port = <%= node['ganglia']['huge_cluster_unicast']['port'] %>
-} 
-<%
-else
-  node['ganglia']['udp_recv_channels'].each do |channel|
+case node['ganglia']['gmond_conf_type']
+when 'static'
+  node['ganglia']['static']['udp_recv_channels'].each do |channel|
 -%> 
 udp_recv_channel { 
 <% 
@@ -132,13 +149,29 @@ udp_recv_channel {
 }
 <%
   end
+when 'automatic'
+  if node['ganglia']['automatic']['cast_mode'] == 'multi' then
+-%>
+udp_recv_channel {
+  mcast_join = <%= node['ganglia']['automatic']['mcast_join'] %>
+  port = <%= node['ganglia']['automatic']['port'] %>
+  bind = <%= node['ganglia']['automatic']['bind'] %>
+}
+<%
+  elsif node['ganglia']['automatic']['cast_mode'] == 'uni' then
+-%>
+udp_recv_channel {
+  port = <%= node['ganglia']['automatic']['port'] %>
+}
+<%
+  end
 end 
 -%>
 
 /* You can specify as many tcp_accept_channels as you like to share 
    an xml description of the state of the cluster */ 
 <%
-node['ganglia']['udp_recv_channels'].each do |channel|
+node['ganglia']['tcp_accept_channels'].each do |channel|
 -%> 
 tcp_accept_channel { 
   port = <%= channel['port'] %>
diff --git a/cookbooks/openldap/CHANGELOG.md b/cookbooks/openldap/CHANGELOG.md
new file mode 100644 (file)
index 0000000..6231e1c
--- /dev/null
@@ -0,0 +1,12 @@
+# CHANGELOG for openldap
+
+This file is used to list changes made in each version of openldap.
+
+## 0.1.0:
+
+* Initial release of openldap
+
+- - -
+Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
+
+The [Github Flavored Markdown page](http://github.github.com/github-flavored-markdown/) describes the differences between markdown on github and standard markdown.
diff --git a/cookbooks/openldap/README.md b/cookbooks/openldap/README.md
new file mode 100644 (file)
index 0000000..6ef7c33
--- /dev/null
@@ -0,0 +1,68 @@
+openldap Cookbook
+=================
+TODO: Enter the cookbook description here.
+
+e.g.
+This cookbook makes your favorite breakfast sandwhich.
+
+Requirements
+------------
+TODO: List your cookbook requirements. Be sure to include any requirements this cookbook has on platforms, libraries, other cookbooks, packages, operating systems, etc.
+
+e.g.
+#### packages
+- `toaster` - openldap needs toaster to brown your bagel.
+
+Attributes
+----------
+TODO: List you cookbook attributes here.
+
+e.g.
+#### openldap::default
+<table>
+  <tr>
+    <th>Key</th>
+    <th>Type</th>
+    <th>Description</th>
+    <th>Default</th>
+  </tr>
+  <tr>
+    <td><tt>['openldap']['bacon']</tt></td>
+    <td>Boolean</td>
+    <td>whether to include bacon</td>
+    <td><tt>true</tt></td>
+  </tr>
+</table>
+
+Usage
+-----
+#### openldap::default
+TODO: Write usage instructions for each cookbook.
+
+e.g.
+Just include `openldap` in your node's `run_list`:
+
+```json
+{
+  "name":"my_node",
+  "run_list": [
+    "recipe[openldap]"
+  ]
+}
+```
+
+Contributing
+------------
+TODO: (optional) If this is a public cookbook, detail the process for contributing. If this is a private cookbook, remove this section.
+
+e.g.
+1. Fork the repository on Github
+2. Create a named feature branch (like `add_component_x`)
+3. Write you change
+4. Write tests for your change (if applicable)
+5. Run the tests, ensuring they all pass
+6. Submit a Pull Request using Github
+
+License and Authors
+-------------------
+Authors: TODO: List authors
diff --git a/cookbooks/openldap/attributes/default.rb b/cookbooks/openldap/attributes/default.rb
new file mode 100644 (file)
index 0000000..c6ade1e
--- /dev/null
@@ -0,0 +1,35 @@
+#
+# Cookbook Name:: openldap
+# Attributes:: default
+#
+# Copyright 2013, 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.
+#
+
+default['openldap']['client']['BASE'] = nil  # dc=example,dc=com
+default['openldap']['client']['URI'] = nil   # ldap://ldap.example.com ldap://ldap-master.example.com:666
+default['openldap']['client']['SIZELIMIT'] = nil  # 12
+default['openldap']['client']['TIMELIMIT'] = nil  # 15
+default['openldap']['client']['DEREF'] = nil      # never
+default['openldap']['client']['TLS_CACERT'] = nil    # /etc/ssl/certs/cacert.pem
+default['openldap']['client']['TLS_REQCERT'] = nil   # never|allow|try|demand*
+default['openldap']['client']['TLS_CHECKPEER'] = nil # yes*|no
+default['openldap']['client']['SASL_MECH'] = nil     # GSSAPI
+default['openldap']['client']['TLS_CACERTDIR'] = node.value_for_platform_family(
+  'debian' => nil,
+  'rhel'   => '/etc/openldap/certs'
+)
+default['openldap']['with_nss_ldapd'] = false
+#default['openldap'][''] = 
+
diff --git a/cookbooks/openldap/metadata.rb b/cookbooks/openldap/metadata.rb
new file mode 100644 (file)
index 0000000..e223242
--- /dev/null
@@ -0,0 +1,7 @@
+name             'openldap'
+maintainer       'whitestar'
+maintainer_email ''
+license          'Apache 2.0'
+description      'Installs/Configures openldap'
+long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
+version          '0.1.0'
diff --git a/cookbooks/openldap/recipes/client.rb b/cookbooks/openldap/recipes/client.rb
new file mode 100644 (file)
index 0000000..f1f91a2
--- /dev/null
@@ -0,0 +1,98 @@
+#
+# Cookbook Name:: openldap
+# Recipe:: client
+#
+# Copyright 2013, 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.
+#
+
+case node[:platform_family]
+  when 'debian'
+    package 'ldap-utils' do
+      action :install
+    end
+
+    template '/etc/ldap/ldap.conf' do
+      source 'etc/ldap/ldap.conf'
+      owner 'root'
+      group 'root'
+      mode '0644'
+    end
+
+    if node['openldap']['with_nss_ldapd'] then
+      %w{
+        libnss-ldapd
+        nscd
+      }.each {|pkg|
+        package pkg do
+          action :install
+        end
+      }
+  
+      service 'nslcd' do
+        action [:enable]
+        supports :status => true, :restart => true, :reload => false
+      end
+  
+      service 'nscd' do
+        action [:enable]
+        supports :status => true, :restart => true, :reload => false
+      end
+  
+      template '/etc/nslcd.conf' do
+        source 'etc/nslcd.conf'
+        owner 'root'
+        group 'nslcd'
+        mode '0640'
+        notifies :restart, 'service[nslcd]'
+        notifies :restart, 'service[nscd]'
+      end
+    end
+  when 'rhel'
+    package 'openldap-clients' do
+      action :install
+    end
+
+    template '/etc/openldap/ldap.conf' do
+      source 'etc/openldap/ldap.conf'
+      owner 'root'
+      group 'root'
+      mode '0644'
+    end
+
+    if node['openldap']['with_nss_ldapd'] then
+      package 'nss-pam-ldapd' do
+        action :install
+      end
+  
+      service 'nslcd' do
+        action [:enable]
+        supports :status => true, :restart => true, :reload => true
+      end
+  
+      service 'nscd' do
+        action [:enable]
+        supports :status => true, :restart => true, :reload => true
+      end
+  
+      template '/etc/nslcd.conf' do
+        source 'etc/nslcd.conf'
+        owner 'root'
+        group 'root'
+        mode '0600'
+        notifies :restart, 'service[nslcd]'
+        notifies :restart, 'service[nscd]'
+      end
+    end
+end
diff --git a/cookbooks/openldap/recipes/default.rb b/cookbooks/openldap/recipes/default.rb
new file mode 100644 (file)
index 0000000..82b410c
--- /dev/null
@@ -0,0 +1,18 @@
+#
+# Cookbook Name:: openldap
+# Recipe:: default
+#
+# Copyright 2013, 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.
+#
diff --git a/cookbooks/openldap/templates/centos/etc/nslcd.conf b/cookbooks/openldap/templates/centos/etc/nslcd.conf
new file mode 100644 (file)
index 0000000..8cc7075
--- /dev/null
@@ -0,0 +1,132 @@
+# This is the configuration file for the LDAP nameservice
+# switch library's nslcd daemon. It configures the mapping
+# between NSS names (see /etc/nsswitch.conf) and LDAP
+# information in the directory.
+# See the manual page nslcd.conf(5) for more information.
+
+# The uri pointing to the LDAP server to use for name lookups.
+# Multiple entries may be specified. The address that is used
+# here should be resolvable without using LDAP (obviously).
+#uri ldap://127.0.0.1/
+#uri ldaps://127.0.0.1/
+#uri ldapi://%2fvar%2frun%2fldapi_sock/
+# Note: %2f encodes the '/' used as directory separator
+# uri ldap://127.0.0.1/
+
+# The LDAP version to use (defaults to 3
+# if supported by client library)
+#ldap_version 3
+
+# The distinguished name of the search base.
+# base dc=example,dc=com
+
+# The distinguished name to bind to the server with.
+# Optional: default is to bind anonymously.
+#binddn cn=proxyuser,dc=example,dc=com
+
+# The credentials to bind with.
+# Optional: default is no credentials.
+# Note that if you set a bindpw you should check the permissions of this file.
+#bindpw secret
+
+# The distinguished name to perform password modifications by root by.
+#rootpwmoddn cn=admin,dc=example,dc=com
+
+# The default search scope.
+#scope sub
+#scope one
+#scope base
+
+# Customize certain database lookups.
+#base   group  ou=Groups,dc=example,dc=com
+#base   passwd ou=People,dc=example,dc=com
+#base   shadow ou=People,dc=example,dc=com
+#scope  group  onelevel
+#scope  hosts  sub
+
+# Bind/connect timelimit.
+#bind_timelimit 30
+
+# Search timelimit.
+#timelimit 30
+
+# Idle timelimit. nslcd will close connections if the
+# server has not been contacted for the number of seconds.
+#idle_timelimit 3600
+
+# Use StartTLS without verifying the server certificate.
+#ssl start_tls
+#tls_reqcert never
+
+# CA certificates for server certificate verification
+#tls_cacertdir /etc/ssl/certs
+#tls_cacertfile /etc/ssl/ca.cert
+
+# Seed the PRNG if /dev/urandom is not provided
+#tls_randfile /var/run/egd-pool
+
+# SSL cipher suite
+# See man ciphers for syntax
+#tls_ciphers TLSv1
+
+# Client certificate and key
+# Use these, if your server requires client authentication.
+#tls_cert
+#tls_key
+
+# NDS mappings
+#map group uniqueMember member
+
+# Mappings for Services for UNIX 3.5
+#filter passwd (objectClass=User)
+#map    passwd uid              msSFU30Name
+#map    passwd userPassword     msSFU30Password
+#map    passwd homeDirectory    msSFU30HomeDirectory
+#map    passwd homeDirectory    msSFUHomeDirectory
+#filter shadow (objectClass=User)
+#map    shadow uid              msSFU30Name
+#map    shadow userPassword     msSFU30Password
+#filter group  (objectClass=Group)
+#map    group  uniqueMember     msSFU30PosixMember
+
+# Mappings for Services for UNIX 2.0
+#filter passwd (objectClass=User)
+#map    passwd uid              msSFUName
+#map    passwd userPassword     msSFUPassword
+#map    passwd homeDirectory    msSFUHomeDirectory
+#map    passwd gecos            msSFUName
+#filter shadow (objectClass=User)
+#map    shadow uid              msSFUName
+#map    shadow userPassword     msSFUPassword
+#map    shadow shadowLastChange pwdLastSet
+#filter group  (objectClass=Group)
+#map    group  uniqueMember     posixMember
+
+# Mappings for Active Directory
+#pagesize 1000
+#referrals off
+#filter passwd (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))
+#map    passwd uid              sAMAccountName
+#map    passwd homeDirectory    unixHomeDirectory
+#map    passwd gecos            displayName
+#filter shadow (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*))
+#map    shadow uid              sAMAccountName
+#map    shadow shadowLastChange pwdLastSet
+#filter group  (objectClass=group)
+#map    group  uniqueMember     member
+
+# Mappings for AIX SecureWay
+#filter passwd (objectClass=aixAccount)
+#map    passwd uid              userName
+#map    passwd userPassword     passwordChar
+#map    passwd uidNumber        uid
+#map    passwd gidNumber        gid
+#filter group  (objectClass=aixAccessGroup)
+#map    group  cn               groupName
+#map    group  uniqueMember     member
+#map    group  gidNumber        gid
+uid nslcd
+gid ldap
+# This comment prevents repeated auto-migration of settings.
+uri ldap://127.0.0.1/
+base dc=example,dc=com
diff --git a/cookbooks/openldap/templates/centos/etc/openldap/ldap.conf b/cookbooks/openldap/templates/centos/etc/openldap/ldap.conf
new file mode 100644 (file)
index 0000000..0b570c3
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# LDAP Defaults
+#
+
+# See ldap.conf(5) for details
+# This file should be world readable but not world writable.
+
+#BASE  dc=example,dc=com
+#URI   ldap://ldap.example.com ldap://ldap-master.example.com:666
+
+#SIZELIMIT     12
+#TIMELIMIT     15
+#DEREF         never
+
+<%
+node['openldap']['client'].each do |key, value|
+  if !value.nil? && !value.empty? then
+-%>
+<%= key %>      <%= value %>
+<%
+  end
+end
+-%>
diff --git a/cookbooks/openldap/templates/default/etc/ldap/ldap.conf b/cookbooks/openldap/templates/default/etc/ldap/ldap.conf
new file mode 100644 (file)
index 0000000..186434a
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# LDAP Defaults
+#
+
+# See ldap.conf(5) for details
+# This file should be world readable but not world writable.
+
+#BASE  dc=example,dc=com
+#URI   ldap://ldap.example.com ldap://ldap-master.example.com:666
+
+#SIZELIMIT     12
+#TIMELIMIT     15
+#DEREF         never
+
+<%
+node['openldap']['client'].each do |key, value|
+  if !value.nil? && !value.empty? then
+-%>
+<%= key %>     <%= value %>
+<%
+  end
+end
+-%>
diff --git a/cookbooks/openldap/templates/default/etc/nslcd.conf b/cookbooks/openldap/templates/default/etc/nslcd.conf
new file mode 100644 (file)
index 0000000..f111600
--- /dev/null
@@ -0,0 +1,31 @@
+# /etc/nslcd.conf
+# nslcd configuration file. See nslcd.conf(5)
+# for details.
+
+# The user and group nslcd should run as.
+uid nslcd
+gid nslcd
+
+# The location at which the LDAP server(s) should be reachable.
+uri ldap://ldap.grid.example.com
+
+# The search base that will be used for all queries.
+base dc=grid,dc=example,dc=com
+
+# The LDAP protocol version to use.
+#ldap_version 3
+
+# The DN to bind with for normal lookups.
+#binddn cn=annonymous,dc=example,dc=net
+#bindpw secret
+
+# The DN used for password modifications by root.
+#rootpwmoddn cn=admin,dc=example,dc=com
+
+# SSL options
+ssl start_tls
+tls_cacertfile /etc/ssl/certs/cacert.pem
+tls_reqcert demand
+
+# The search scope.
+#scope sub
index 1448276..cd6c11a 100644 (file)
@@ -12,24 +12,27 @@ default_attributes(
 
 override_attributes(
   'ganglia' => {
+    'gmond_conf_type' => 'static',
     'cluster' => {
       'name' => 'local',
       'owner' => 'grid.example.com'
     },
-    'udp_send_channels' => [
-      {
-        'mcast_join' => '',
-        'host' => 'localhost',
-        'port' => '8649',
-        'ttl' => ''
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => '',
-        'port' => '8649',
-        'bind' => ''
-      }
-    ]
+    'static' => {
+      'udp_send_channels' => [
+        {
+          'mcast_join' => '',
+          'host' => 'localhost',
+          'port' => '8649',
+          'ttl' => ''
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => '',
+          'port' => '8649',
+          'bind' => ''
+        }
+      ]
+    }
   }
 )
index 87a0a20..be94414 100644 (file)
@@ -23,20 +23,23 @@ override_attributes(
       'name' => 'AdministrativeStation',
       '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
-      }
-    ]
+    ## static multi-cast
+    'static' => {
+      '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 b70c4e3..e19ca42 100644 (file)
@@ -40,21 +40,24 @@ override_attributes(
       'name' => 'Ganglia',
       '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
-      }
-    ],
+    ## static multi-cast
+    'static' => {
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
+    },
     # gmetad
     'gridname' => 'Grid-Base',
     'trusted_hosts' => ['127.0.0.1'] + "nm9{0..1}.#{this_domain}".expand,
index ef05123..80fe325 100644 (file)
@@ -21,20 +21,23 @@ override_attributes(
       '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
-      }
-    ]
+    # static multi-cast
+    'static' => {
+      '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 2163c3e..4b1a6f0 100644 (file)
@@ -23,21 +23,24 @@ override_attributes(
       'name' => 'NameService',
       '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
-      }
-    ]
+    ## static multi-cast
+    'static' => {
+      '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 c319114..9a3dbc3 100644 (file)
@@ -22,21 +22,24 @@ override_attributes(
       'name' => 'ZooKeeper',
       '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
-      }
-    ]
+    ## static multi-cast
+    'static' => {
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
+    }
   }
 )
 
diff --git a/roles/krb5-client.rb b/roles/krb5-client.rb
new file mode 100644 (file)
index 0000000..624aa35
--- /dev/null
@@ -0,0 +1,13 @@
+name 'krb5-client'
+description 'Kerberos client role'
+
+run_list(
+  'recipe[krb5::client]',
+)
+
+#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+
+default_attributes(
+)
+
+#override_attributes "apache2" => { "max_children" => "50" }
diff --git a/roles/ldap-client.rb b/roles/ldap-client.rb
new file mode 100644 (file)
index 0000000..cc93e40
--- /dev/null
@@ -0,0 +1,13 @@
+name 'ldap-client'
+description 'LDAP client'
+
+run_list(
+  'recipe[openldap::client]'
+)
+
+#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+
+default_attributes(
+)
+
+#override_attributes "apache2" => { "max_children" => "50" }
index 6003d79..cc84026 100644 (file)
@@ -3,7 +3,8 @@ description 'The NameService (Kerberos and LDAP) client role'
 
 run_list(
   'recipe[node_commons]',
-  'recipe[krb5::client]'
+  'role[krb5-client]',
+  'role[ldap-client]'
 )
 
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
index 1060e42..9b2a633 100644 (file)
@@ -7,14 +7,14 @@ run_list(
 #  'role[pleiades-node]'
 )
 
+mcast_addr = '239.2.11.10'
+port = '8649'
+
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
 default_attributes(
 )
 
-mcast_addr = '239.2.11.10'
-port = '8649'
-
 override_attributes(
   'ganglia' => {
     # gmond
@@ -22,35 +22,42 @@ override_attributes(
       'name' => 'DataNode00000',
       'owner' => 'grid.example.com'
     },
-    ## multi-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'host' => '',
-        'port' => port,
-        'ttl' => '1'
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'port' => port,
-        'bind' => mcast_addr
-      }
-    ]
+    ## static multi-cast
+    'static' => {
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
+    }
 =begin
-    ## uni-cast
-    'huge_cluster_unicast' = {
-      'enabled' => false,
+    ## automatic multi/uni-cast
+    'gmond_conf_type' => 'automatic',
+    'automatic' = {
+      'cluster_name_prefix' => 'DataNode', # DataNode#####
+      'cast_mode' => 'uni',                # or multi
       'domain' => 'grid.example.com',
       'node_prefix' => 'dn',
-      'digit_nums' => '5',      # dn#####
-      'padstr' => '0',          # dn00000
-      'first_node_num' => '0',  # 1st node:  dn00000.grid.example.com
-      'last_node_num'  => '999',# last node: dn00999.grid.example.com
-      'head_node_nums' => '2',  # heads of the 1st cluster: dn0000{0..1}.grid.example.com
-      'cluster_size' => '40',   # heads of the 2nd cluster: dn0004{0..1}.grid.example.com
-      'port' => '8649'
+      'digit_nums' => '5',       # dn#####
+      'padstr' => '0',           # dn00000
+      'first_node_num' => '0',   # 1st node:  dn00000.grid.example.com
+      'last_node_num'  => '999', # last node: dn00999.grid.example.com
+      'head_node_nums' => '2',   # heads of the 1st cluster: dn0000{0..1}.grid.example.com
+      'cluster_size' => '40',    # heads of the 2nd cluster: dn0004{0..1}.grid.example.com
+      'mcast_join' => mcast_addr, # multi-cast mode only
+      'port' => port,
+      'ttl' => '1',              # multi-cast mode only
+      'bind' => '239.2.11.71'    # multi-cast mode only
     }
 =end
   }
index 6f08bc3..2ccb6ba 100644 (file)
@@ -57,46 +57,48 @@ override_attributes(
       'name' => 'Ganglia',
       'owner' => this_domain
     },
-    ## multicast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'host' => '',
-        'port' => port,
-        'ttl' => '1'
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'port' => port,
-        'bind' => mcast_addr
-      }
-    ],
+    ## static multi-cast
+    'static' => {
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ],
 =begin
-    ## unicast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => '',
-        'host' => "gm00.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      },
-      {
-        'mcast_join' => '',
-        'host' => "gm01.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => '',
-        'port' => port,
-        'bind' => ''
-      }
-    ],
+      ## static uni-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => '',
+          'host' => "gm00.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        },
+        {
+          'mcast_join' => '',
+          'host' => "gm01.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => '',
+          'port' => port,
+          'bind' => ''
+        }
+      ],
 =end
+    },
     # gmetad
     'gridname' => 'Pleiades',
     'trusted_hosts' => ['127.0.0.1'] + "nm0{0..1}.#{this_domain}".expand,
index 3e15a1a..4c8a777 100644 (file)
@@ -8,14 +8,14 @@ run_list(
   'role[pig]'
 )
 
+mcast_addr = '239.2.11.5'
+port = '8649'
+
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
 default_attributes(
 )
 
-mcast_addr = '239.2.11.5'
-port = '8649'
-
 override_attributes(
   'ganglia' => {
     # gmond
@@ -23,46 +23,48 @@ override_attributes(
       'name' => 'Gateway',
       'owner' => 'grid.example.com'
     },
-    # multi-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'host' => '',
-        'port' => port,
-        'ttl' => '1'
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'port' => port,
-        'bind' => mcast_addr
-      }
-    ]
+    ## static multi-cast
+    'static' => {
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
 =begin
-    ## uni-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => '',
-        'host' => "gw00.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      },
-      {
-        'mcast_join' => '',
-        'host' => "gw01.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => '',
-        'port' => port,
-        'bind' => ''
-      }
-    ]
+      ## static uni-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => '',
+          'host' => "gw00.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        },
+        {
+          'mcast_join' => '',
+          'host' => "gw01.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => '',
+          'port' => port,
+          'bind' => ''
+        }
+      ]
 =end
+    }
   },
   'pig' => {
     'version' => '0.11.1'
index 937cfd9..b22507a 100644 (file)
@@ -7,14 +7,14 @@ run_list(
 #  'role[pleiades-node]'
 )
 
+mcast_addr = '239.2.11.9'
+port = '8649'
+
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
 default_attributes(
 )
 
-mcast_addr = '239.2.11.9'
-port = '8649'
-
 override_attributes(
   'ganglia' => {
     # gmond
@@ -22,45 +22,47 @@ override_attributes(
       'name' => 'JobTracker',
       'owner' => 'grid.example.com'
     },
-    ## multi-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'host' => '',
-        'port' => port,
-        'ttl' => '1'
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'port' => port,
-        'bind' => mcast_addr
-      }
-    ]
+    'static' => {
+      ## static multi-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
 =begin
-    ## uni-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => '',
-        'host' => "jt00.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      },
-      {
-        'mcast_join' => '',
-        'host' => "jt01.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => '',
-        'port' => port,
-        'bind' => ''
-      }
-    ]
+      ## static uni-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => '',
+          'host' => "jt00.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        },
+        {
+          'mcast_join' => '',
+          'host' => "jt01.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => '',
+          'port' => port,
+          'bind' => ''
+        }
+      ]
 =end
+    }
   }
 )
index c9a7a27..9e39040 100644 (file)
@@ -6,14 +6,14 @@ run_list(
   'role[ganglia-gmond]'
 )
 
+mcast_addr = '239.2.11.2'
+port = '8649'
+
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
 default_attributes(
 )
 
-mcast_addr = '239.2.11.2'
-port = '8649'
-
 override_attributes(
   'ganglia' => {
     # gmond
@@ -21,44 +21,47 @@ override_attributes(
       'name' => 'Nagios',
       'owner' => 'grid.example.com'
     },
-    'udp_send_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'host' => '',
-        'port' => port,
-        'ttl' => '1'
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'port' => port,
-        'bind' => mcast_addr
-      }
-    ]
+    'static' => {
+      ## static multi-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
 =begin
-    ## unicast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => '',
-        'host' => "nm00.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      },
-      {
-        'mcast_join' => '',
-        'host' => "nm01.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => '',
-        'port' => port,
-        'bind' => ''
-      }
-    ]
+      ## static uni-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => '',
+          'host' => "nm00.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        },
+        {
+          'mcast_join' => '',
+          'host' => "nm01.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => '',
+          'port' => port,
+          'bind' => ''
+        }
+      ]
 =end
+    }
   }
 )
index 3cf7143..081fb9f 100644 (file)
@@ -22,45 +22,47 @@ override_attributes(
       'name' => 'NameNode',
       'owner' => 'grid.example.com'
     },
-    ## multi-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'host' => '',
-        'port' => port,
-        'ttl' => '1'
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'port' => port,
-        'bind' => mcast_addr
-      }
-    ]
+    'static' => {
+      ## static multi-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
 =begin
-    ## uni-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => '',
-        'host' => "nn00.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      },
-      {
-        'mcast_join' => '',
-        'host' => "nn01.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => '',
-        'port' => port,
-        'bind' => ''
-      }
-    ]
+      ## static uni-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => '',
+          'host' => "nn00.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        },
+        {
+          'mcast_join' => '',
+          'host' => "nn01.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => '',
+          'port' => port,
+          'bind' => ''
+        }
+      ]
 =end
+    }
   }
 )
index a937ffe..d39a360 100644 (file)
@@ -6,14 +6,14 @@ run_list(
   'role[ganglia-gmond]'
 )
 
+mcast_addr = '239.2.11.7'
+port = '8649'
+
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
 default_attributes(
 )
 
-mcast_addr = '239.2.11.7'
-port = '8649'
-
 override_attributes(
   'ganglia' => {
     # gmond
@@ -21,45 +21,47 @@ override_attributes(
       'name' => 'Proxy',
       'owner' => 'grid.example.com'
     },
-    ## multi-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'host' => '',
-        'port' => port,
-        'ttl' => '1'
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'port' => port,
-        'bind' => mcast_addr
-      }
-    ]
+    'static' => {
+      ## static multi-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
 =begin
-    ## uni-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => '',
-        'host' => "pxy00.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      },
-      {
-        'mcast_join' => '',
-        'host' => "pxy01.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => '',
-        'port' => port,
-        'bind' => ''
-      }
-    ]
+      ## static uni-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => '',
+          'host' => "pxy00.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        },
+        {
+          'mcast_join' => '',
+          'host' => "pxy01.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => '',
+          'port' => port,
+          'bind' => ''
+        }
+      ]
 =end
+    }
   }
 )
index fae1811..a4ed12f 100644 (file)
@@ -6,14 +6,14 @@ run_list(
   'role[ganglia-gmond]'
 )
 
+mcast_addr = '239.2.11.6'
+port = '8649'
+
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
 default_attributes(
 )
 
-mcast_addr = '239.2.11.6'
-port = '8649'
-
 override_attributes(
   'ganglia' => {
     # gmond
@@ -21,45 +21,47 @@ override_attributes(
       'name' => 'Workflow',
       'owner' => 'grid.example.com'
     },
-    ## multi-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'host' => '',
-        'port' => port,
-        'ttl' => '1'
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => mcast_addr,
-        'port' => port,
-        'bind' => mcast_addr
-      }
-    ]
+    'static' => {
+      ## static multi-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'host' => '',
+          'port' => port,
+          'ttl' => '1'
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => mcast_addr,
+          'port' => port,
+          'bind' => mcast_addr
+        }
+      ]
 =begin
-    ## uni-cast
-    'udp_send_channels' => [
-      {
-        'mcast_join' => '',
-        'host' => "wf00.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      },
-      {
-        'mcast_join' => '',
-        'host' => "wf01.#{this.domain}",
-        'port' => port,
-        'ttl' => ''
-      }
-    ],
-    'udp_recv_channels' => [
-      {
-        'mcast_join' => '',
-        'port' => port,
-        'bind' => ''
-      }
-    ]
+      ## static uni-cast
+      'udp_send_channels' => [
+        {
+          'mcast_join' => '',
+          'host' => "wf00.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        },
+        {
+          'mcast_join' => '',
+          'host' => "wf01.#{this.domain}",
+          'port' => port,
+          'ttl' => ''
+        }
+      ],
+      'udp_recv_channels' => [
+        {
+          'mcast_join' => '',
+          'port' => port,
+          'bind' => ''
+        }
+      ]
 =end
+    }
   }
 )
index f6e1176..39d84f8 100644 (file)
@@ -4,6 +4,7 @@ description 'Testing on local machine'
 run_list(
   'role[mocker]',
   'role[chef_utils]',
+  'role[nameservice-client]',
   'role[ganglia-gmond-ucast-localhost]',
   'role[ganglia-gmetad-localhost]',
   'role[ganglia-web]',
@@ -17,6 +18,17 @@ run_list(
 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
 
 default_attributes(
+  'openldap' => {
+    'client' => {
+      'BASE' => 'dc=localdomain',
+      'URI' => 'ldap://localhost/',
+      'TLS_CACERT' => '/etc/ssl/certs/cacert.pem',
+      'TLS_REQCERT' => 'allow',
+      'TLS_CHECKPEER' => 'yes',
+      'SASL_MECH' => 'GSSAPI'
+    },
+    'with_nss_ldapd' => false
+  },
   'krb5' => {
     'libdefaults' => {
       'default_realm' => 'LOCALDOMAIN',
@@ -120,10 +132,14 @@ default_attributes(
 override_attributes(
   'ganglia' => {
     'trusted_hosts' => ['127.0.0.1'],
+=begin
     # for TEST
-    #'huge_cluster_unicast' => {
-    #  'enabled' => true
-    #}
+    'gmond_conf_type' => 'automatic',
+    'automatic' => {
+      #'cast_mode' => 'multi'
+      'cast_mode' => 'uni'
+    }
+=end
   }
 )