示例#1
0
文件: deploy.py 项目: jlozadad/sahara
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)
示例#2
0
 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)
示例#3
0
文件: plugin.py 项目: Imperat/sahara
 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)
示例#4
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)]
            })