You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/11/08 20:25:22 UTC
[14/22] ambari git commit: AMBARI-18758. Livy configuration change
for upgrade (Jeff Zhang via smohanty)
AMBARI-18758. Livy configuration change for upgrade (Jeff Zhang via smohanty)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ffad4a36
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ffad4a36
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ffad4a36
Branch: refs/heads/branch-feature-AMBARI-18634
Commit: ffad4a36f1e8f9e43e28c92767acea88b3a926cc
Parents: 3ec7df1
Author: Sumit Mohanty <sm...@hortonworks.com>
Authored: Mon Nov 7 16:48:37 2016 -0800
Committer: Sumit Mohanty <sm...@hortonworks.com>
Committed: Mon Nov 7 16:49:26 2016 -0800
----------------------------------------------------------------------
.../SPARK/1.2.1/package/scripts/params.py | 10 +-
.../stacks/HDP/2.6/services/SPARK/kerberos.json | 126 +++++++++++++++++++
2 files changed, 134 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/ffad4a36/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
index 3a1c482..82cd0b2 100644
--- a/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/SPARK/1.2.1/package/scripts/params.py
@@ -231,8 +231,14 @@ if stack_version_formatted and check_stack_feature(StackFeature.SPARK_LIVY, stac
livy_log4j_properties = config['configurations']['livy-log4j-properties']['content']
livy_spark_blacklist_properties = config['configurations']['livy-spark-blacklist']['content']
- livy_kerberos_keytab = config['configurations']['livy-conf']['livy.server.kerberos.keytab']
- livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.kerberos.principal']
+ if 'livy.server.kerberos.keytab' in config['configurations']['livy-conf']:
+ livy_kerberos_keytab = config['configurations']['livy-conf']['livy.server.kerberos.keytab']
+ else:
+ livy_kerberos_keytab = config['configurations']['livy-conf']['livy.server.launch.kerberos.keytab']
+ if 'livy.server.kerberos.principal' in config['configurations']['livy-conf']:
+ livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.kerberos.principal']
+ else:
+ livy_kerberos_principal = config['configurations']['livy-conf']['livy.server.launch.kerberos.principal']
livy_livyserver_hosts = default("/clusterHostInfo/livy_server_hosts", [])
http://git-wip-us.apache.org/repos/asf/ambari/blob/ffad4a36/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/kerberos.json
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/kerberos.json b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/kerberos.json
new file mode 100644
index 0000000..0689e7f
--- /dev/null
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/SPARK/kerberos.json
@@ -0,0 +1,126 @@
+{
+ "services": [
+ {
+ "name": "SPARK",
+ "identities": [
+ {
+ "name": "/smokeuser"
+ },
+ {
+ "name": "sparkuser",
+ "principal": {
+ "value": "${spark-env/spark_user}-${cluster_name|toLower()}@${realm}",
+ "type" : "user",
+ "configuration": "spark-defaults/spark.history.kerberos.principal",
+ "local_username" : "${spark-env/spark_user}"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/spark.headless.keytab",
+ "owner": {
+ "name": "${spark-env/spark_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "spark-defaults/spark.history.kerberos.keytab"
+ }
+ },
+ {
+ "name": "livyuser",
+ "principal": {
+ "value": "${livy-env/livy_user}/_HOST@${realm}",
+ "type" : "service",
+ "configuration": "livy-conf/livy.server.launch.kerberos.principal",
+ "local_username": "${livy-env/livy_user}"
+ },
+ "keytab": {
+ "file": "${keytab_dir}/livy.service.keytab",
+ "owner": {
+ "name": "${livy-env/livy_user}",
+ "access": "r"
+ },
+ "group": {
+ "name": "${cluster-env/user_group}",
+ "access": ""
+ },
+ "configuration": "livy-conf/livy.server.launch.kerberos.keytab"
+ }
+ },
+ {
+ "name": "livy_spnego",
+ "reference": "/spnego",
+ "principal": {
+ "configuration": "livy-conf/livy.server.auth.kerberos.principal"
+ },
+ "keytab": {
+ "configuration": "livy-conf/livy.server.auth.kerberos.keytab"
+ }
+ }
+ ],
+ "configurations": [
+ {
+ "spark-defaults": {
+ "spark.history.kerberos.enabled": "true"
+ }
+ },
+ {
+ "spark-thrift-sparkconf": {
+ "spark.yarn.keytab": "${spark-env/hive_kerberos_keytab}",
+ "spark.yarn.principal": "${spark-env/hive_kerberos_principal}"
+ }
+ },
+ {
+ "livy-conf": {
+ "livy.server.auth.type": "kerberos",
+ "livy.impersonation.enabled": "true",
+ "livy.superusers": "zeppelin-${cluster_name}"
+ }
+ },
+ {
+ "core-site": {
+ "hadoop.proxyuser.${livy-env/livy_user}.groups": "*",
+ "hadoop.proxyuser.${livy-env/livy_user}.hosts": "*"
+ }
+ }
+ ],
+ "components": [
+ {
+ "name": "SPARK_JOBHISTORYSERVER",
+ "identities": [
+ {
+ "name": "hdfs",
+ "reference": "/HDFS/NAMENODE/hdfs"
+ }
+ ]
+ },
+ {
+ "name": "SPARK_CLIENT"
+ },
+ {
+ "name": "SPARK_THRIFTSERVER",
+ "identities": [
+ {
+ "name": "hdfs",
+ "reference": "/HDFS/NAMENODE/hdfs"
+ },
+ {
+ "name": "hive_server_hive",
+ "reference": "/HIVE/HIVE_SERVER/hive_server_hive"
+ }
+ ]
+ },
+ {
+ "name": "LIVY_SERVER",
+ "identities": [
+ {
+ "name": "hdfs",
+ "reference": "/HDFS/NAMENODE/hdfs"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}