Esempio n. 1
0
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)
Esempio n. 2
0
def prepare_scaling_kerberized_cluster(cluster, cloudera_utils, instances):
    if kerberos.is_kerberos_security_enabled(cluster):
        server = None
        if not kerberos.using_existing_kdc(cluster):
            server = cloudera_utils.pu.get_manager(cluster)
        kerberos.setup_clients(cluster, server)
        kerberos.prepare_policy_files(cluster)
        # manager can correctly handle updating configs
        cloudera_utils.push_kerberos_configs(cluster)
        kerberos.create_keytabs_for_map(
            cluster,
            {'hdfs': cloudera_utils.pu.get_hdfs_nodes(cluster, instances)})
Esempio n. 3
0
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)]
            })