elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +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 |
JohnKeeney | 461bbaa | 2021-12-15 18:24:03 +0000 | [diff] [blame] | 3 | .. Copyright (C) 2021 Nordix |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 4 | |
| 5 | Developer Guide |
| 6 | =============== |
| 7 | |
elinuxhenrik | 22cfc3d | 2020-03-30 08:53:58 +0200 | [diff] [blame] | 8 | This document provides a quickstart for developers of the Non-RT RIC Control Panel. |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 9 | |
elinuxhenrik | 22cfc3d | 2020-03-30 08:53:58 +0200 | [diff] [blame] | 10 | The Non-RT RIC Control Panel is an interface that allows human users to create, edit and delete policy instances, for |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 11 | each existing policy type. The policy types and their definitions are retrieved from each Near-RT RIC. It is also |
| 12 | possible to change the configuration of available RICs, provided that Consul is not used. |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 13 | |
PatrikBuhr | 1408f85 | 2021-12-14 08:48:59 +0100 | [diff] [blame] | 14 | Additionally, producers and jobs for the Information coordinator service can be viewed. |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 15 | |
| 16 | See the README.md file in the nonrtric-controlpanel repo for information about how to use it. |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 17 | |
elinuxhenrik | 22cfc3d | 2020-03-30 08:53:58 +0200 | [diff] [blame] | 18 | Start the Control Panel for development |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 19 | --------------------------------------- |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 20 | |
elinuxhenrik | 944400b | 2021-06-01 12:56:09 +0200 | [diff] [blame] | 21 | To run the Control Panel locally for development, follow the steps below. |
| 22 | |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 23 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 24 | First, fetch the latest code from `gerrit <https://gerrit.o-ran-sc.org/r/admin/repos/portal/nonrtric-controlpanel>`_ and |
| 25 | go in to the frontend folder in the repo: |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 26 | |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 27 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 28 | +----------------------------------------------------+ |
| 29 | | cd nonrtric-controlpanel/webapp-frontend | |
| 30 | +----------------------------------------------------+ |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 31 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 32 | The Control Panel can be started with mock data to make it easy to develop the GUI without the need to start all services. |
| 33 | Run the following command to start with mock data: |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 34 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 35 | +------------------------------+ |
| 36 | | npm run start:mock | |
| 37 | +------------------------------+ |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 38 | |
elinuxhenrik | 6ba7038 | 2021-06-01 15:16:49 +0200 | [diff] [blame] | 39 | Open the URL: `localhost:4200`_ in a browser to access the Control Panel with mock information. |
| 40 | |
| 41 | .. _localhost:4200: http://localhost:4200 |
| 42 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 43 | To start the frontend to get real information from Non-RT RIC services the following services need to be started first: |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 44 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 45 | - ControlPanel API Gateway |
| 46 | - Policy Management Service, |
| 47 | - EI Service. |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 48 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 49 | By pulling the `nonrtric <https://gerrit.o-ran-sc.org/r/admin/repos/nonrtric>`__ repo and using the script |
| 50 | "PM_EI_DEMO.sh" in the folder "test/autotest", the above services will be started and populated with data. It requires |
| 51 | Docker to run. To run this script with a local version of the Control Panel, a docker image of the Control Panel must |
| 52 | first be created. To do this, run the following command: |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 53 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 54 | +-------------------------------------------------------------------+ |
| 55 | | docker build -t o-ran-sc/nonrtric-controlpanel:2.2.0-SNAPSHOT . | |
| 56 | +-------------------------------------------------------------------+ |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 57 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 58 | Then run the following command to start the script with the local image: |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 59 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 60 | +-------------------------------------------------------------------------------------------------------------------+ |
| 61 | | sudo ./PM_EI_DEMO.sh remote-remove docker --env-file ../common/test_env-oran-d-release.sh --use-local-image CP | |
| 62 | +-------------------------------------------------------------------------------------------------------------------+ |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 63 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 64 | When the above servers are started and populated with data, run the following command: |
| 65 | |
| 66 | +---------------------+ |
| 67 | | npm start | |
| 68 | +---------------------+ |
| 69 | |
elinuxhenrik | 6ba7038 | 2021-06-01 15:16:49 +0200 | [diff] [blame] | 70 | Open the URL: `localhost:8080`_ in a browser to access the Control Panel with real information. |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 71 | |
elinuxhenrik | 6ba7038 | 2021-06-01 15:16:49 +0200 | [diff] [blame] | 72 | .. _localhost:8080: http://localhost:8080 |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 73 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 74 | From the main page, click on the "Policy Control" card or use the menu on the left hand side of the page. From here, it |
| 75 | is possible to create or list instances for each existing policy type. |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 76 | |
| 77 | When the instances are listed, it is possible to edit or delete each instance from the expanded view. |
| 78 | |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 79 | .. image:: ./images/non-RT_RIC_controlpanel_Policy.PNG |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 80 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 81 | It is also possible to manage the configuration of available RICs, provided that Consul is not used, from the Control Panel. |
| 82 | From the menu on the left hand side, select "Policy -> RIC Config". |
| 83 | |
| 84 | .. image:: ./images/non-RT_RIC_controlpanel_ric_config.PNG |
| 85 | |
| 86 | |
PatrikBuhr | 1408f85 | 2021-12-14 08:48:59 +0100 | [diff] [blame] | 87 | From the main page, click on the "Information information coordinator" card or use the menu on the left hand side of the page. |
| 88 | From here it is possible to view producers and jobs from the Information service, |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 89 | |
| 90 | .. image:: ./images/non-RT_RIC_controlpanel_EI.PNG |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 91 | |
| 92 | End-to-end call |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 93 | --------------- |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 94 | |
| 95 | In order to make a complete end-to-end call, follow the instructions given in this `guide`_. |
| 96 | |
JohnKeeney | 461bbaa | 2021-12-15 18:24:03 +0000 | [diff] [blame] | 97 | .. _guide: https://wiki.o-ran-sc.org/display/RICNR/Testing+End+to+End+call+in+Release+E |