OSDN Git Service

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