Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit 61ba266

Browse files
committed
Deployment output fixes, moved some timing output around
1 parent 80f6dac commit 61ba266

File tree

1 file changed

+18
-27
lines changed

1 file changed

+18
-27
lines changed

scripts/deploy_on_oci.py

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
data_tiering = 'False'
3434
nvme_disks = 0
3535
cluster_version = '6.2.0' # type: str
36+
SIMPLE = 'None'
3637

3738
#
3839
# Custom Global Parameters - Customize below here
@@ -2186,32 +2187,13 @@ def build_cloudera_cluster():
21862187
except ApiException as e:
21872188
print('Exception calling ClustersResourceApi -> first_run {}\n'.format(e))
21882189
sys.exit()
2190+
21892191
global cluster_setup_time
21902192
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+
22152197

22162198
def enable_kerberos():
22172199
"""
@@ -2323,9 +2305,18 @@ def enable_kerberos():
23232305
build_cloudera_cluster()
23242306
if SIMPLE == 'True':
23252307
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()
23292320

23302321
print('Access Cloudera Manager: http://%s:%s/cmf/' % (cm_server, cm_port))
23312322

0 commit comments

Comments
 (0)