def install(self, env): self.install_packages(env) import params env.set_params(params) setup_kms_db() self.configure(env) setup_java_patch()
def pre_rolling_restart(self, env): import params env.set_params(params) upgrade.prestart(env, "ranger-kms") setup_kms_db() kms() setup_java_patch()
def pre_upgrade_restart(self, env, upgrade_type=None): import params env.set_params(params) upgrade.prestart(env, "ranger-kms") setup_kms_db() kms() setup_java_patch()
def setup_ranger_kms_database(self, env): import params env.set_params(params) upgrade_stack = stack_select._get_upgrade_stack() if upgrade_stack is None: raise Fail('Unable to determine the stack and stack version') stack_version = upgrade_stack[1] Logger.info(format('Setting Ranger KMS database schema, using version {stack_version}')) setup_kms_db(stack_version=stack_version)
def install(self, env): self.install_packages(env) import params env.set_params(params) # taking backup of install.properties file Execute(('cp', '-f', format('{kms_home}/install.properties'), format('{kms_home}/install-backup.properties')), not_if = format('ls {kms_home}/install-backup.properties'), only_if = format('ls {kms_home}/install.properties'), sudo = True ) setup_kms_db() self.configure(env) setup_java_patch()
def setup_ranger_kms_database(self, env): import params env.set_params(params) kms.setup_kms_db()