Merge "Change dmaap hostname for integration with oam"
authorJohn Keeney <john.keeney@est.tech>
Tue, 8 Jun 2021 09:24:26 +0000 (09:24 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Tue, 8 Jun 2021 09:24:26 +0000 (09:24 +0000)
docs/developer-guide.rst
docs/index.rst
docs/installation-guide.rst [new file with mode: 0644]
docs/overview.rst
enrichment-coordinator-service/pom.xml
test/http-https-proxy/Dockerfile
test/simulator-group/control_panel/mnt/.gitignore [new file with mode: 0644]
test/simulator-group/ngw/mnt/.gitignore [new file with mode: 0644]
test/usecases/oruclosedlooprecovery/scriptversion/app/container-tag.yaml [new file with mode: 0644]
test/usecases/oruclosedlooprecovery/scriptversion/app/main.py

index 6f151cd..43ac2d1 100644 (file)
@@ -5,22 +5,51 @@
 Developer Guide
 ===============
 
+This document provides a quickstart for developers of the Non-RT RIC parts.
+
 Additional developer guides are available on the `O-RAN SC NONRTRIC Developer wiki <https://wiki.o-ran-sc.org/display/RICNR/Release+D>`_
 
 A1 Policy Management Service & SDNC/A1 Controller & A1 Adapter
 --------------------------------------------------------------
 
-The A1 Policy Management Service is implemented in ONAP. For documentation see `ONAP CCSDK documentation <https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html>`_ and `wiki <https://wiki.onap.org/pages/viewpage.action?pageId=84672221>`_.
+The A1 Policy Management Service is implemented in ONAP. For documentation see `ONAP CCSDK documentation <https://docs.onap.org/projects/onap-ccsdk-oran/en/latest/index.html>`_
+and `wiki <https://wiki.onap.org/pages/viewpage.action?pageId=84672221>`_.
 
 Enrichment Coordinator Service
 ------------------------------
-The Enrichment Coordinator Service is a Java 11 web application built using the Spring Framework.
-Using Spring Boot dependencies, it runs as a standalone application.
+The Enrichment Coordinator Service is a Java 11 web application built using the Spring Framework. Using Spring Boot
+dependencies, it runs as a standalone application.
+
+Its main functionality is to act as a data subscription broker and to decouple data producer from data consumers.
+
+See the ./config/README file in the *enrichment-coordinator-service* directory Gerrit repo on how to create and setup
+the certificates and private keys needed for HTTPS.
+
+Start standalone
+++++++++++++++++
+
+The project uses Maven. To start the Enrichment Coordinator Service as a freestanding application, run the following
+command in the *enrichment-coordinator-service* directory:
+
+    +-----------------------------+
+    | mvn spring-boot:run         |
+    +-----------------------------+
+
+Start in Docker
++++++++++++++++
+
+To build and deploy the Enrichment Coordinator Service, go to the "enrichment-coordinator-service" folder and run the
+following command:
+
+    +-----------------------------+
+    | mvn clean install           |
+    +-----------------------------+
 
-Its main functionality is to act as a data subscription broker and to decouple data 
-producer from data consumers.
+Then start the container by running the following command:
 
-See the ./config/README file in the *enrichment-coordinator-service* directory Gerrit repo on how to create and setup the certificates and private keys needed for HTTPS. 
+    +--------------------------------------------------------------------+
+    | docker run nonrtric-enrichment-coordinator-service                 |
+    +--------------------------------------------------------------------+
 
 Initial Non-RT-RIC App Catalogue
 --------------------------------
@@ -30,5 +59,7 @@ See the README.md file in the *r-app-catalogue* directory in the Gerrit repo for
 Kubernetes deployment
 =====================
 
-Non-RT RIC can be also deployed in a Kubernetes cluster, `it/dep repository <https://gerrit.o-ran-sc.org/r/admin/repos/it/dep>`_ hosts deployment and integration artifacts. Instructions and helm charts to deploy the Non-RT-RIC functions in the OSC NONRTRIC integrated test environment can be found in the *./nonrtric* directory.
-For more information see `Integration and Testing documentation on the O-RAN-SC wiki <https://docs.o-ran-sc.org/projects/o-ran-sc-it-dep/en/latest/index.html>`_
\ No newline at end of file
+Non-RT RIC can be also deployed in a Kubernetes cluster, `it/dep repository <https://gerrit.o-ran-sc.org/r/admin/repos/it/dep>`_
+hosts deployment and integration artifacts. Instructions and helm charts to deploy the Non-RT-RIC functions in the
+OSC NONRTRIC integrated test environment can be found in the *./nonrtric* directory.
+For more information see `Integration and Testing documentation on the O-RAN-SC wiki <https://docs.o-ran-sc.org/projects/o-ran-sc-it-dep/en/latest/index.html>`_.
index 708344b..2997c40 100644 (file)
@@ -14,6 +14,7 @@ Non-RT RIC
    ./api-docs.rst
    ./use-cases.rst
    ./requirements.rst
+   ./installation-guide.rst
    ./release-notes.rst
 
 * :ref:`search`
diff --git a/docs/installation-guide.rst b/docs/installation-guide.rst
new file mode 100644 (file)
index 0000000..c19a2d4
--- /dev/null
@@ -0,0 +1,43 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright (C) 2021 Nordix
+
+Installation Guide
+==================
+
+Abstract
+--------
+
+This document describes how to install the Non-RT RIC components, their dependencies and required system resources.
+
+Preface
+-------
+
+See the README file in the "docker-compose" folder for more information.
+
+Software Installation and Deployment
+------------------------------------
+
+Install with Docker
++++++++++++++++++++
+
+Docker compose files are provided, in the "docker-compose" folder, to install the components. Run the following
+command to start the components:
+
+      .. code-block:: bash
+
+         docker-compose -f docker-compose.yaml
+           -f policy-service/docker-compose.yaml
+           -f ecs/docker-compose.yaml
+
+Install with Helm
++++++++++++++++++
+
+Helm charts and an example recipe are provided in the `it/dep repo <https://gerrit.o-ran-sc.org/r/admin/repos/it/dep>`__,
+under "nonrtric". By modifying the variables named "installXXX" in the beginning of the example recipe file, which
+components that will be installed can be controlled. Then the components can be installed and started by running the
+following comand:
+
+      .. code-block:: bash
+
+        bin/deploy-nonrtric -f nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
index f74e91f..8645a18 100644 (file)
@@ -169,6 +169,6 @@ Stateful A1 test stub.
 Implementation:
 
 * Implemented as a Python application
-* Repo: *portal/nonrtric-controlpanel*
+* Repo: *sim/a1-interface*
 
 More details available at the `A1 Simulator documentation site <https://docs.o-ran-sc.org/projects/o-ran-sc-sim-a1-interface>`_
index e7f2bd6..8d97767 100644 (file)
@@ -68,7 +68,7 @@
         <dependency>
             <groupId>org.springdoc</groupId>
             <artifactId>springdoc-openapi-ui</artifactId>
-            <version>1.5.2</version>
+            <version>1.5.4</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
index e961500..1ae78f4 100644 (file)
@@ -5,7 +5,7 @@ FROM ${NEXUS_PROXY_REPO}node:16-alpine3.12
 ENV NODE_ENV=production
 
 WORKDIR /usr/src/app/cert
-COPY cert/*.crt .
+COPY cert/*.crt ./   #Need trailing slash on dest for multiple file copy
 COPY cert/pass .
 
 WORKDIR /usr/src/app
diff --git a/test/simulator-group/control_panel/mnt/.gitignore b/test/simulator-group/control_panel/mnt/.gitignore
new file mode 100644 (file)
index 0000000..72e8ffc
--- /dev/null
@@ -0,0 +1 @@
+*
diff --git a/test/simulator-group/ngw/mnt/.gitignore b/test/simulator-group/ngw/mnt/.gitignore
new file mode 100644 (file)
index 0000000..72e8ffc
--- /dev/null
@@ -0,0 +1 @@
+*
diff --git a/test/usecases/oruclosedlooprecovery/scriptversion/app/container-tag.yaml b/test/usecases/oruclosedlooprecovery/scriptversion/app/container-tag.yaml
new file mode 100644 (file)
index 0000000..230e590
--- /dev/null
@@ -0,0 +1,2 @@
+---
+tag: 1.0.0
index 30541d4..63839d0 100644 (file)
@@ -89,6 +89,23 @@ def read_o_ru_to_o_du_map_from_file(map_file):
     return dictionary
 
 
+def poll_and_handle_messages(mr_address, sdnr_address):
+    while True:
+        try:
+            verboseprint("Polling")
+            response = requests.get(mr_address)
+            messages = response.json()
+            for message in messages:
+                if (is_message_new_link_failure(message)):
+                    handle_link_failure(message, o_ru_to_o_du_map, sdnr_address)
+                elif (is_message_clear_link_failure(message)):
+                    handle_clear_link_failure(message)
+        except Exception as inst:
+            print(inst)
+
+        time.sleep(pollTime)
+
+
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(prog='PROG')
     parser.add_argument('--mrHost', help='The URL of the MR host (default: %(default)s)', default="http://message-router.onap")
@@ -135,17 +152,4 @@ if __name__ == '__main__':
     mr_address = mr_host + ":" + str(mr_port) + MR_PATH.replace("[TOPIC]", mr_topic)
     sdnr_address = sdnr_host + ":" + str(sdnr_port)
 
-    while True:
-        try:
-            verboseprint("Polling")
-            response = requests.get(mr_address)
-            messages = response.json()
-            for message in messages:
-                if (is_message_new_link_failure(message)):
-                    handle_link_failure(message, o_ru_to_o_du_map, sdnr_address)
-                elif (is_message_clear_link_failure(message)):
-                    handle_clear_link_failure(message)
-        except Exception as inst:
-            print(inst)
-
-        time.sleep(pollTime)
+    poll_and_handle_messages(mr_address, sdnr_address)