maximesson | 94978f4 | 2019-11-13 11:53:26 +0100 | [diff] [blame] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License. |
| 2 | .. SPDX-License-Identifier: CC-BY-4.0 |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 3 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 4 | Developer Guide |
| 5 | =============== |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 6 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 7 | This document provides a quickstart for developers of the Non-RT RIC. |
| 8 | |
| 9 | SDNC A1 Controller |
| 10 | ================================== |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 11 | |
| 12 | Prerequisites |
| 13 | ------------- |
| 14 | |
| 15 | 1. Java development kit (JDK), version 8 |
| 16 | 2. Maven dependency-management tool, version 3.4 or later |
| 17 | 3. Python, version 2 |
| 18 | 4. Docker, version 19.03.1 or later |
| 19 | 5. Docker Compose, version 1.24.1 or later |
| 20 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 21 | Build and run |
| 22 | ------------- |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 23 | Go to the northbound directory and run this command :: |
| 24 | mvn clean install |
| 25 | |
| 26 | This will build the project and create artifcats in maven repo |
| 27 | |
| 28 | Go to oam/installation directory and run this command :: |
| 29 | mvn clean install -P docker |
maximesson | e6b4d27 | 2019-10-31 13:26:13 +0100 | [diff] [blame] | 30 | |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 31 | This will create the docker images required for sdnc |
| 32 | |
| 33 | After this step check for the docker images created by the maven build with this command :: |
| 34 | docker images | grep sdnc |
| 35 | |
| 36 | Go to oam/installation/src/main/yaml and run this command :: |
| 37 | docker-compose up -d sdnc |
| 38 | |
| 39 | This will create the docker containers with the sdnc image, you can check the status of the docker container using :: |
| 40 | docker-compose logs -f sdnc |
| 41 | |
| 42 | The SDNC url to access the Northbound API, |
| 43 | http://localhost:8282/apidoc/explorer/index.html |
| 44 | |
maximesson | e6b4d27 | 2019-10-31 13:26:13 +0100 | [diff] [blame] | 45 | Credentials: admin/Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 46 | |
Lathish | e1041aa | 2020-01-31 14:01:45 +0000 | [diff] [blame] | 47 | Policy Agent |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 48 | ============================ |
elinuxhenrik | 7106105 | 2020-02-03 11:11:37 +0100 | [diff] [blame] | 49 | The O-RAN NonRT RIC PolicyAgent provides a REST API for management of policices. It provides support for: |
| 50 | |
| 51 | * Supervision of clients (R-APPs) to eliminate stray policies in case of failure |
| 52 | * Consistency monitoring of the SMO view of policies and the actual situation in the RICs |
| 53 | * Consistency monitoring of RIC capabilities (policy types) |
| 54 | * Policy configuration. This includes: |
| 55 | |
| 56 | * One REST API towards all RICs in the network |
| 57 | * Query functions that can find all policies in a RIC, all policies owned by a service (R-APP), all policies of a type etc. |
| 58 | * Maps O1 resources (ManagedElement) as defined in O1 to the controlling RIC. |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 59 | |
| 60 | | The PolicyAgent can be accessed over the REST API or through the DMaaP Interface. The REST API is documented in the |
| 61 | | *nonrtric/policy-agent/docs/api.yaml* file. Please refer to the README file of PolicyAgent to know more about the API's. |
Lathish | e1041aa | 2020-01-31 14:01:45 +0000 | [diff] [blame] | 62 | |
| 63 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 64 | Near-RT RIC Simulator |
maximesson | 780b2bf | 2019-11-12 16:09:02 +0100 | [diff] [blame] | 65 | ===================================== |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 66 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 67 | |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 68 | Prerequisites |
| 69 | ------------- |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 70 | 1. Java development kit (JDK), version 8 |
| 71 | 2. Maven dependency-management tool, version 3.4 or later |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 72 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 73 | Build and run |
| 74 | ------------- |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 75 | |
maximesson | e3954c4 | 2020-02-24 17:15:50 +0100 | [diff] [blame] | 76 | Go to the near-rt-ric-simulator/ric-plt-a1/ directory and run this command:: |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 77 | mvn clean install |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 78 | The docker image can be built using:: |
| 79 | docker build -t {desiredImageName} . |
| 80 | The image can be run using the command:: |
| 81 | docker run -it -p {desiredPort}:8085 {desiredImageName} |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 82 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 83 | The functions written in *a1.py* are the ones matching the requests listed in the A1 open api yaml file. The functions written in *main.py* are the ones used for development purpose. |
Lathish | 1279d19 | 2019-10-10 13:30:07 +0100 | [diff] [blame] | 84 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 85 | Different error codes can be thrown back according to the yaml file. In order to simulate an error code, simply add the query ?code={desiredCodeNumber} at the end of the address in the curl request. |
maximesson | e6b4d27 | 2019-10-31 13:26:13 +0100 | [diff] [blame] | 86 | |
maximesson | e3954c4 | 2020-02-24 17:15:50 +0100 | [diff] [blame] | 87 | For running the simulator outside of a docker container, run ./run_me.sh. It is possible to use the port of your choice, by adding it in the command: ./run_me.sh {desiredPort}. |
| 88 | After that, it is the exact same use with or without a container. |
| 89 | |
maximesson | e6b4d27 | 2019-10-31 13:26:13 +0100 | [diff] [blame] | 90 | End-to-end call |
maximesson | 780b2bf | 2019-11-12 16:09:02 +0100 | [diff] [blame] | 91 | =============== |
maximesson | e6b4d27 | 2019-10-31 13:26:13 +0100 | [diff] [blame] | 92 | |
| 93 | In order to make a complete end-to-end call, follow the instructions given in this `guide`_. |
| 94 | |
elinuxhenrik | c7a0d73 | 2020-02-04 14:49:59 +0100 | [diff] [blame] | 95 | .. _guide: https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=12157166 |