def check_gpl_license_approved(upgrade_response): if 'lzo_enabled' not in upgrade_response or upgrade_response['lzo_enabled'].lower() != "true": set_property(GPL_LICENSE_ACCEPTED_PROPERTY, "false", rewrite=False) return while not write_gpl_license_accepted(text = LZO_ENABLED_GPL_TEXT) and not get_YN_input(INSTALLED_LZO_WITHOUT_GPL_TEXT, False): pass
def check_gpl_license_approved(upgrade_response): if 'lzo_enabled' not in upgrade_response or upgrade_response[ 'lzo_enabled'].lower() != "true": return while not write_gpl_license_accepted() and not get_YN_input( INSALLED_LZO_WITHOUT_GPL_TEXT, False): pass
def setup(options): logger.info("Setup ambari-server.") if options.only_silent: if check_setup_already_done(): print "Nothing was done. Ambari Setup already performed and cannot re-run setup in silent mode. Use \"ambari-server setup\" command without -s option to change Ambari setup." sys.exit(0) retcode = verify_setup_allowed(options) if not retcode == 0: raise FatalException(1, None) if not is_root(): warn_msg = configDefaults.MESSAGE_WARN_SETUP_NOT_ROOT print warn_msg # proceed jdbc properties if they were set if _check_jdbc_options(options): proceedJDBCProperties(options) return (retcode, err) = disable_security_enhancements() if not retcode == 0: raise FatalException(retcode, err) #Create ambari user, if needed (retcode, register_service, svc_user, svc_password) = check_ambari_user(options) if not retcode == 0: err = 'Failed to create user. Exiting.' raise FatalException(retcode, err) print configDefaults.MESSAGE_CHECK_FIREWALL check_firewall() # proceed jdbc properties if they were set if _check_jdbc_options(options): proceedJDBCProperties(options) print 'Checking JDK...' try: download_and_install_jdk(options) except FatalException as e: err = 'Downloading or installing JDK failed: {0}. Exiting.'.format(e) raise FatalException(e.code, err) print 'Checking GPL software agreement...' write_gpl_license_accepted(default_prompt_value=options.accept_gpl) print 'Completing setup...' retcode = configure_os_settings() if not retcode == 0: err = 'Configure of OS settings in ambari.properties failed. Exiting.' raise FatalException(retcode, err) print 'Configuring database...' prompt_db_properties(options) #DB setup should be done last after doing any setup. _setup_database(options) check_jdbc_drivers(options) if not options.skip_view_extraction: print 'Extracting system views...' retcode = extract_views(options) if not retcode == 0: err = 'Error while extracting system views. Exiting' raise FatalException(retcode, err) # we've already done this, but new files were created so run it one time. adjust_directory_permissions(svc_user) service_setup(register_service, svc_user, svc_password)