def _prepare_kerberos(cluster, instances=None): if instances is None: kerberos.deploy_infrastructure(cluster, get_kdc_server(cluster)) kerberos.prepare_policy_files(cluster) else: server = None if not kerberos.using_existing_kdc(cluster): server = get_kdc_server(cluster) kerberos.setup_clients(cluster, server) kerberos.prepare_policy_files(cluster)
def deploy_kerberos(self, cluster): all_instances = plugin_utils.get_instances(cluster) namenodes = plugin_utils.get_instances(cluster, 'namenode') server = None if len(namenodes) > 0: server = namenodes[0] elif len(all_instances) > 0: server = all_instances[0] if server: krb.deploy_infrastructure(cluster, server)
def setup_kerberos_for_cluster(cluster, cloudera_utils): if kerberos.is_kerberos_security_enabled(cluster): manager = cloudera_utils.pu.get_manager(cluster) kerberos.deploy_infrastructure(cluster, manager) cloudera_utils.full_cluster_stop(cluster) kerberos.prepare_policy_files(cluster) cloudera_utils.push_kerberos_configs(cluster) cloudera_utils.full_cluster_start(cluster) kerberos.create_keytabs_for_map( cluster, { 'hdfs': cloudera_utils.pu.get_hdfs_nodes(cluster), 'spark': [cloudera_utils.pu.get_spark_historyserver(cluster)] })