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 |
elinuxhenrik | 616ea8d | 2020-04-15 08:26:35 +0200 | [diff] [blame] | 3 | .. Copyright (C) 2020 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 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 14 | Additionally, producers and jobs for the Enrichment 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 | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 39 | 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] | 40 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 41 | - ControlPanel API Gateway |
| 42 | - Policy Management Service, |
| 43 | - EI Service. |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 44 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 45 | By pulling the `nonrtric <https://gerrit.o-ran-sc.org/r/admin/repos/nonrtric>`__ repo and using the script |
| 46 | "PM_EI_DEMO.sh" in the folder "test/autotest", the above services will be started and populated with data. It requires |
| 47 | Docker to run. To run this script with a local version of the Control Panel, a docker image of the Control Panel must |
| 48 | first be created. To do this, run the following command: |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 49 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 50 | +-------------------------------------------------------------------+ |
| 51 | | docker build -t o-ran-sc/nonrtric-controlpanel:2.2.0-SNAPSHOT . | |
| 52 | +-------------------------------------------------------------------+ |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 53 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 54 | Then run the following command to start the script with the local image: |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 55 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 56 | +-------------------------------------------------------------------------------------------------------------------+ |
| 57 | | sudo ./PM_EI_DEMO.sh remote-remove docker --env-file ../common/test_env-oran-d-release.sh --use-local-image CP | |
| 58 | +-------------------------------------------------------------------------------------------------------------------+ |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 59 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 60 | When the above servers are started and populated with data, run the following command: |
| 61 | |
| 62 | +---------------------+ |
| 63 | | npm start | |
| 64 | +---------------------+ |
| 65 | |
| 66 | Open the URL: `localhost:4200`_ in a browser to access the Control Panel. |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 67 | |
| 68 | .. _localhost:4200: http://localhost:4200 |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 69 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 70 | 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 |
| 71 | is possible to create or list instances for each existing policy type. |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 72 | |
| 73 | When the instances are listed, it is possible to edit or delete each instance from the expanded view. |
| 74 | |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 75 | .. image:: ./images/non-RT_RIC_controlpanel_Policy.PNG |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 76 | |
elinuxhenrik | e46bb69 | 2021-05-26 14:37:53 +0200 | [diff] [blame] | 77 | It is also possible to manage the configuration of available RICs, provided that Consul is not used, from the Control Panel. |
| 78 | From the menu on the left hand side, select "Policy -> RIC Config". |
| 79 | |
| 80 | .. image:: ./images/non-RT_RIC_controlpanel_ric_config.PNG |
| 81 | |
| 82 | |
| 83 | From the main page, click on the "Enrichment information coordinator" card or use the menu on the left hand side of the page. |
| 84 | From here it is possible to view producers and jobs from the EI service, |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 85 | |
| 86 | .. image:: ./images/non-RT_RIC_controlpanel_EI.PNG |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 87 | |
| 88 | End-to-end call |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 89 | --------------- |
elinuxhenrik | 3c2c02c | 2020-03-27 15:59:32 +0100 | [diff] [blame] | 90 | |
| 91 | In order to make a complete end-to-end call, follow the instructions given in this `guide`_. |
| 92 | |
ychacon | af912b9 | 2021-04-27 14:43:56 +0200 | [diff] [blame] | 93 | .. _guide: https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=34963461 |