blob: eb4d6b78c4f7832b4930d949a5df52bc5fe514cd [file] [log] [blame]
elinuxhenrik3c2c02c2020-03-27 15:59:32 +01001.. This work is licensed under a Creative Commons Attribution 4.0 International License.
2.. SPDX-License-Identifier: CC-BY-4.0
elinuxhenrik616ea8d2020-04-15 08:26:35 +02003.. Copyright (C) 2020 Nordix
elinuxhenrik3c2c02c2020-03-27 15:59:32 +01004
5Developer Guide
6===============
7
elinuxhenrik22cfc3d2020-03-30 08:53:58 +02008This document provides a quickstart for developers of the Non-RT RIC Control Panel.
elinuxhenrik3c2c02c2020-03-27 15:59:32 +01009
elinuxhenrik22cfc3d2020-03-30 08:53:58 +020010The Non-RT RIC Control Panel is an interface that allows human users to create, edit and delete policy instances, for
elinuxhenrike46bb692021-05-26 14:37:53 +020011each existing policy type. The policy types and their definitions are retrieved from each Near-RT RIC. It is also
12possible to change the configuration of available RICs, provided that Consul is not used.
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010013
elinuxhenrike46bb692021-05-26 14:37:53 +020014Additionally, producers and jobs for the Enrichment Information coordinator service can be viewed.
ychaconaf912b92021-04-27 14:43:56 +020015
16See the README.md file in the nonrtric-controlpanel repo for information about how to use it.
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010017
elinuxhenrik22cfc3d2020-03-30 08:53:58 +020018Start the Control Panel for development
ychaconaf912b92021-04-27 14:43:56 +020019---------------------------------------
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010020
elinuxhenrik944400b2021-06-01 12:56:09 +020021To run the Control Panel locally for development, follow the steps below.
22
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010023
elinuxhenrike46bb692021-05-26 14:37:53 +020024First, fetch the latest code from `gerrit <https://gerrit.o-ran-sc.org/r/admin/repos/portal/nonrtric-controlpanel>`_ and
25go in to the frontend folder in the repo:
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010026
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010027
elinuxhenrike46bb692021-05-26 14:37:53 +020028 +----------------------------------------------------+
29 | cd nonrtric-controlpanel/webapp-frontend |
30 +----------------------------------------------------+
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010031
elinuxhenrike46bb692021-05-26 14:37:53 +020032The Control Panel can be started with mock data to make it easy to develop the GUI without the need to start all services.
33Run the following command to start with mock data:
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010034
elinuxhenrike46bb692021-05-26 14:37:53 +020035 +------------------------------+
36 | npm run start:mock |
37 +------------------------------+
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010038
elinuxhenrike46bb692021-05-26 14:37:53 +020039To start the frontend to get real information from Non-RT RIC services the following services need to be started first:
ychaconaf912b92021-04-27 14:43:56 +020040
elinuxhenrike46bb692021-05-26 14:37:53 +020041- ControlPanel API Gateway
42- Policy Management Service,
43- EI Service.
ychaconaf912b92021-04-27 14:43:56 +020044
elinuxhenrike46bb692021-05-26 14:37:53 +020045By 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
47Docker to run. To run this script with a local version of the Control Panel, a docker image of the Control Panel must
48first be created. To do this, run the following command:
ychaconaf912b92021-04-27 14:43:56 +020049
elinuxhenrike46bb692021-05-26 14:37:53 +020050 +-------------------------------------------------------------------+
51 | docker build -t o-ran-sc/nonrtric-controlpanel:2.2.0-SNAPSHOT . |
52 +-------------------------------------------------------------------+
ychaconaf912b92021-04-27 14:43:56 +020053
elinuxhenrike46bb692021-05-26 14:37:53 +020054Then run the following command to start the script with the local image:
ychaconaf912b92021-04-27 14:43:56 +020055
elinuxhenrike46bb692021-05-26 14:37:53 +020056 +-------------------------------------------------------------------------------------------------------------------+
57 | sudo ./PM_EI_DEMO.sh remote-remove docker --env-file ../common/test_env-oran-d-release.sh --use-local-image CP |
58 +-------------------------------------------------------------------------------------------------------------------+
ychaconaf912b92021-04-27 14:43:56 +020059
elinuxhenrike46bb692021-05-26 14:37:53 +020060When the above servers are started and populated with data, run the following command:
61
62 +---------------------+
63 | npm start |
64 +---------------------+
65
66Open the URL: `localhost:4200`_ in a browser to access the Control Panel.
ychaconaf912b92021-04-27 14:43:56 +020067
68 .. _localhost:4200: http://localhost:4200
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010069
elinuxhenrike46bb692021-05-26 14:37:53 +020070From the main page, click on the "Policy Control" card or use the menu on the left hand side of the page. From here, it
71is possible to create or list instances for each existing policy type.
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010072
73When the instances are listed, it is possible to edit or delete each instance from the expanded view.
74
ychaconaf912b92021-04-27 14:43:56 +020075.. image:: ./images/non-RT_RIC_controlpanel_Policy.PNG
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010076
elinuxhenrike46bb692021-05-26 14:37:53 +020077It is also possible to manage the configuration of available RICs, provided that Consul is not used, from the Control Panel.
78From the menu on the left hand side, select "Policy -> RIC Config".
79
80.. image:: ./images/non-RT_RIC_controlpanel_ric_config.PNG
81
82
83From the main page, click on the "Enrichment information coordinator" card or use the menu on the left hand side of the page.
84From here it is possible to view producers and jobs from the EI service,
ychaconaf912b92021-04-27 14:43:56 +020085
86.. image:: ./images/non-RT_RIC_controlpanel_EI.PNG
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010087
88End-to-end call
ychaconaf912b92021-04-27 14:43:56 +020089---------------
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010090
91In order to make a complete end-to-end call, follow the instructions given in this `guide`_.
92
ychaconaf912b92021-04-27 14:43:56 +020093.. _guide: https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=34963461