def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) upgrade.prestart(env, "ranger-admin") if params.xml_configurations_supported: from setup_ranger_xml import ranger, setup_ranger_db, setup_java_patch ranger('ranger_admin', upgrade_type=upgrade_type) setup_ranger_db(upgrade_type=upgrade_type) setup_java_patch(upgrade_type=upgrade_type) self.set_ru_rangeradmin_in_progress()
def install(self, env): self.install_packages(env) import params env.set_params(params) if params.xml_configurations_supported: from setup_ranger_xml import setup_ranger_db setup_ranger_db() self.configure(env) if params.xml_configurations_supported: from setup_ranger_xml import setup_java_patch setup_java_patch()
def pre_rolling_restart(self, env): import params env.set_params(params) upgrade.prestart(env, "ranger-admin") if params.xml_configurations_supported: from setup_ranger_xml import ranger, setup_ranger_db, setup_java_patch ranger('ranger_admin', rolling_upgrade=True) setup_ranger_db(rolling_upgrade=True) setup_java_patch(rolling_upgrade=True) self.set_ru_rangeradmin_in_progress()
def configure(self, env, upgrade_type=None, setup_db=False): import params env.set_params(params) if params.xml_configurations_supported: from setup_ranger_xml import ranger else: from setup_ranger import ranger # set up db if we are not upgrading and setup_db is true if setup_db and upgrade_type is None: if params.xml_configurations_supported: from setup_ranger_xml import setup_ranger_db setup_ranger_db() ranger('ranger_admin', upgrade_type=upgrade_type) # set up java patches if we are not upgrading and setup_db is true if setup_db and upgrade_type is None: if params.xml_configurations_supported: from setup_ranger_xml import setup_java_patch setup_java_patch() if params.stack_supports_ranger_admin_password_change: setup_ranger_admin_passwd_change()
def setup_ranger_java_patches(self, env): import params env.set_params(params) setup_ranger_xml.setup_java_patch()