OSDN Git Service

hadoop recipe bug fix.
[metasearch/grid-chef-repo.git] / roles / test-cdh-on-localhost.rb
1 name 'test-cdh-on-localhost'
2 description 'Testing Cloudera\'s Distribution, including Apache Hadoop on local machine'
3
4 run_list(
5   'role[node_commons]',
6   'role[chef_utils]',
7   'role[nameservice-client]',
8   #'role[ganglia-gmond-ucast-localhost]',
9   #'role[ganglia-gmetad-localhost]',
10   #'role[ganglia-web]',
11   #'role[nagios]',
12   'role[yum-cdh]',
13   'role[hadoop-pseudo-distributed-with-security]',
14   #'role[zookeeper-pseudo-replicated-with-security]',
15   #'role[hbase-pseudo-distributed-with-security]',
16   ##'role[pig]'
17 )
18
19 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
20
21 default_attributes(
22   'openldap' => {
23     'client' => {
24       'URI' => 'ldap://localhost/',
25       'BASE' => 'dc=localdomain',
26       'TLS_CACERT' => '/etc/ssl/certs/cacert.pem',
27       'TLS_REQCERT' => 'allow',
28       'TLS_CHECKPEER' => 'yes',
29       'SASL_MECH' => 'GSSAPI'
30     },
31     'nss-ldapd' => {
32       'uri' => 'ldap://localhost/',
33       'base' => 'dc=localdomain',
34       'ssl' => 'start_tls',
35       'tls_cacertfile' => '/etc/ssl/certs/cacert.pem',
36       'tls_reqcert' => 'demand'
37     },
38     #'ldap_lookup_nameservices' => ['passwd', 'group']
39   },
40   'krb5' => {
41     'libdefaults' => {
42       'default_realm' => 'LOCALDOMAIN',
43       # strong crypto
44       'default_tgs_enctypes' \
45         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5',
46       'default_tkt_enctypes' \
47         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5',
48       'permitted_enctypes' \
49         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5'
50     }
51   },
52   'ganglia' => {
53     'trusted_hosts' => ['127.0.0.1'],
54     'web' => {
55       #'Allow' => ['from .grid.example.com'],
56       'AuthType' => 'Kerberos',
57       'mod_auth_kerb' => {
58         'KrbAuthRealms' => 'LOCALDOMAIN',
59         'Krb5Keytab' => '/etc/krb5.keytab'
60       }
61     }
62   },
63   'nagios' => {
64     'web' => {
65       #'Allow' => ['from .grid.example.com'],
66       'AuthType' => 'Kerberos',
67       'mod_auth_kerb' => {
68         'KrbAuthRealms' => 'LOCALDOMAIN',
69         'Krb5Keytab' => '/etc/krb5.keytab'
70       }
71     },
72     'check_external_commands' => '1',
73     'use_regexp_matching' => '1',
74     'authorized_for_system_information' => '*',
75     'authorized_for_configuration_information' => '*',
76     'authorized_for_system_commands' => '*',
77     'authorized_for_all_services' => '*',
78     'authorized_for_all_hosts' => '*',
79     'authorized_for_all_service_commands' => '*',
80     'authorized_for_all_host_commands' => '*',
81     'check_ganglia_metric' => {
82       'enabled' => true,
83       'gmetad_host' => 'localhost'
84     },
85     'objects' => {
86       'hosts' => [
87         {
88           'use' => 'generic-host',
89           'host_name' => 'localhost4gmon',
90           'address' => 'localhost'  # not 127.0.0.1
91         }
92       ],
93       'services' => [
94         # ganglia gmetad monitoring
95         {
96           'use' => 'generic-check_ganglia_cache-service',
97           'contact_groups' => 'admins',
98           'host_name' => 'localhost'
99         },
100         {
101           'use' => 'generic-ganglia_heartbeat-service',
102           'contact_groups' => 'admins',
103           'host_name' => 'localhost4gmon'
104           #'hostgroup_name' => 'gmetads',
105         },
106         # standard monitoring.
107         {
108           'use' => 'generic-ping-service',
109           'contact_groups' => 'admins',
110           #'contact_groups' => 'grid-admins',
111           'host_name' => 'localhost',
112           #'hostgroup_name' => 'grid-servers',
113         },
114         # monitoring via Ganglia
115         {
116           'use' => 'generic-load_one-service',
117           'contact_groups' => 'admins',
118           'host_name' => 'localhost4gmon'
119         },
120       ],
121       'servicedependencies' => [
122         {
123           'host_name' => 'localhost',
124           'service_description' => 'Cache for check_ganglia_metric',
125           'dependent_host_name' => 'localhost4gmon',
126           #'dependent_host_name' => '.*',
127           #'dependent_hostgroup_name' => 'grid-servers',
128           'dependent_service_description' => '.* via Ganglia$',
129           'execution_failure_criteria' => 'c,p'
130         }
131       ]
132     }
133   },
134   'zookeeper' => {
135     'version' => '3.4.5'
136   },
137   'cdh' => {
138     'version' => '4.3.0',
139     #'version' => '4.2.0',
140     #'version' => '3u6',
141     #'version' => '3u5',
142     'yum_repo' => {
143       'with_gplextras' => true
144     }
145   },
146   'hadoop' => {
147     'install_flavor' => 'cdh',
148     'cdh' => {
149       #'alternatives' => {
150       #  'hadoop-conf' => {
151       #    'path' => '/etc/hadoop/conf.pleiades',
152       #    'priority' => '40'
153       #  }
154       #}
155       'resource_negotiator_framework' => 'MRv1',  # CDH4 only.
156     },
157     'HADOOP_CLASSPATH' => '',
158     'HADOOP_USER_CLASSPATH_FIRST' => 'false',
159 =begin
160     'metrics2' => {
161       'namenode.sink.ganglia.servers' => 'localhost:8649',
162       'datanode.sink.ganglia.servers' => 'localhost:8649',
163       # for 2.0.x only
164       'resourcemanager.sink.ganglia.servers' => 'localhost:8649',
165       'nodemanager.sink.ganglia.servers' => 'localhost:8649',
166       # for 1.0.x only
167       'jobtracker.sink.ganglia.servers' => 'localhost:8649',
168       'tasktracker.sink.ganglia.servers' => 'localhost:8649',
169       'maptask.sink.ganglia.servers' => 'localhost:8649',
170       'reducetask.sink.ganglia.servers' => 'localhost:8649'
171     },
172 =end
173     # for 2.0.x only
174     'container-executor' => {
175       'min.user.id' => '500'
176     },
177     #'yarn.nodemanager.linux-container-executor.resources-handler.class' \
178     #  => 'org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler',
179     # for 1.x only
180     'taskcontroller' => {
181       'min.user.id' => '500'
182     },
183   },
184   'hbase' => {
185     'version' => '0.94.7'
186   },
187   'pig' => {
188     'version' => '0.11.1'
189     #'version' => '0.11.0'
190   }
191 )
192
193 override_attributes(
194   'ganglia' => {
195     'trusted_hosts' => ['127.0.0.1'],
196 =begin
197     # for TEST
198     'gmond_conf_type' => 'automatic',
199     'automatic' => {
200       #'cast_mode' => 'multi'
201       'cast_mode' => 'uni'
202     }
203 =end
204   }
205 )
206