in scripts/get_advancedoptions.py [0:0]
def set_advancedconfig(s3path,odir):
print('Will download ' + s3path + ' To ' + odir)
cmd = aws_cmd
cmd = cmd + ' s3 cp ' + s3path
cmd = cmd + ' ' + odir
if not os.path.exists(odir):
os.makedirs(odir)
print('Executing ' + cmd)
output = exe_cmd(cmd)
json_file = os.path.basename(s3path)
options = get_options(odir + '/' + json_file)
print('Advanced Options:')
print(options)
with open(config_file,'a') as f:
json_export = 'export ADVANCED_JSON='
json_export = json_export + odir + '/' + json_file
f.write(json_export + '\n')
print(json_export)
if 'CreateAMI' in options:
if options['CreateAMI'] == 'True':
json_export = 'export CREATE_AMI=True'
else:
json_export = 'export CREATE_AMI=False'
f.write(json_export + '\n')
print(json_export)
if 'InstallHANA' in options:
if options['InstallHANA'] == 'Yes':
json_export = 'export INSTALL_HANA=Yes'
else:
json_export = 'export INSTALL_HANA=No'
f.write(json_export + '\n')
print(json_export)
if 'DebugDeployment' in options:
if options['DebugDeployment'] == 'True':
json_export = 'export DEBUG_DEPLOYMENT=True'
else:
json_export = 'export DEBUG_DEPLOYMENT=False'
f.write(json_export + '\n')
print(json_export)