knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lmc...@apache.org
Subject knox git commit: KNOX-975 - Add NodeManager Service Definition
Date Fri, 21 Jul 2017 20:03:13 GMT
Repository: knox
Updated Branches:
  refs/heads/master 3d2901be4 -> edecb857a


KNOX-975 - Add NodeManager Service Definition

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

Branch: refs/heads/master
Commit: edecb857a6c01886103361577713cc308d8ad201
Parents: 3d2901b
Author: Larry McCay <lmccay@hortonworks.com>
Authored: Fri Jul 21 16:02:05 2017 -0400
Committer: Larry McCay <lmccay@hortonworks.com>
Committed: Fri Jul 21 16:02:05 2017 -0400

----------------------------------------------------------------------
 .../services/nodemanagerui/2.7.1/rewrite.xml    | 121 +++++++++++++++++++
 .../services/nodemanagerui/2.7.1/service.xml    |  34 ++++++
 2 files changed, 155 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/edecb857/gateway-service-definitions/src/main/resources/services/nodemanagerui/2.7.1/rewrite.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/nodemanagerui/2.7.1/rewrite.xml
b/gateway-service-definitions/src/main/resources/services/nodemanagerui/2.7.1/rewrite.xml
new file mode 100644
index 0000000..d288eca
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/nodemanagerui/2.7.1/rewrite.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<rules>
+<!-- Inbound rules -->
+<!-- Resource manager routing in rules -->
+<!--
+     {$frontend[url] is used through the rewrite and is it equivalent to {$serviceUrl[NODEUI]},
 this the endpoint url for the service.
+     e.g. http://host.com:8042
+-->
+
+<rule dir="IN" name="NODEUI/logs" pattern="*://*:*/**/node/logs/?{host}?{port}">
+    <rewrite template="{$serviceScheme[NODEUI]}://{host}:{port}/logs/"/>
+</rule>
+<rule dir="IN" name="NODEUI/logs2" pattern="*://*:*/**/node/logs/{**}?{host}?{port}">
+    <rewrite template="{$serviceScheme[NODEUI]}://{host}:{port}/logs/{**}"/>
+</rule>
+<rule dir="IN" name="NODEUI/node/root1" pattern="*://*:*/**/node/?{host}?{port}">
+    <rewrite template="{$serviceScheme[NODEUI]}://{host}:{port}/node"/>
+</rule>
+<rule dir="IN" name="NODEUI/node/root2" pattern="*://*:*/**/node?{host}?{port}">
+    <rewrite template="{$serviceScheme[NODEUI]}://{host}:{port}/node"/>
+</rule>
+<rule dir="IN" name="NODEUI/node/path" pattern="*://*:*/**/node/{**}?{host}?{port}">
+     <rewrite template="{$serviceScheme[NODEUI]}://{host}:{port}/node/{**}?{host}?{port}"/>
+</rule>
+<rule dir="IN" name="NODEUI/node/query" pattern="*://*:*/**/{**}?{**}?{host}">
+    <rewrite template="{$serviceUrl[NODEUI]}/node/{**}?{**}"/>
+</rule>
+<rule dir="IN" name="NODEUI/node/static1" pattern="*://*:*/**/node/static/{**}?{host}?{port}">
+    <rewrite template="{$serviceUrl[NODEUI]}/static/{**}?{host}?{port}"/>
+</rule>
+<rule dir="IN" name="NODEUI/node/static2" pattern="*://*:*/**/node/static/{**}">
+    <rewrite template="{$serviceUrl[NODEUI]}/static/{**}"/>
+</rule>
+
+<rule dir="IN" name="nodeconf" pattern="*://*:*/**/node/conf?{host}">
+    <rewrite template="{$serviceUrl[NODEUI]}/conf"/>
+</rule>
+
+<!-- Node manager Thread Server stacks inbound routing -->
+<rule dir="IN" name="NODEUI/node/inbound/stacks" pattern="*://*:*/**/node/stacks?{host}">
+    <rewrite template="{$serviceUrl[NODEUI]}/stacks"/>
+</rule>
+<rule dir="IN" name="NODEUI/node/inbound/metrics" pattern="*://*:*/**/node/metrics?{host}">
+    <rewrite template="{$serviceUrl[NODEUI]}/metrics"/>
+</rule>
+<!-- Node manageNode manager Resource Manager server Metrics JMX inbound routing -->
+<rule dir="IN" name="NODEUI/node/inbound/jmx" pattern="*://*:*/**/node/jmx?{host}">
+    <rewrite template="{$serviceUrl[NODEUI]}/jmx"/>
+</rule>
+<rule dir="IN" name="NODEUI/node/inbound/jmx/query" pattern="*://*:*/**/node/jmx?{**}?{host}">
+    <rewrite template="{$serviceUrl[NODEUI]}/jmx?{**}"/>
+</rule>
+
+<rule dir="OUT" name="NODEUI/node/out/containerlogs" pattern="*://*:*/**/node/containerlogs/{**}?{**}">
+    <rewrite template="{$frontend[url]/node/{**}?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
+</rule>
+
+<rule dir="OUT" name="NODEUI/node/static" pattern="/static/{**}">
+    <rewrite template="{$frontend[url]}/node/static/{**}?host={$inboundurl[host]}"/>
+</rule>
+<rule dir="OUT" name="NODEUI/node/static" pattern="/static/{**}?{**}">
+    <rewrite template="{$frontend[url]}/node/static/{**}?host={$inboundurl[host]}?{**}"/>
+</rule>
+<rule dir="OUT" name="NODEUI/node/nodemanager" pattern="/node/{**}">
+    <rewrite template="{$frontend[url]}/node/{**}?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
+</rule>
+<rule dir="OUT" name="nodeconfOut" pattern="/conf">
+    <rewrite template="{$frontend[url]}/node/conf?host={$inboundurl[host]}"/>
+</rule>
+<rule dir="OUT" name="nodelogsOut" pattern="/logs">
+    <rewrite template="{$frontend[url]}/node/logs/?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
+</rule>
+<rule dir="OUT" name="nodelogsOut" pattern="/node/{**}">
+    <rewrite template="{$frontend[url]}/node/{**}?host={$inboundurl[host]}"/>
+</rule>
+
+<rule dir="OUT" name="NODEUI/node/outbound/stacks" pattern="/stacks">
+    <rewrite template="{$frontend[url]}/node/stacks?host={$inboundurl[host]}"/>
+</rule>
+    <rule dir="OUT" name="NODEUI/node/outbound/metrics" pattern="/metrics">
+    <rewrite template="{$frontend[url]}/node/metrics?host={$inboundurl[host]}"/>
+</rule>
+<rule dir="OUT" name="NODEUI/node/outbound/jmx" pattern="/jmx?{**}">
+    <rewrite template="{$frontend[url]}/node/jmx?{**}?host={$inboundurl[host]}"/>
+</rule>
+
+<rule dir="OUT" name="NODEUI/nodelink" pattern="{scheme}://{host}:{port}">
+    <rewrite template="{gateway.scheme}://{gateway.host}:{gateway.port}/gateway/yarnui/yarn/"/>
+</rule>
+
+<rule dir="OUT" name="NODEUI/logfiles" pattern="/logs/{**}">
+    <rewrite template="{$frontend[url]}/node/logs/{**}?host={$inboundurl[host]}?port={$inboundurl[port]}"/>
+</rule>
+
+<!-- rewrites XML content from configuration link -->
+<filter name="NODEUI/configuration">
+    <content type="*/xml">
+        <buffer path="/configuration/property"/>
+    </content>
+</filter>
+<rule dir="OUT" name="NODEUI/NODE/inbound/jobhistory/logs" pattern="*1; url=*://*:*/jobhistory/logs/{**}">
+    <rewrite template="1; url=/gateway/jobstoryui/jobstory/jobhistory/logs/{**}"/>
+</rule>
+
+</rules>

http://git-wip-us.apache.org/repos/asf/knox/blob/edecb857/gateway-service-definitions/src/main/resources/services/nodemanagerui/2.7.1/service.xml
----------------------------------------------------------------------
diff --git a/gateway-service-definitions/src/main/resources/services/nodemanagerui/2.7.1/service.xml
b/gateway-service-definitions/src/main/resources/services/nodemanagerui/2.7.1/service.xml
new file mode 100644
index 0000000..711b48c
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/nodemanagerui/2.7.1/service.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one or more
+   contributor license agreements.  See the NOTICE file distributed with
+   this work for additional information regarding copyright ownership.
+   The ASF licenses this file to You under the Apache License, Version 2.0
+   (the "License"); you may not use this file except in compliance with
+   the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+-->
+<service role="NODEUI" name="nodeui" version="2.7.1">
+    <routes>
+        <route path="/node/">
+            <rewrite apply="NODEUI/node/root" to="response.body"/>
+        </route>
+        <route path="/node/**">
+            <rewrite apply="NODEUI/node/path" to="response.body"/>
+        </route>
+        <route path="/node/**?**">
+            <rewrite apply="NODEUI/node/query" to="response.body"/>
+        </route>
+        <route path="/node/conf">
+            <rewrite apply="NODEUI/configuration" to="response.body"/>
+        </route>
+
+    </routes>
+</service>


Mime
View raw message