You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by pa...@apache.org on 2016/07/12 07:20:15 UTC

ambari git commit: AMBARI-17669. Zeppelin service: add default kerberos config for shell interpreter (Renjith Kamath via pallavkul)

Repository: ambari
Updated Branches:
  refs/heads/trunk b7d76567d -> d669b9608


AMBARI-17669. Zeppelin service: add default kerberos config for shell interpreter (Renjith Kamath via pallavkul)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/d669b960
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/d669b960
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/d669b960

Branch: refs/heads/trunk
Commit: d669b9608de31e8dfb0743945ef6fe23b2c1e136
Parents: b7d7656
Author: Pallav Kulshreshtha <pa...@gmail.com>
Authored: Tue Jul 12 12:49:14 2016 +0530
Committer: Pallav Kulshreshtha <pa...@gmail.com>
Committed: Tue Jul 12 12:49:14 2016 +0530

----------------------------------------------------------------------
 .../ZEPPELIN/0.6.0.2.5/package/scripts/master.py         | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/d669b960/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
index 88ef49e..54256da 100644
--- a/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
+++ b/ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0.2.5/package/scripts/master.py
@@ -137,7 +137,7 @@ class Master(Script):
     File(format("{params.conf_dir}/hive-site.xml"), content=hive_site_xml_content,
          owner=params.zeppelin_user, group=params.zeppelin_group)
 
-    if str(params.hbase_master_hosts[0]):
+    if len(params.hbase_master_hosts) > 0:
       # copy hbase-site.xml
       hbase_site_xml_content = open("/etc/hbase/conf/hbase-site.xml").read()
       File(format("{params.conf_dir}/hbase-site.xml"), content=hbase_site_xml_content,
@@ -248,6 +248,15 @@ class Master(Script):
           notebook['properties']['zeppelin.jdbc.auth.type'] = ""
           notebook['properties']['zeppelin.jdbc.principal'] = ""
           notebook['properties']['zeppelin.jdbc.keytab.location'] = ""
+      elif notebook['group'] == 'sh':
+        if params.zeppelin_kerberos_principal and params.zeppelin_kerberos_keytab and params.security_enabled:
+          notebook['properties']['zeppelin.shell.auth.type'] = "KERBEROS"
+          notebook['properties']['zeppelin.shell.principal'] = params.zeppelin_kerberos_principal
+          notebook['properties']['zeppelin.shell.keytab.location'] = params.zeppelin_kerberos_keytab
+        else:
+          notebook['properties']['zeppelin.shell.auth.type'] = ""
+          notebook['properties']['zeppelin.shell.principal'] = ""
+          notebook['properties']['zeppelin.shell.keytab.location'] = ""
 
     self.set_interpreter_settings(config_data)