You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sm...@apache.org on 2016/11/08 00:48:59 UTC
ambari git commit: AMBARI-18758. Livy configuration change for
upgrade (Jeff Zhang via smohanty)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 dce90ea23 -> 370300036
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/37030003
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/37030003
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/37030003
Branch: refs/heads/branch-2.5
Commit: 370300036408d3899018f0eb2604656830c4fb7a
Parents: dce90ea
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:48:37 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/37030003/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 bc9edec..2ae67c4 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
@@ -232,8 +232,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/37030003/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"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}