def install(self, env): self.install_packages(env) self.install_ranger() import params env.set_params(params) setup_ranger_xml.validate_user_password('rangertagsync_user_password') setup_ranger_xml.ranger_credential_helper( params.tagsync_cred_lib, 'tagadmin.user.password', params.rangertagsync_user_password, params.tagsync_jceks_path) File(params.tagsync_jceks_path, owner=params.unix_user, group=params.unix_group, only_if=format("test -e {tagsync_jceks_path}"), mode=0640) setup_ranger_xml.update_dot_jceks_crc_ownership( credential_provider_path=params.tagsync_jceks_path, user=params.unix_user, group=params.unix_group) if params.stack_supports_ranger_tagsync_ssl_xml_support: Logger.info( "Stack support Atlas user for Tagsync, creating keystore for same." ) self.create_atlas_user_keystore(env) else: Logger.info( "Stack does not support Atlas user for Tagsync, skipping keystore creation for same." )
def install(self, env): self.install_packages(env) import params env.set_params(params) setup_ranger_xml.validate_user_password('rangerusersync_user_password') if params.stack_supports_usersync_passwd: setup_ranger_xml.ranger_credential_helper( params.ugsync_cred_lib, params.ugsync_policymgr_alias, params.rangerusersync_user_password, params.ugsync_policymgr_keystore) File(params.ugsync_policymgr_keystore, owner=params.unix_user, group=params.unix_group, mode=0640)
def start(self, env, upgrade_type=None): import params env.set_params(params) if upgrade_type is None: setup_ranger_xml.validate_user_password() # setup db only if in case stack version is > 2.6 self.configure(env, upgrade_type=upgrade_type, setup_db=params.stack_supports_ranger_setup_db_on_start) if params.stack_supports_infra_client and params.audit_solr_enabled and params.is_solrCloud_enabled: solr_cloud_util.setup_solr_client(params.config, custom_log4j=params.custom_log4j) setup_ranger_xml.setup_ranger_audit_solr() setup_ranger_xml.update_password_configs() ranger_service('ranger_admin')