You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rk...@apache.org on 2017/02/21 12:36:09 UTC

[1/2] ambari git commit: AMBARI-19988: configure Knox proxy for Zeppelin in Ambari out-of-the-box (Prabhjyot Singh via r-kamath)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 ef0cf9c4e -> 70ef0d04c
  refs/heads/trunk 299b05033 -> f1c96e5d0


AMBARI-19988: configure Knox proxy for Zeppelin in Ambari out-of-the-box (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/branch-2.5
Commit: 70ef0d04c937108438ca601ff7f22ab98cd580d4
Parents: ef0cf9c
Author: Renjith Kamath <re...@gmail.com>
Authored: Tue Feb 21 18:01:36 2017 +0530
Committer: Renjith Kamath <re...@gmail.com>
Committed: Tue Feb 21 18:01:36 2017 +0530

----------------------------------------------------------------------
 .../KNOX/0.5.0.2.2/configuration/gateway-site.xml        |  6 ++++++
 .../KNOX/0.5.0.2.2/package/scripts/params_linux.py       | 11 +++++++++++
 .../HDP/2.6/services/KNOX/configuration/topology.xml     | 10 ++++++++++
 3 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/70ef0d04/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
index 3837019..ad599e0 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
@@ -62,4 +62,10 @@ limitations under the License.
     <description>Boolean flag indicating whether to enable debug messages for krb5 authentication</description>
     <on-ambari-upgrade add="true"/>
   </property>
+  <property>
+    <name>gateway.websocket.feature.enabled</name>
+    <value>{{websocket_support}}</value>
+    <description>Enable this if you want websocket support</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/70ef0d04/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
index febede3..ce87d1c 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
@@ -438,3 +438,14 @@ if "druid-router" in config['configurations']:
   port = config['configurations']['druid-router']['druid.port']
   for host in config['clusterHostInfo']['druid_router_hosts']:
     druid_router_urls += buildUrlElement("http", host, port, "")
+
+zeppelin_ui_urls = ""
+zeppelin_ws_urls = ""
+websocket_support = "false"
+if "zeppelin-config" in config['configurations']:
+  port = config['configurations']['zeppelin-config']['zeppelin.server.port']
+  protocol = "https" if config['configurations']['zeppelin-config']['zeppelin.ssl'] else "http"
+  host = config['clusterHostInfo']['zeppelin_master_hosts'][0]
+  zeppelin_ui_urls += buildUrlElement(protocol, host, port, "")
+  zeppelin_ws_urls += buildUrlElement("ws", host, port, "/ws")
+  websocket_support = "true"

http://git-wip-us.apache.org/repos/asf/ambari/blob/70ef0d04/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
index 6862e4d..df4c1b4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
@@ -143,6 +143,16 @@
                 {{druid_broker_urls}}
             &lt;/service&gt;
 
+            &lt;service&gt;
+                &lt;role&gt;ZEPPELINUI&lt;/role&gt;
+                {{zeppelin_ui_urls}}
+            &lt;/service&gt;
+
+            &lt;service&gt;
+                &lt;role&gt;ZEPPELINWS&lt;/role&gt;
+                {{zeppelin_ws_urls}}
+            &lt;/service&gt;
+
         &lt;/topology&gt;
     </value>
     <description>


[2/2] ambari git commit: AMBARI-19988: configure Knox proxy for Zeppelin in Ambari out-of-the-box (Prabhjyot Singh via r-kamath)

Posted by rk...@apache.org.
AMBARI-19988: configure Knox proxy for Zeppelin in Ambari out-of-the-box (Prabhjyot Singh via r-kamath)


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

Branch: refs/heads/trunk
Commit: f1c96e5d095580183519afe04e42af6ad8c7c897
Parents: 299b050
Author: Renjith Kamath <re...@gmail.com>
Authored: Tue Feb 21 18:01:36 2017 +0530
Committer: Renjith Kamath <re...@gmail.com>
Committed: Tue Feb 21 18:05:42 2017 +0530

----------------------------------------------------------------------
 .../KNOX/0.5.0.2.2/configuration/gateway-site.xml        |  6 ++++++
 .../KNOX/0.5.0.2.2/package/scripts/params_linux.py       | 11 +++++++++++
 .../HDP/2.6/services/KNOX/configuration/topology.xml     | 10 ++++++++++
 3 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c96e5d/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
index 3837019..ad599e0 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/configuration/gateway-site.xml
@@ -62,4 +62,10 @@ limitations under the License.
     <description>Boolean flag indicating whether to enable debug messages for krb5 authentication</description>
     <on-ambari-upgrade add="true"/>
   </property>
+  <property>
+    <name>gateway.websocket.feature.enabled</name>
+    <value>{{websocket_support}}</value>
+    <description>Enable this if you want websocket support</description>
+    <on-ambari-upgrade add="true"/>
+  </property>
 </configuration>

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c96e5d/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
index 9b61a5f..8beb2c0 100644
--- a/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
+++ b/ambari-server/src/main/resources/common-services/KNOX/0.5.0.2.2/package/scripts/params_linux.py
@@ -437,3 +437,14 @@ if "druid-router" in config['configurations']:
   port = config['configurations']['druid-router']['druid.port']
   for host in config['clusterHostInfo']['druid_router_hosts']:
     druid_router_urls += buildUrlElement("http", host, port, "")
+
+zeppelin_ui_urls = ""
+zeppelin_ws_urls = ""
+websocket_support = "false"
+if "zeppelin-config" in config['configurations']:
+  port = config['configurations']['zeppelin-config']['zeppelin.server.port']
+  protocol = "https" if config['configurations']['zeppelin-config']['zeppelin.ssl'] else "http"
+  host = config['clusterHostInfo']['zeppelin_master_hosts'][0]
+  zeppelin_ui_urls += buildUrlElement(protocol, host, port, "")
+  zeppelin_ws_urls += buildUrlElement("ws", host, port, "/ws")
+  websocket_support = "true"

http://git-wip-us.apache.org/repos/asf/ambari/blob/f1c96e5d/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml b/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
index 6862e4d..df4c1b4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.6/services/KNOX/configuration/topology.xml
@@ -143,6 +143,16 @@
                 {{druid_broker_urls}}
             &lt;/service&gt;
 
+            &lt;service&gt;
+                &lt;role&gt;ZEPPELINUI&lt;/role&gt;
+                {{zeppelin_ui_urls}}
+            &lt;/service&gt;
+
+            &lt;service&gt;
+                &lt;role&gt;ZEPPELINWS&lt;/role&gt;
+                {{zeppelin_ws_urls}}
+            &lt;/service&gt;
+
         &lt;/topology&gt;
     </value>
     <description>