OSDN Git Service

improve the backup and restore scripts.
[metasearch/grid-chef-repo.git] / roles / test-hdp-on-localhost.rb
1 name 'test-hdp-on-localhost'
2 description 'Testing Hortonworks Data Platform 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-hdp]',
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' => 'hdp',
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   'hdp' => {
147     'version' => '1.3.2',
148     #'version' => '1.2.3.1',
149     'yum_repo' => {
150       'update' => true
151     }
152   },
153   'hadoop' => {
154     'install_flavor' => 'hdp',
155     'hdp' => {
156       #'alternatives' => {
157       #  'hadoop-conf' => {
158       #    'path' => '/etc/hadoop/conf.pleiades',
159       #    'priority' => '40'
160       #  }
161       #}
162     },
163     'with_hadoop_lzo' => true,
164     'HADOOP_CLASSPATH' => '',
165     'HADOOP_USER_CLASSPATH_FIRST' => 'false',
166 =begin
167     'metrics2' => {
168       'namenode.sink.ganglia.servers' => 'localhost:8649',
169       'datanode.sink.ganglia.servers' => 'localhost:8649',
170       # for 2.0.x only
171       'resourcemanager.sink.ganglia.servers' => 'localhost:8649',
172       'nodemanager.sink.ganglia.servers' => 'localhost:8649',
173       # for 1.0.x only
174       'jobtracker.sink.ganglia.servers' => 'localhost:8649',
175       'tasktracker.sink.ganglia.servers' => 'localhost:8649',
176       'maptask.sink.ganglia.servers' => 'localhost:8649',
177       'reducetask.sink.ganglia.servers' => 'localhost:8649'
178     },
179 =end
180     # for 2.0.x only
181     'container-executor' => {
182       'min.user.id' => '500'
183     },
184     #'yarn.nodemanager.linux-container-executor.resources-handler.class' \
185     #  => 'org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler',
186     # for 1.x only
187     'taskcontroller' => {
188       'min.user.id' => '500'
189     },
190   },
191   'hbase' => {
192     'version' => '0.94.7'
193   },
194   'pig' => {
195     'version' => '0.11.1'
196     #'version' => '0.11.0'
197   }
198 )
199
200 override_attributes(
201   'ganglia' => {
202     'trusted_hosts' => ['127.0.0.1'],
203 =begin
204     # for TEST
205     'gmond_conf_type' => 'automatic',
206     'automatic' => {
207       #'cast_mode' => 'multi'
208       'cast_mode' => 'uni'
209     }
210 =end
211   }
212 )
213