You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@knox.apache.org by sm...@apache.org on 2022/11/18 07:13:49 UTC

[knox] branch master updated: KNOX-2833 - Ozone integration for Apache Knox (#672)

This is an automated email from the ASF dual-hosted git repository.

smolnar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/knox.git


The following commit(s) were added to refs/heads/master by this push:
     new 1cc8cc670 KNOX-2833 - Ozone integration for Apache Knox (#672)
1cc8cc670 is described below

commit 1cc8cc6700d3012ee7e937c9c14463dbcdc7993d
Author: debiswal <11...@users.noreply.github.com>
AuthorDate: Fri Nov 18 12:43:44 2022 +0530

    KNOX-2833 - Ozone integration for Apache Knox (#672)
---
 .../cm/model/ozone/OzoneServiceModelGenerator.java |  81 +++++++++++++++++++++
 .../cm/model/ozone/ReconServiceModelGenerator.java |  80 ++++++++++++++++++++
 .../cm/model/ozone/SCMServiceModelGenerator.java   |  80 ++++++++++++++++++++
 ...way.topology.discovery.cm.ServiceModelGenerator |   4 +
 .../ozone/OzoneServiceModelGeneratorTest.java      |  54 ++++++++++++++
 .../ozone/ReconServiceModelGeneratorTest.java      |  54 ++++++++++++++
 .../model/ozone/SCMServiceModelGeneratorTest.java  |  54 ++++++++++++++
 .../services/ozone-recon/1.2.0/rewrite.xml         |  49 +++++++++++++
 .../services/ozone-recon/1.2.0/service.xml         |  30 ++++++++
 .../resources/services/ozone-scm/1.2.0/rewrite.xml |  33 +++++++++
 .../resources/services/ozone-scm/1.2.0/service.xml |  28 +++++++
 .../resources/services/ozone/1.2.0/rewrite.xml     |  32 ++++++++
 .../resources/services/ozone/1.2.0/service.xml     |  28 +++++++
 .../home/assets/service-logos/ozone-recon.png      | Bin 0 -> 40237 bytes
 .../home/assets/service-logos/ozone-scm.png        | Bin 0 -> 40237 bytes
 .../home/assets/service-logos/ozone.png            | Bin 0 -> 40237 bytes
 16 files changed, 607 insertions(+)

diff --git a/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/OzoneServiceModelGenerator.java b/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/OzoneServiceModelGenerator.java
new file mode 100644
index 000000000..b58b49e41
--- /dev/null
+++ b/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/OzoneServiceModelGenerator.java
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ */
+package org.apache.knox.gateway.topology.discovery.cm.model.ozone;
+
+import com.cloudera.api.swagger.client.ApiException;
+import com.cloudera.api.swagger.model.ApiConfigList;
+import com.cloudera.api.swagger.model.ApiRole;
+import com.cloudera.api.swagger.model.ApiService;
+import com.cloudera.api.swagger.model.ApiServiceConfig;
+import org.apache.knox.gateway.topology.discovery.cm.ServiceModel;
+import org.apache.knox.gateway.topology.discovery.cm.model.AbstractServiceModelGenerator;
+
+import java.util.Locale;
+
+public class OzoneServiceModelGenerator extends AbstractServiceModelGenerator {
+
+  public static final String SERVICE      = "OZONE";
+  public static final String SERVICE_TYPE = "OZONE";
+  public static final String ROLE_TYPE    = "OZONE_MANAGER";
+
+
+  static final String SSL_ENABLED = "ssl_enabled";
+  static final String HTTP_PORT   = "ozone.om.http-port";
+
+  static final String HTTPS_PORT  = "ozone.om.https-port";
+  @Override
+  public String getService() {
+    return SERVICE;
+  }
+
+  @Override
+  public String getServiceType() {
+    return SERVICE_TYPE;
+  }
+
+  @Override
+  public String getRoleType() {
+    return ROLE_TYPE;
+  }
+
+  @Override
+  public ServiceModel.Type getModelType() {
+    return ServiceModel.Type.UI;
+  }
+
+  @Override
+  public ServiceModel generateService(ApiService       service,
+                                      ApiServiceConfig serviceConfig,
+                                      ApiRole          role,
+                                      ApiConfigList    roleConfig) throws ApiException {
+    String hostname = role.getHostRef().getHostname();
+
+    boolean sslEnabled = Boolean.parseBoolean(getRoleConfigValue(roleConfig, SSL_ENABLED));
+    String scheme = sslEnabled ? "https" : "http";
+
+    // Role config properties
+    String httpPort = getRoleConfigValue(roleConfig, HTTP_PORT);
+    String httpsPort = getRoleConfigValue(roleConfig, HTTPS_PORT);
+    ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "%s://%s:%s",
+            scheme, hostname, sslEnabled ? httpsPort : httpPort));
+    model.addRoleProperty(getRoleType(),SSL_ENABLED, getRoleConfigValue(roleConfig, SSL_ENABLED));
+    model.addRoleProperty(getRoleType(),HTTP_PORT, httpPort);
+    model.addRoleProperty(getRoleType(),HTTPS_PORT,httpsPort);
+    return model;
+  }
+
+}
diff --git a/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/ReconServiceModelGenerator.java b/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/ReconServiceModelGenerator.java
new file mode 100644
index 000000000..78d63ecc1
--- /dev/null
+++ b/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/ReconServiceModelGenerator.java
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+package org.apache.knox.gateway.topology.discovery.cm.model.ozone;
+
+import com.cloudera.api.swagger.client.ApiException;
+import com.cloudera.api.swagger.model.ApiConfigList;
+import com.cloudera.api.swagger.model.ApiRole;
+import com.cloudera.api.swagger.model.ApiService;
+import com.cloudera.api.swagger.model.ApiServiceConfig;
+import org.apache.knox.gateway.topology.discovery.cm.ServiceModel;
+import org.apache.knox.gateway.topology.discovery.cm.model.AbstractServiceModelGenerator;
+
+import java.util.Locale;
+
+public class ReconServiceModelGenerator extends AbstractServiceModelGenerator {
+
+  public static final String SERVICE      = "OZONE-RECON";
+  public static final String SERVICE_TYPE = "OZONE";
+  public static final String ROLE_TYPE    = "OZONE_RECON";
+
+
+  static final String SSL_ENABLED = "ssl_enabled";
+  static final String HTTP_PORT   = "ozone.recon.http-port";
+
+  static final String HTTPS_PORT  = "ozone.recon.https-port";
+  @Override
+  public String getService() {
+    return SERVICE;
+  }
+
+  @Override
+  public String getServiceType() {
+    return SERVICE_TYPE;
+  }
+
+  @Override
+  public String getRoleType() {
+    return ROLE_TYPE;
+  }
+
+  @Override
+  public ServiceModel.Type getModelType() {
+    return ServiceModel.Type.UI;
+  }
+
+  @Override
+  public ServiceModel generateService(ApiService       service,
+                                      ApiServiceConfig serviceConfig,
+                                      ApiRole          role,
+                                      ApiConfigList    roleConfig) throws ApiException {
+    String hostname = role.getHostRef().getHostname();
+
+    boolean sslEnabled = Boolean.parseBoolean(getRoleConfigValue(roleConfig, SSL_ENABLED));
+    String scheme = sslEnabled ? "https" : "http";
+
+    // Role config properties
+    String httpPort = getRoleConfigValue(roleConfig, HTTP_PORT);
+    String httpsPort = getRoleConfigValue(roleConfig, HTTPS_PORT);
+    ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "%s://%s:%s",
+            scheme, hostname, sslEnabled ? httpsPort : httpPort));
+    model.addRoleProperty(getRoleType(),SSL_ENABLED, getRoleConfigValue(roleConfig, SSL_ENABLED));
+    model.addRoleProperty(getRoleType(),HTTP_PORT, httpPort);
+    model.addRoleProperty(getRoleType(),HTTPS_PORT,httpsPort);
+    return model;
+  }
+}
diff --git a/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/SCMServiceModelGenerator.java b/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/SCMServiceModelGenerator.java
new file mode 100644
index 000000000..a6c0d1072
--- /dev/null
+++ b/gateway-discovery-cm/src/main/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/SCMServiceModelGenerator.java
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ */
+package org.apache.knox.gateway.topology.discovery.cm.model.ozone;
+
+import com.cloudera.api.swagger.client.ApiException;
+import com.cloudera.api.swagger.model.ApiConfigList;
+import com.cloudera.api.swagger.model.ApiRole;
+import com.cloudera.api.swagger.model.ApiService;
+import com.cloudera.api.swagger.model.ApiServiceConfig;
+import org.apache.knox.gateway.topology.discovery.cm.ServiceModel;
+import org.apache.knox.gateway.topology.discovery.cm.model.AbstractServiceModelGenerator;
+
+import java.util.Locale;
+
+public class SCMServiceModelGenerator extends AbstractServiceModelGenerator {
+
+  public static final String SERVICE      = "OZONE-SCM";
+  public static final String SERVICE_TYPE = "OZONE";
+  public static final String ROLE_TYPE    = "STORAGE_CONTAINER_MANAGER";
+
+
+  static final String SSL_ENABLED = "ssl_enabled";
+  static final String HTTP_PORT   = "ozone.scm.http-port";
+
+  static final String HTTPS_PORT  = "ozone.scm.https-port";
+  @Override
+  public String getService() {
+    return SERVICE;
+  }
+
+  @Override
+  public String getServiceType() {
+    return SERVICE_TYPE;
+  }
+
+  @Override
+  public String getRoleType() {
+    return ROLE_TYPE;
+  }
+
+  @Override
+  public ServiceModel.Type getModelType() {
+    return ServiceModel.Type.UI;
+  }
+
+  @Override
+  public ServiceModel generateService(ApiService       service,
+                                      ApiServiceConfig serviceConfig,
+                                      ApiRole          role,
+                                      ApiConfigList    roleConfig) throws ApiException {
+    String hostname = role.getHostRef().getHostname();
+
+    boolean sslEnabled = Boolean.parseBoolean(getRoleConfigValue(roleConfig, SSL_ENABLED));
+    String scheme = sslEnabled ? "https" : "http";
+
+    // Role config properties
+    String httpPort = getRoleConfigValue(roleConfig, HTTP_PORT);
+    String httpsPort = getRoleConfigValue(roleConfig, HTTPS_PORT);
+    ServiceModel model = createServiceModel(String.format(Locale.getDefault(), "%s://%s:%s",
+            scheme, hostname, sslEnabled ? httpsPort : httpPort));
+    model.addRoleProperty(getRoleType(),SSL_ENABLED, getRoleConfigValue(roleConfig, SSL_ENABLED));
+    model.addRoleProperty(getRoleType(),HTTP_PORT,httpPort);
+    model.addRoleProperty(getRoleType(),HTTPS_PORT,httpsPort);
+    return model;
+  }
+}
diff --git a/gateway-discovery-cm/src/main/resources/META-INF/services/org.apache.knox.gateway.topology.discovery.cm.ServiceModelGenerator b/gateway-discovery-cm/src/main/resources/META-INF/services/org.apache.knox.gateway.topology.discovery.cm.ServiceModelGenerator
index 58da70ac4..72de48d17 100644
--- a/gateway-discovery-cm/src/main/resources/META-INF/services/org.apache.knox.gateway.topology.discovery.cm.ServiceModelGenerator
+++ b/gateway-discovery-cm/src/main/resources/META-INF/services/org.apache.knox.gateway.topology.discovery.cm.ServiceModelGenerator
@@ -54,4 +54,8 @@ org.apache.knox.gateway.topology.discovery.cm.model.nifi.NifiServiceModelGenerat
 org.apache.knox.gateway.topology.discovery.cm.model.nifi.NifiRegistryServiceModelGenerator
 org.apache.knox.gateway.topology.discovery.cm.model.cm.ClouderaManagerAPIServiceModelGenerator
 org.apache.knox.gateway.topology.discovery.cm.model.cm.ClouderaManagerUIServiceModelGenerator
+org.apache.knox.gateway.topology.discovery.cm.model.ozone.OzoneServiceModelGenerator
+org.apache.knox.gateway.topology.discovery.cm.model.ozone.ReconServiceModelGenerator
+org.apache.knox.gateway.topology.discovery.cm.model.ozone.SCMServiceModelGenerator
+
 
diff --git a/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/OzoneServiceModelGeneratorTest.java b/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/OzoneServiceModelGeneratorTest.java
new file mode 100644
index 000000000..c4cbfa644
--- /dev/null
+++ b/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/OzoneServiceModelGeneratorTest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+package org.apache.knox.gateway.topology.discovery.cm.model.ozone;
+
+import org.apache.knox.gateway.topology.discovery.cm.ServiceModelGenerator;
+import org.apache.knox.gateway.topology.discovery.cm.model.AbstractServiceModelGeneratorTest;
+import org.junit.Test;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+public class OzoneServiceModelGeneratorTest extends AbstractServiceModelGeneratorTest {
+
+  @Test
+  public void testServiceModelMetadata() {
+    final Map<String, String> serviceConfig = Collections.emptyMap();
+    final Map<String, String> roleConfig = new HashMap<>();
+    roleConfig.put(OzoneServiceModelGenerator.SSL_ENABLED, "true");
+    roleConfig.put(OzoneServiceModelGenerator.HTTP_PORT, "9874");
+    roleConfig.put(OzoneServiceModelGenerator.HTTPS_PORT, "9875");
+    validateServiceModel(createServiceModel(serviceConfig, roleConfig), serviceConfig, roleConfig);
+  }
+
+  @Override
+  protected String getServiceType() {
+    return OzoneServiceModelGenerator.SERVICE_TYPE;
+  }
+
+  @Override
+  protected String getRoleType() {
+    return OzoneServiceModelGenerator.ROLE_TYPE;
+  }
+
+  @Override
+  protected ServiceModelGenerator newGenerator() {
+    return new OzoneServiceModelGenerator();
+  }
+
+}
diff --git a/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/ReconServiceModelGeneratorTest.java b/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/ReconServiceModelGeneratorTest.java
new file mode 100644
index 000000000..922951f38
--- /dev/null
+++ b/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/ReconServiceModelGeneratorTest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+package org.apache.knox.gateway.topology.discovery.cm.model.ozone;
+
+import org.apache.knox.gateway.topology.discovery.cm.ServiceModelGenerator;
+import org.apache.knox.gateway.topology.discovery.cm.model.AbstractServiceModelGeneratorTest;
+import org.junit.Test;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ReconServiceModelGeneratorTest extends AbstractServiceModelGeneratorTest {
+
+  @Test
+  public void testServiceModelMetadata() {
+    final Map<String, String> serviceConfig = Collections.emptyMap();
+    final Map<String, String> roleConfig = new HashMap<>();
+    roleConfig.put(ReconServiceModelGenerator.SSL_ENABLED, "true");
+    roleConfig.put(ReconServiceModelGenerator.HTTP_PORT, "9888");
+    roleConfig.put(ReconServiceModelGenerator.HTTPS_PORT, "9889");
+    validateServiceModel(createServiceModel(serviceConfig, roleConfig), serviceConfig, roleConfig);
+  }
+
+  @Override
+  protected String getServiceType() {
+    return ReconServiceModelGenerator.SERVICE_TYPE;
+  }
+
+  @Override
+  protected String getRoleType() {
+    return ReconServiceModelGenerator.ROLE_TYPE;
+  }
+
+  @Override
+  protected ServiceModelGenerator newGenerator() {
+    return new ReconServiceModelGenerator();
+  }
+
+}
diff --git a/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/SCMServiceModelGeneratorTest.java b/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/SCMServiceModelGeneratorTest.java
new file mode 100644
index 000000000..8df241722
--- /dev/null
+++ b/gateway-discovery-cm/src/test/java/org/apache/knox/gateway/topology/discovery/cm/model/ozone/SCMServiceModelGeneratorTest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ */
+package org.apache.knox.gateway.topology.discovery.cm.model.ozone;
+
+import org.apache.knox.gateway.topology.discovery.cm.ServiceModelGenerator;
+import org.apache.knox.gateway.topology.discovery.cm.model.AbstractServiceModelGeneratorTest;
+import org.junit.Test;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+public class SCMServiceModelGeneratorTest extends AbstractServiceModelGeneratorTest {
+
+  @Test
+  public void testServiceModelMetadata() {
+    final Map<String, String> serviceConfig = Collections.emptyMap();
+    final Map<String, String> roleConfig = new HashMap<>();
+    roleConfig.put(SCMServiceModelGenerator.SSL_ENABLED, "true");
+    roleConfig.put(SCMServiceModelGenerator.HTTP_PORT, "9876");
+    roleConfig.put(SCMServiceModelGenerator.HTTPS_PORT, "9877");
+    validateServiceModel(createServiceModel(serviceConfig, roleConfig), serviceConfig, roleConfig);
+  }
+
+  @Override
+  protected String getServiceType() {
+    return SCMServiceModelGenerator.SERVICE_TYPE;
+  }
+
+  @Override
+  protected String getRoleType() {
+    return SCMServiceModelGenerator.ROLE_TYPE;
+  }
+
+  @Override
+  protected ServiceModelGenerator newGenerator() {
+    return new SCMServiceModelGenerator();
+  }
+
+}
diff --git a/gateway-service-definitions/src/main/resources/services/ozone-recon/1.2.0/rewrite.xml b/gateway-service-definitions/src/main/resources/services/ozone-recon/1.2.0/rewrite.xml
new file mode 100644
index 000000000..e84189aae
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/ozone-recon/1.2.0/rewrite.xml
@@ -0,0 +1,49 @@
+<!--
+   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>
+    <rule dir="IN" name="OZONE-RECON/rule/inbound" pattern="*://*:*/**/ozone-recon/{recon_path=**}?{**}">
+        <rewrite template="{$serviceUrl[OZONE-RECON]}/{recon_path=**}?{**}"/>
+    </rule>
+
+
+    <rule dir="OUT" name="OZONE-RECON/rule/static" pattern="/static/{**}">
+        <rewrite template="{gateway.url}/ozone-recon/static/{**}"/>
+    </rule>
+    <rule dir="OUT" name="OZONE-RECON/rule/manifest" pattern="/manifest.json">
+        <rewrite template="{gateway.url}/ozone-recon/manifest.json"/>
+    </rule>
+    <rule dir="OUT" name="OZONE-RECON/rule/favicon" pattern="/favicon.ico">
+        <rewrite template="{gateway.url}/ozone-recon/favicon.ico"/>
+    </rule>
+
+    <rule dir="OUT" name="OZONE-RECON/rule/media" pattern="/static/media/{**}">
+        <rewrite template="{$frontend[gateway.name]}/{$frontend[topology]}/ozone-recon/static/media/{**}"/>
+    </rule>
+    <rule dir="OUT" name="OZONE-RECON/rule/api" pattern="/api/v1/{**}">
+        <rewrite template="{gateway.url}/ozone-recon/api/v1/{**}"/>
+    </rule>
+
+
+    <filter name="OZONE-RECON/filter/staticLinks">
+        <content type="application/javascript">
+            <apply path="static/media/.*\.png" rule="OZONE-RECON/rule/media"/>
+            <apply path="/api/v1/[\w]+" rule="OZONE-RECON/rule/api"/>
+        </content>
+    </filter>
+</rules>
+
+
diff --git a/gateway-service-definitions/src/main/resources/services/ozone-recon/1.2.0/service.xml b/gateway-service-definitions/src/main/resources/services/ozone-recon/1.2.0/service.xml
new file mode 100644
index 000000000..7e21e20ed
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/ozone-recon/1.2.0/service.xml
@@ -0,0 +1,30 @@
+<!--
+   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="OZONE-RECON" name="ozone-recon" version="1.2.0">
+    <metadata>
+        <type>UI</type>
+        <context>/ozone-recon/index.html</context>
+        <shortDesc>OZONE Recon UI</shortDesc>
+    </metadata>
+    <routes>
+        <route path="/ozone-recon"/>
+        <route path="/ozone-recon/**"/>
+        <route path="/ozone-recon/static/js/**">
+	        <rewrite apply="OZONE-RECON/filter/staticLinks" to="response.body"/>
+        </route>
+    </routes>
+</service>
diff --git a/gateway-service-definitions/src/main/resources/services/ozone-scm/1.2.0/rewrite.xml b/gateway-service-definitions/src/main/resources/services/ozone-scm/1.2.0/rewrite.xml
new file mode 100644
index 000000000..836b12a2e
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/ozone-scm/1.2.0/rewrite.xml
@@ -0,0 +1,33 @@
+<!--
+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>
+    <rule dir="IN" name="OZONE-SCM/rule/inbound" pattern="*://*:*/**/ozone-scm/{path=**}?{**}">
+        <rewrite template="{$serviceUrl[OZONE-SCM]}/{path=**}?{**}"/>
+    </rule>
+    <rule dir="OUT" name="OZONE-SCM/rule/docs">
+        <rewrite template="{gateway.url}/ozone-scm/docs/index.html"/>
+    </rule>
+
+    <filter name="OZONE-SCM/filter/doc">
+        <content type="text/html">
+            <apply path="/docs" rule="OZONE-SCM/rule/docs"/>
+        </content>
+    </filter>
+</rules>
+
diff --git a/gateway-service-definitions/src/main/resources/services/ozone-scm/1.2.0/service.xml b/gateway-service-definitions/src/main/resources/services/ozone-scm/1.2.0/service.xml
new file mode 100644
index 000000000..ee146b220
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/ozone-scm/1.2.0/service.xml
@@ -0,0 +1,28 @@
+<!--
+   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="OZONE-SCM" name="ozone-scm" version="1.2.0">
+	<metadata>
+		<type>UI</type>
+		<context>/ozone-scm/index.html?host={{BACKEND_HOST}}</context>
+		<shortDesc>OZONE SCM UI</shortDesc>
+	</metadata>
+	<routes>
+      <route path="/ozone-scm/**">
+         <rewrite apply="OZONE-SCM/filter/doc" to="response.body"/>
+      </route>
+	</routes>
+</service>
diff --git a/gateway-service-definitions/src/main/resources/services/ozone/1.2.0/rewrite.xml b/gateway-service-definitions/src/main/resources/services/ozone/1.2.0/rewrite.xml
new file mode 100644
index 000000000..2f2d5dfd9
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/ozone/1.2.0/rewrite.xml
@@ -0,0 +1,32 @@
+<!--
+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>
+    <rule dir="IN" name="OZONE/ozone/inbound" pattern="*://*:*/**/ozone/{path=**}?{**}">
+        <rewrite template="{$serviceUrl[OZONE]}/{path=**}?{**}"/>
+    </rule>
+    <rule dir="OUT" name="OZONE/ozoneManager/docs">
+        <rewrite template="{gateway.url}/ozone/docs/index.html"/>
+    </rule>
+
+    <filter name="OZONE/ozoneManager/doc">
+        <content type="text/html">
+            <apply path="/docs" rule="OZONE/ozoneManager/docs"/>
+        </content>
+    </filter>
+</rules>
diff --git a/gateway-service-definitions/src/main/resources/services/ozone/1.2.0/service.xml b/gateway-service-definitions/src/main/resources/services/ozone/1.2.0/service.xml
new file mode 100644
index 000000000..45b6f9af0
--- /dev/null
+++ b/gateway-service-definitions/src/main/resources/services/ozone/1.2.0/service.xml
@@ -0,0 +1,28 @@
+<!--
+   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="OZONE" name="ozone" version="1.2.0">
+	<metadata>
+		<type>UI</type>
+		<context>/ozone/index.html?host={{BACKEND_HOST}}</context>
+		<shortDesc>OZONE Manager UI</shortDesc>
+	</metadata>
+	<routes>
+      <route path="/ozone/**">
+         <rewrite apply="OZONE/ozoneManager/doc" to="response.body"/>
+      </route>
+	</routes>
+</service>
diff --git a/knox-homepage-ui/home/assets/service-logos/ozone-recon.png b/knox-homepage-ui/home/assets/service-logos/ozone-recon.png
new file mode 100644
index 000000000..cdc8e4e73
Binary files /dev/null and b/knox-homepage-ui/home/assets/service-logos/ozone-recon.png differ
diff --git a/knox-homepage-ui/home/assets/service-logos/ozone-scm.png b/knox-homepage-ui/home/assets/service-logos/ozone-scm.png
new file mode 100644
index 000000000..cdc8e4e73
Binary files /dev/null and b/knox-homepage-ui/home/assets/service-logos/ozone-scm.png differ
diff --git a/knox-homepage-ui/home/assets/service-logos/ozone.png b/knox-homepage-ui/home/assets/service-logos/ozone.png
new file mode 100644
index 000000000..cdc8e4e73
Binary files /dev/null and b/knox-homepage-ui/home/assets/service-logos/ozone.png differ