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

Commit a006b34

Browse files
committed
License upload enabled, disk function bugfix
1 parent 6935096 commit a006b34

File tree

2 files changed

+42
-18
lines changed

2 files changed

+42
-18
lines changed

v6/network.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,16 @@ resource "oci_core_security_list" "PublicSubnet" {
6767
source = "0.0.0.0/0"
6868
}]
6969

70+
ingress_security_rules = [{
71+
tcp_options {
72+
"max" = 18088
73+
"min" = 18088
74+
}
75+
76+
protocol = "6"
77+
source = "0.0.0.0/0"
78+
}]
79+
7080
ingress_security_rules = [{
7181
tcp_options {
7282
"max" = 19888

v6/scripts/deploy_on_oci.py

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ def build_cluster_host_list(host_fqdn_list):
648648
print('Cluster Host List: %s' % cluster_host_list)
649649

650650

651-
def build_disk_lists(disk_count, data_tiering):
651+
def build_disk_lists(disk_count, data_tiering, nvme_disks):
652652
"""
653653
Build Disk Lists for use with HDFS and YARN
654654
:return:
@@ -2374,23 +2374,24 @@ def generate_kerberos_credentials():
23742374
print('Exception calling ClouderaManagerResourceApi->generate_credentials_command: {}'.format(e))
23752375

23762376

2377-
def hdfs_enable_ha():
2377+
def update_license():
23782378
"""
2379-
Enable high availability (HA) for an HDFS NameNode.
2380-
2381-
The command will set up the given "active" and "stand-by" NameNodes as an HA pair. Both nodes need to already exist.
2382-
2383-
If there is a SecondaryNameNode associated with either given NameNode instance, it will be deleted.
2384-
2385-
Note that while the shared edits path may be different for both nodes,
2386-
they need to point to the same underlying storage
2387-
2388-
As part of enabling HA, any services that depend on the HDFS service being modified will be stopped.
2389-
The command arguments provide options to re-start these services and to re-deploy the client configurations for
2390-
services of the cluster after HA has been enabled.
2379+
Update Cloudera Manager License
23912380
:return:
23922381
"""
2393-
2382+
try:
2383+
with open(license_file) as l:
2384+
body = l.read()
2385+
try:
2386+
api_response = cloudera_manager_api.update_license(body=body)
2387+
if debug == 'True':
2388+
pprint(api_response)
2389+
except ApiException as e:
2390+
print('Exception calling Cloudera Manager Resource API -> update_license {}'.format(e))
2391+
except:
2392+
print('License file %s not found!' % license_file)
2393+
print('Using Trial License instead...')
2394+
begin_trial()
23942395

23952396

23962397
#
@@ -2437,6 +2438,16 @@ def options_parser(args=None):
24372438
print('Worker Shape is required.')
24382439
parser.print_help()
24392440
exit(-1)
2441+
if options.license_file:
2442+
try:
2443+
with open(options.license_file) as l:
2444+
license = l.read()
2445+
if debug == 'True':
2446+
print('License File Info:\n%s' % license)
2447+
except:
2448+
print('Cannot open license file, verify file exists and full path used: %s' % options.license_file)
2449+
sys.exit()
2450+
24402451
return (options.cm_server, options.input_host_list, options.disk_count, options.license_file, options.worker_shape,
24412452
options.BUILD, options.DELETE)
24422453

@@ -2451,7 +2462,7 @@ def build_cloudera_cluster():
24512462
:return:
24522463
"""
24532464
parse_ssh_key()
2454-
build_disk_lists(disk_count, data_tiering)
2465+
build_disk_lists(disk_count, data_tiering, nvme_disks)
24552466
try:
24562467
api_response = users_api.read_user2(admin_user_name)
24572468
if api_response.auth_roles:
@@ -2534,8 +2545,11 @@ def build_cloudera_cluster():
25342545
print('->Restart MGMT Roles')
25352546
mgmt_role_commands(action='restart_command')
25362547
# TODO - Need to refactor here if license is provided
2537-
print('->Activating Trial License')
2538-
begin_trial()
2548+
if license_file == 'None':
2549+
print('->Activating Trial License')
2550+
begin_trial()
2551+
else:
2552+
update_license()
25392553
print('->Executing first_run on Cluster - %s' % cluster_name)
25402554
try:
25412555
api_response = clusters_api.first_run(cluster_name)

0 commit comments

Comments
 (0)