|
33 | 33 | data_tiering = 'False'
|
34 | 34 | nvme_disks = 0
|
35 | 35 | cluster_version = '6.2.0' # type: str
|
| 36 | +SIMPLE = 'None' |
36 | 37 |
|
37 | 38 | #
|
38 | 39 | # Custom Global Parameters - Customize below here
|
@@ -2186,32 +2187,13 @@ def build_cloudera_cluster():
|
2186 | 2187 | except ApiException as e:
|
2187 | 2188 | print('Exception calling ClustersResourceApi -> first_run {}\n'.format(e))
|
2188 | 2189 | sys.exit()
|
| 2190 | + |
2189 | 2191 | global cluster_setup_time
|
2190 | 2192 | cluster_setup_time = time.time() - start_time
|
2191 |
| - if SIMPLE == 'True': |
2192 |
| - hdfs_ha = 'False' |
2193 |
| - secure_cluster = 'False' |
2194 |
| - pass |
2195 |
| - elif hdfs_ha == 'True': |
2196 |
| - hdfs_ha_deployment_start = time.time() |
2197 |
| - print('->Enabling HDFS HA') |
2198 |
| - hdfs_enable_nn_ha(snn_host_id) |
2199 |
| - wait_for_active_service_commands('\tEnable HDFS HA', 'HDFS') |
2200 |
| - global hdfs_ha_deployment_time |
2201 |
| - hdfs_ha_deployment_time = time.time() - hdfs_ha_deployment_start |
2202 |
| - else: |
2203 |
| - pass |
2204 |
| - if secure_cluster == 'True': |
2205 |
| - pass |
2206 |
| - else: |
2207 |
| - print('---> CLUSTER SETUP COMPLETE <---') |
2208 |
| - deployment_time = time.time() - start_time |
2209 |
| - print('TOTAL SETUP TIME: %s ' % str(datetime.timedelta(seconds=deployment_time))) |
2210 |
| - if hdfs_ha == 'True': |
2211 |
| - print('CLUSTER SETUP TIME: %s ' % str(datetime.timedelta(seconds=cluster_setup_time))) |
2212 |
| - print('HDFS HA SETUP TIME: %s ' % str(datetime.timedelta(seconds=hdfs_ha_deployment_time))) |
2213 |
| - else: |
2214 |
| - pass |
| 2193 | + print('---> INITIAL CLUSTER SETUP COMPLETE <---') |
| 2194 | + deployment_time = time.time() - start_time |
| 2195 | + print('SETUP TIME: %s ' % str(datetime.timedelta(seconds=deployment_time))) |
| 2196 | + |
2215 | 2197 |
|
2216 | 2198 | def enable_kerberos():
|
2217 | 2199 | """
|
@@ -2323,9 +2305,18 @@ def enable_kerberos():
|
2323 | 2305 | build_cloudera_cluster()
|
2324 | 2306 | if SIMPLE == 'True':
|
2325 | 2307 | pass
|
2326 |
| - elif secure_cluster == 'True': |
2327 |
| - print('->Enable Kerberos') |
2328 |
| - enable_kerberos() |
| 2308 | + else: |
| 2309 | + if hdfs_ha == 'True': |
| 2310 | + hdfs_ha_deployment_start = time.time() |
| 2311 | + print('->Enabling HDFS HA') |
| 2312 | + hdfs_enable_nn_ha(snn_host_id) |
| 2313 | + wait_for_active_service_commands('\tEnable HDFS HA', 'HDFS') |
| 2314 | + global hdfs_ha_deployment_time |
| 2315 | + hdfs_ha_deployment_time = time.time() - hdfs_ha_deployment_start |
| 2316 | + |
| 2317 | + if secure_cluster == 'True': |
| 2318 | + print('->Enable Kerberos') |
| 2319 | + enable_kerberos() |
2329 | 2320 |
|
2330 | 2321 | print('Access Cloudera Manager: http://%s:%s/cmf/' % (cm_server, cm_port))
|
2331 | 2322 |
|
0 commit comments