OSDN Git Service

add .envrc
[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-all-in-one-localhost]',
10   'role[nagios]',
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' => 'tarball',
26         'HADOOP_DISTRIBUTION' => 'apache',
27         #'HADOOP_HOME' => '/grid/usr/hadoop',
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       # or weak crypto for 1.0.x KSSL
60       #'allow_weak_crypto' => 'true',
61       #'default_tgs_enctypes' \
62       #  => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5',
63       #'default_tkt_enctypes' \
64       #  => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5',
65       #'permitted_enctypes' \
66       #  => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5'
67     }
68   },
69   'nagios' => {
70     'web' => {
71       #'Allow' => ['from .grid.example.com'],
72       'AuthType' => 'Kerberos',
73       'mod_auth_kerb' => {
74         'KrbAuthRealms' => 'LOCALDOMAIN',
75         'Krb5Keytab' => '/etc/krb5.keytab'
76       }
77     },
78     'check_external_commands' => '1',
79     'use_regexp_matching' => '1',
80     'authorized_for_system_information' => '*',
81     'authorized_for_configuration_information' => '*',
82     'authorized_for_system_commands' => '*',
83     'authorized_for_all_services' => '*',
84     'authorized_for_all_hosts' => '*',
85     'authorized_for_all_service_commands' => '*',
86     'authorized_for_all_host_commands' => '*',
87     'check_ganglia_metric' => {
88       'enabled' => true,
89       'gmetad_host' => 'localhost'
90     },
91     'objects' => {
92       'hosts' => [
93         {
94           'use' => 'generic-host',
95           'host_name' => 'localhost4gmon',
96           'address' => 'localhost'  # not 127.0.0.1
97         }
98       ],
99       'services' => [
100         # ganglia gmetad monitoring
101         {
102           'use' => 'generic-check_ganglia_cache-service',
103           'contact_groups' => 'admins',
104           'host_name' => 'localhost'
105         },
106         {
107           'use' => 'generic-ganglia_heartbeat-service',
108           'contact_groups' => 'admins',
109           'host_name' => 'localhost4gmon'
110           #'hostgroup_name' => 'gmetads',
111         },
112         # standard monitoring.
113         {
114           'use' => 'generic-ping-service',
115           'contact_groups' => 'admins',
116           #'contact_groups' => 'grid-admins',
117           'host_name' => 'localhost',
118           #'hostgroup_name' => 'grid-servers',
119         },
120         # monitoring via Ganglia
121         {
122           'use' => 'generic-load_one-service',
123           'contact_groups' => 'admins',
124           'host_name' => 'localhost4gmon'
125         },
126       ],
127       'servicedependencies' => [
128         {
129           'host_name' => 'localhost',
130           'service_description' => 'Cache for check_ganglia_metric',
131           'dependent_host_name' => 'localhost4gmon',
132           #'dependent_host_name' => '.*',
133           #'dependent_hostgroup_name' => 'grid-servers',
134           'dependent_service_description' => '.* via Ganglia$',
135           'execution_failure_criteria' => 'c,p'
136         }
137       ]
138     }
139   },
140   'zookeeper' => {
141     'version' => '3.4.5'
142   },
143   'hadoop' => {
144     #'version' => '2.1.0-beta',
145     #'version' => '2.0.6-alpha',
146     'version' => '1.2.1',
147     #'version' => '1.1.2',
148     #'version' => '1.0.4',
149     'hadoop.http.authentication.type' => 'simple',
150     'metrics2' => {
151       'namenode.sink.ganglia.servers' => 'localhost:8649',
152       'datanode.sink.ganglia.servers' => 'localhost:8649',
153       # for 2.0.x only
154       'resourcemanager.sink.ganglia.servers' => 'localhost:8649',
155       'nodemanager.sink.ganglia.servers' => 'localhost:8649',
156       # for 1.0.x only
157       'jobtracker.sink.ganglia.servers' => 'localhost:8649',
158       'tasktracker.sink.ganglia.servers' => 'localhost:8649',
159       'maptask.sink.ganglia.servers' => 'localhost:8649',
160       'reducetask.sink.ganglia.servers' => 'localhost:8649'
161     },
162     # for 2.0.x only >>
163     #'yarn.nodemanager.admin-env' => 'MALLOC_ARENA_MAX=$MALLOC_ARENA_MAX',
164     'yarn.nodemanager.admin-env' => 'MALLOC_ARENA_MAX=$MALLOC_ARENA_MAX,LD_LIBRARY_PATH=${HADOOP_COMMON_HOME}/lib/native',
165     'yarn.nodemanager.linux-container-executor.resources-handler.class' \
166       => 'org.apache.hadoop.yarn.server.nodemanager.util.CgroupsLCEResourcesHandler',
167     # for 1.0.x only >>
168     'extra_configs' => {
169       'core-site.xml' => {
170         #'hadoop.http.authentication.signature.secret' \
171         #  => '91d365813d6dd1f4ceafff73f90a9a06'
172       }
173     },
174     'krb5_strong_crypto' => {
175       'default_tgs_enctypes' \
176         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5',
177       'default_tkt_enctypes' \
178         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5',
179       'permitted_enctypes' \
180         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5'
181     },
182     'krb5_weak_crypto' => {
183       'default_tgs_enctypes' \
184         => 'des-cbc-crc des-cbc-md5',
185       'default_tkt_enctypes' \
186         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5',
187       'permitted_enctypes' \
188         => 'aes256-cts-hmac-sha1-96 aes128-cts-hmac-sha1-96 arcfour-hmac-md5 des-cbc-crc des-cbc-md5'
189     }
190     # <<
191   },
192   'hbase' => {
193     'version' => '0.94.7'
194   },
195   'pig' => {
196     'version' => '0.11.1'
197     #'version' => '0.11.0'
198   }
199 )
200
201 override_attributes(
202   'ganglia' => {
203     'trusted_hosts' => ['127.0.0.1'],
204     'web' => {
205       #'Allow' => ['from .grid.example.com'],
206       'AuthType' => 'Kerberos',
207       'mod_auth_kerb' => {
208         'KrbAuthRealms' => 'LOCALDOMAIN',
209         'Krb5Keytab' => '/etc/krb5.keytab'
210       }
211     }
212 =begin
213     # for TEST
214     'gmond_conf_type' => 'automatic',
215     'automatic' => {
216       #'cast_mode' => 'multi'
217       'cast_mode' => 'uni'
218     }
219 =end
220   }
221 )
222