OSDN Git Service

add the dsh cookbook.
[metasearch/grid-chef-repo.git] / roles / test-on-localhost.rb
1 name 'test-on-localhost'
2 description 'Testing on local machine'
3
4 run_list(
5   'role[mocker]',
6   'role[node_commons]',
7   'role[chef_utils]',
8   'role[nameservice-client]',
9   'role[ganglia-gmond-ucast-localhost]',
10   'role[ganglia-gmetad-localhost]',
11   'role[ganglia-web]',
12   'role[nagios]',
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   'role[grid-ops-utils]'
18 )
19
20 #env_run_lists "prod" => ["recipe[apache2]"], "staging" => ["recipe[apache2::staging]"], "_default" => []
21
22 default_attributes(
23   'openldap' => {
24     'client' => {
25       'URI' => 'ldap://localhost/',
26       'BASE' => 'dc=localdomain',
27       'TLS_CACERT' => '/etc/ssl/certs/cacert.pem',
28       'TLS_REQCERT' => 'allow',
29       'TLS_CHECKPEER' => 'yes',
30       'SASL_MECH' => 'GSSAPI'
31     },
32     'nss-ldapd' => {
33       'uri' => 'ldap://localhost/',
34       'base' => 'dc=localdomain',
35       'ssl' => 'start_tls',
36       'tls_cacertfile' => '/etc/ssl/certs/cacert.pem',
37       'tls_reqcert' => 'demand'
38     },
39     #'ldap_lookup_nameservices' => ['passwd', 'group']
40   },
41   'krb5' => {
42     'libdefaults' => {
43       'default_realm' => 'LOCALDOMAIN',
44       # strong crypto
45       'default_tgs_enctypes' \
46         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5',
47       'default_tkt_enctypes' \
48         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5',
49       'permitted_enctypes' \
50         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5'
51       # or weak crypto for 1.0.x KSSL
52       #'allow_weak_crypto' => 'true',
53       #'default_tgs_enctypes' \
54       #  => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5',
55       #'default_tkt_enctypes' \
56       #  => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5',
57       #'permitted_enctypes' \
58       #  => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-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   'hadoop' => {
147     #'version' => '2.1.0-beta',
148     #'version' => '2.0.6-alpha',
149     'version' => '1.2.1',
150     #'version' => '1.1.2',
151     #'version' => '1.0.4',
152     'hadoop.http.authentication.type' => 'simple',
153     'metrics2' => {
154       'namenode.sink.ganglia.servers' => 'localhost:8649',
155       'datanode.sink.ganglia.servers' => 'localhost:8649',
156       # for 2.0.x only
157       'resourcemanager.sink.ganglia.servers' => 'localhost:8649',
158       'nodemanager.sink.ganglia.servers' => 'localhost:8649',
159       # for 1.0.x only
160       'jobtracker.sink.ganglia.servers' => 'localhost:8649',
161       'tasktracker.sink.ganglia.servers' => 'localhost:8649',
162       'maptask.sink.ganglia.servers' => 'localhost:8649',
163       'reducetask.sink.ganglia.servers' => 'localhost:8649'
164     },
165     # for 2.0.x only >>
166     #'yarn.nodemanager.admin-env' => 'MALLOC_ARENA_MAX=$MALLOC_ARENA_MAX',
167     'yarn.nodemanager.admin-env' => 'MALLOC_ARENA_MAX=$MALLOC_ARENA_MAX,LD_LIBRARY_PATH=${HADOOP_COMMON_HOME}/lib/native',
168     'yarn.nodemanager.linux-container-executor.resources-handler.class' \
169       => 'org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler',
170     # for 1.0.x only >>
171     'extra_configs' => {
172       'core-site.xml' => {
173         'hadoop.http.authentication.signature.secret' \
174           => '91d365813d6dd1f4ceafff73f90a9a06'
175       }
176     },
177     'krb5_strong_crypto' => {
178       'default_tgs_enctypes' \
179         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5',
180       'default_tkt_enctypes' \
181         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5',
182       'permitted_enctypes' \
183         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5'
184     },
185     'krb5_weak_crypto' => {
186       'default_tgs_enctypes' \
187         => 'des-cbc-crc des-cbc-md5',
188       'default_tkt_enctypes' \
189         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5',
190       'permitted_enctypes' \
191         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5'
192     }
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