예제 #1
0
    def start(self, env, upgrade_type=None):
        import params
        env.set_params(params)

        # setup db only if in case HDP 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_audit_solr()

        # Install another solr instance for ranger audits in old style, without InfraSolr
        service_packagedir = os.path.realpath(__file__).split('/scripts')[0]
        Execute('find ' + service_packagedir +
                ' -iname "*.sh" | xargs chmod +x')
        Execute('cd ' +
                format('{service_packagedir}/scripts/solr_for_audit_setup ') +
                '&& ' + 'bash ' + './setup.sh',
                environment={'JAVA_HOME': params.java_home})
        #start another solr instance for ranger audits
        Execute(
            format('/usr/lib/solr/ranger_audit_server/scripts/start_solr.sh'),
            environment={'JAVA_HOME': params.java_home},
            user='******')

        update_password_configs()
        ranger_service('ranger_admin')
예제 #2
0
  def start(self, env, upgrade_type=None):
    import params
    env.set_params(params)

    # setup db only if in case HDP 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_audit_solr()

    update_password_configs()
    ranger_service('ranger_admin')
예제 #3
0
    def start(self, env, upgrade_type=None):
        import params
        env.set_params(params)
        self.install_ranger()
        Execute(
            "chown -R %s:%s %s" %
            (params.unix_user, params.unix_group, params.install_dir_admin))
        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')