:nodes => 'dn0000{0..1}'.expand,
:mcast_addr => '239.2.11.20'
}
+ },
+ :praesepe => {
+ },
+ :hyades => {
+ },
+ :ptolemy => {
+ :gmetads => {
+ :name => 'gmetads',
+ :alias => 'Ganglia',
+ :use_host_object => 'generic-gmetad-host',
+ :service_hostname => 'gm40',
+ #:service_hostname => 'ptolemy-gm',
+ :nodes => 'gm40'.expand,
+ #:nodes => 'gm4{0..1}'.expand,
+ :mcast_addr => '239.2.14.3'
+ },
+ :namenodes => {
+ :name => 'namenodes',
+ :alias => 'NameNodes',
+ :use_host_object => 'generic-namenode-host',
+ :service_hostname => 'ptolemy-nn',
+ :nodes => 'nn40'.expand,
+ #:nodes => 'nn0{0..2}'.expand,
+ :mcast_addr => '239.2.14.8'
+ },
+=begin
+ :resourcemanagers => {
+ :name => 'resourcemanagers',
+ :alias => 'ResourceManagers',
+ :use_host_object => 'generic-resourcemanager-host',
+ :service_hostname => 'ptolemy-rm',
+ :nodes => 'rm40'.expand,
+ #:nodes => 'rm4{0..1}'.expand,
+ :mcast_addr => '239.2.14.9'
+ },
+=end
+ :jobtrackers => {
+ :name => 'jobtrackers',
+ :alias => 'JobTrackers',
+ :use_host_object => 'generic-jobtracker-host',
+ :service_hostname => 'ptolemy-jt',
+ :nodes => 'jt40'.expand,
+ #:nodes => 'jt4{0..1}'.expand,
+ :mcast_addr => '239.2.14.9'
+ },
+=begin
+ :historyservers => {
+ :name => 'historyservers',
+ :alias => 'HistoryServers',
+ :use_host_object => 'generic-historyserver-host',
+ :service_hostname => 'ptolemy-jh',
+ :nodes => 'jh4{0..1}'.expand,
+ :mcast_addr => '239.2.14.9'
+ },
+=end
+ :datanodes => {
+ :name => 'datanodes',
+ :alias => 'DataNodes',
+ :use_host_object => 'generic-datanode-host',
+ :service_hostname => nil,
+ :nodes => 'dn4000{0..1}'.expand,
+ :mcast_addr => '239.2.14.20'
+ }
}
}
end
--- /dev/null
+{
+ "run_list": [
+ "role[ptolemy-dn]"
+ ]
+}
--- /dev/null
+{
+ "run_list": [
+ "role[ptolemy-gm]"
+ ]
+}
--- /dev/null
+{
+ "run_list": [
+ "role[ptolemy-jt]"
+ ]
+}
--- /dev/null
+{
+ "run_list": [
+ "role[ptolemy-nn]"
+ ]
+}
'role[hadoop]'
)
-#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+#env_run_lists()
grid_vol_root = '/grid/vol'
hadoop_attributes = {
'hadoop' => hadoop_attributes
)
-#override_attributes "apache2" => { "max_children" => "50" }
+#override_attributes()
+
--- /dev/null
+name 'hadoop-ptolemy'
+description 'Pleiades Hadoop cluster node'
+
+run_list(
+ 'role[node_commons]',
+ # LDAP (option)
+ #'role[nameservice-client-grid]',
+ 'role[hadoop]'
+)
+
+#env_run_lists()
+
+grid_vol_root = '/grid/vol'
+hadoop_attributes = {
+ # core-site.xml
+ 'this.cluster.name' => 'ptolemy',
+ 'this.domain' => 'grid.example.com',
+ 'this.namenode.fqdn' => '${this.cluster.name}-nn.${this.domain}',
+ 'fs.checkpoint.dir' => "#{grid_vol_root}/0/var/lib/${user.name}/checkpoint",
+ #'fs.checkpoint.dir' => "#{grid_vol_root}/0/var/lib/${user.name}/checkpoint,/export/home/${user.name}/var/lib/checkpoint",
+ # hdfs-site.xml
+ 'this.secondary.namenode.fqdn' => '${this.cluster.name}-cn.${this.domain}',
+ 'dfs.name.dir' => "#{grid_vol_root}/0/var/lib/${user.name}/name",
+ #'dfs.name.dir' => "#{grid_vol_root}/0/var/lib/${user.name}/name,/export/home/${user.name}/var/lib/name",
+ 'dfs.replication' => '2',
+ #'dfs.replication' => '3',
+ # mapred-site.xml
+ 'this.jobtracker.fqdn' => '${this.cluster.name}-jt.${this.domain}',
+ 'this.jobhistory.fqdn' => '${this.cluster.name}-jt.${this.domain}',
+ #'this.jobhistory.fqdn' => '${this.cluster.name}-jh.${this.domain}',
+}
+
+default_attributes(
+ 'grid' => {
+ 'vol_root' => grid_vol_root,
+ 'max_vol_nums' => '4'
+ },
+ 'hadoop' => hadoop_attributes
+)
+
+#override_attributes()
+
'role[ganglia-web]'
)
-#env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
+#env_run_lists()
this_subcluster = Grid::CLUSTERS[:pleiades][:gmetads]
mcast_addr = this_subcluster[:mcast_addr]
--- /dev/null
+$LOAD_PATH.push("#{File.dirname(__FILE__)}/../_lib")
+#${chef-repo}/_lib/grid.rb
+require 'grid'
+
+name 'ptolemy-dn'
+description 'Ptolemy DataNode node'
+
+run_list(
+ 'role[node_commons]',
+ #'role[grid-realm]',
+ 'role[ganglia-gmond]',
+ 'role[ptolemy-node]'
+)
+
+#env_run_lists()
+
+mcast_addr = Grid::CLUSTERS[:ptolemy][:datanodes][:mcast_addr]
+port = '8649'
+
+default_attributes(
+)
+
+override_attributes(
+ 'ganglia' => {
+ # gmond
+ 'cluster' => {
+ 'name' => 'DataNode00000',
+ 'owner' => Grid::DOMAIN
+ },
+ ## 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
+ ## 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
+ '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
+ }
+)
--- /dev/null
+$LOAD_PATH.push("#{File.dirname(__FILE__)}/../_lib")
+#${chef-repo}/_lib/grid.rb
+require 'grid'
+require 'rubygems'
+require 'bracecomp'
+
+name 'ptolemy-gm'
+description 'Ptolemy ganglia gmetad node'
+
+run_list(
+ 'role[node_commons]',
+ #'role[nameservice-client-grid]',
+ 'role[ganglia-gmond]',
+ 'role[ganglia-gmetad]',
+ 'role[ganglia-web]'
+)
+
+#env_run_lists()
+
+this_subcluster = Grid::CLUSTERS[:ptolemy][:gmetads]
+mcast_addr = this_subcluster[:mcast_addr]
+port = '8649'
+polling_interval = '30'
+=begin
+# uni-cast
+udp_send_channels4ucast = []
+this_subcluster[:nodes].first(2).each {|host|
+ udp_send_channels4ucast.push(
+ {
+ 'mcast_join' => '',
+ 'host' => "#{host}.#{Grid::DOMAIN}",
+ 'port' => port,
+ 'ttl' => ''
+ }
+ )
+}
+=end
+
+# for non-DataNodes
+data_sources = []
+Grid::CLUSTERS[:ptolemy].select{|key| key != :datanodes}.each {|key, cluster|
+ data_sources.push(
+ {
+ :name => cluster[:alias],
+ :polling_interval => polling_interval,
+ # head nodes: 2
+ :address_list => cluster[:nodes].first(2).map{|host| "#{host}.#{Grid::DOMAIN}"}
+ }
+ )
+}
+
+# for DataNodes
+head_node_nums = 2
+digit_nums = 5
+padstr = '0'
+dn_data_sources = []
+(0...2).step(40) {|v|
+#(0...80).step(40) {|v|
+ first_head = v.to_s.rjust(digit_nums, padstr)
+ last_head = (v + head_node_nums -1).to_s.rjust(digit_nums, padstr)
+ dn_data_sources.push(
+ {
+ :name => "DataNode#{first_head}",
+ :polling_interval => polling_interval,
+ :address_list => "dn{#{first_head}..#{last_head}}.#{Grid::DOMAIN}".expand
+ }
+ )
+}
+
+default_attributes(
+ 'ganglia' => {
+ 'web' => {
+=begin
+ 'Allow' => [
+ "from .#{Grid::DOMAIN}",
+ 'from 192.168.0.0/16'],
+ 'AuthType' => 'Kerberos',
+ 'mod_auth_kerb' => {
+ 'KrbAuthRealms' => Grid::REALM,
+ 'Krb5Keytab' => '/etc/krb5.keytab'
+ }
+=end
+ }
+ },
+)
+
+override_attributes(
+ 'ganglia' => {
+ # gmond
+ 'cluster' => {
+ 'name' => this_subcluster[:alias],
+ 'owner' => Grid::DOMAIN
+ },
+ ## 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
+ ## static uni-cast
+ 'udp_send_channels' => udp_send_channels4ucast,
+ 'udp_recv_channels' => [
+ {
+ 'mcast_join' => '',
+ 'port' => port,
+ 'bind' => ''
+ }
+ ],
+=end
+ },
+ # gmetad
+ 'gridname' => 'Ptolemy',
+ 'trusted_hosts' => ['127.0.0.1'],
+ #'trusted_hosts' => ['127.0.0.1'] \
+ # + Grid::CLUSTERS[:ptolemy][:nagioses][:nodes].map{|host| "#{host}.#{Grid::DOMAIN}"},
+ 'data_sources' => data_sources + dn_data_sources
+ }
+)
--- /dev/null
+$LOAD_PATH.push("#{File.dirname(__FILE__)}/../_lib")
+#${chef-repo}/_lib/grid.rb
+require 'grid'
+
+name 'ptolemy-jt'
+description 'Ptolemy JobTracker node'
+
+run_list(
+ 'role[node_commons]',
+ #'role[grid-realm]',
+ 'role[ganglia-gmond]',
+ 'role[ptolemy-node]'
+)
+
+#env_run_lists()
+
+this_subcluster = Grid::CLUSTERS[:ptolemy][:jobtrackers]
+mcast_addr = this_subcluster[:mcast_addr]
+port = '8649'
+=begin
+# uni-cast
+udp_send_channels4ucast = []
+this_subcluster[:nodes].first(2).each {|host|
+ udp_send_channels4ucast.push(
+ {
+ 'mcast_join' => '',
+ 'host' => "#{host}.#{Grid::DOMAIN}",
+ 'port' => port,
+ 'ttl' => ''
+ }
+ )
+}
+=end
+
+default_attributes(
+)
+
+override_attributes(
+ 'ganglia' => {
+ # gmond
+ 'cluster' => {
+ 'name' => this_subcluster[:alias],
+ 'owner' => Grid::DOMAIN
+ },
+ '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
+ ## static uni-cast
+ 'udp_send_channels' => udp_send_channels4ucast,
+ 'udp_recv_channels' => [
+ {
+ 'mcast_join' => '',
+ 'port' => port,
+ 'bind' => ''
+ }
+ ]
+=end
+ }
+ }
+)
--- /dev/null
+$LOAD_PATH.push("#{File.dirname(__FILE__)}/../_lib")
+#${chef-repo}/_lib/grid.rb
+require 'grid'
+
+name 'ptolemy-nn'
+description 'Ptolemy NameNode node'
+
+run_list(
+ 'role[node_commons]',
+ #'role[grid-realm]',
+ 'role[ganglia-gmond]',
+ 'role[ptolemy-node]'
+)
+
+#env_run_lists()
+
+this_subcluster = Grid::CLUSTERS[:ptolemy][:namenodes]
+mcast_addr = this_subcluster[:mcast_addr]
+port = '8649'
+=begin
+# uni-cast
+udp_send_channels4ucast = []
+this_subcluster[:nodes].first(2).each {|host|
+ udp_send_channels4ucast.push(
+ {
+ 'mcast_join' => '',
+ 'host' => "#{host}.#{Grid::DOMAIN}",
+ 'port' => port,
+ 'ttl' => ''
+ }
+ )
+}
+=end
+
+default_attributes(
+)
+
+override_attributes(
+ 'ganglia' => {
+ # gmond
+ 'cluster' => {
+ 'name' => this_subcluster[:alias],
+ 'owner' => Grid::DOMAIN
+ },
+ '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
+ ## static uni-cast
+ 'udp_send_channels' => udp_send_channels4ucast,
+ 'udp_recv_channels' => [
+ {
+ 'mcast_join' => '',
+ 'port' => port,
+ 'bind' => ''
+ }
+ ]
+=end
+ }
+ }
+)
--- /dev/null
+$LOAD_PATH.push("#{File.dirname(__FILE__)}/../_lib")
+#${chef-repo}/_lib/grid.rb
+require 'grid'
+
+name 'ptolemy-node'
+description 'Ptolemy cluster node'
+
+run_list(
+ 'role[hadoop-ptolemy]',
+ #'role[hadoop-ptolemy-with-security]',
+ #'role[hbase-ptolemy-with-security]'
+)
+
+#env_run_lists()
+
+cluster = Grid::CLUSTERS[:ptolemy]
+
+default_attributes(
+ 'hadoop' => {
+ 'version' => '1.2.1',
+ 'metrics2' => {
+ # multi-cast
+ 'namenode.sink.ganglia.servers' => "#{cluster[:namenodes][:mcast_addr]}:8649",
+ 'datanode.sink.ganglia.servers' => "#{cluster[:datanodes][:mcast_addr]}:8649",
+ 'jobtracker.sink.ganglia.servers' => "#{cluster[:jobtrackers][:mcast_addr]}:8649",
+ 'tasktracker.sink.ganglia.servers' => "#{cluster[:datanodes][:mcast_addr]}:8649",
+ 'maptask.sink.ganglia.servers' => "#{cluster[:datanodes][:mcast_addr]}:8649",
+ 'reducetask.sink.ganglia.servers' => "#{cluster[:datanodes][:mcast_addr]}:8649"
+ }
+ },
+=begin
+ 'hbase' => {
+ 'version' => '0.94.7'
+ }
+=end
+)
+
+#override_attributes()
+