blob: 2c62f3328e201f0031a2e1c502686caf475dbaae [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
JohnKeeney461bbaa2021-12-15 18:24:03 +00003.. Copyright (C) 2021 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
PatrikBuhr1408f852021-12-14 08:48:59 +010014Additionally, producers and jobs for the 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
elinuxhenrik6ba70382021-06-01 15:16:49 +020039Open the URL: `localhost:4200`_ in a browser to access the Control Panel with mock information.
40
41 .. _localhost:4200: http://localhost:4200
42
elinuxhenrike46bb692021-05-26 14:37:53 +020043To 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 +020044
elinuxhenrike46bb692021-05-26 14:37:53 +020045- ControlPanel API Gateway
46- Policy Management Service,
47- EI Service.
ychaconaf912b92021-04-27 14:43:56 +020048
elinuxhenrike46bb692021-05-26 14:37:53 +020049By 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
51Docker to run. To run this script with a local version of the Control Panel, a docker image of the Control Panel must
52first be created. To do this, run the following command:
ychaconaf912b92021-04-27 14:43:56 +020053
elinuxhenrike46bb692021-05-26 14:37:53 +020054 +-------------------------------------------------------------------+
55 | docker build -t o-ran-sc/nonrtric-controlpanel:2.2.0-SNAPSHOT . |
56 +-------------------------------------------------------------------+
ychaconaf912b92021-04-27 14:43:56 +020057
elinuxhenrike46bb692021-05-26 14:37:53 +020058Then run the following command to start the script with the local image:
ychaconaf912b92021-04-27 14:43:56 +020059
elinuxhenrike46bb692021-05-26 14:37:53 +020060 +-------------------------------------------------------------------------------------------------------------------+
61 | sudo ./PM_EI_DEMO.sh remote-remove docker --env-file ../common/test_env-oran-d-release.sh --use-local-image CP |
62 +-------------------------------------------------------------------------------------------------------------------+
ychaconaf912b92021-04-27 14:43:56 +020063
elinuxhenrike46bb692021-05-26 14:37:53 +020064When the above servers are started and populated with data, run the following command:
65
66 +---------------------+
67 | npm start |
68 +---------------------+
69
elinuxhenrik6ba70382021-06-01 15:16:49 +020070Open the URL: `localhost:8080`_ in a browser to access the Control Panel with real information.
ychaconaf912b92021-04-27 14:43:56 +020071
elinuxhenrik6ba70382021-06-01 15:16:49 +020072 .. _localhost:8080: http://localhost:8080
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010073
elinuxhenrike46bb692021-05-26 14:37:53 +020074From the main page, click on the "Policy Control" card or use the menu on the left hand side of the page. From here, it
75is possible to create or list instances for each existing policy type.
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010076
77When the instances are listed, it is possible to edit or delete each instance from the expanded view.
78
ychaconaf912b92021-04-27 14:43:56 +020079.. image:: ./images/non-RT_RIC_controlpanel_Policy.PNG
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010080
elinuxhenrike46bb692021-05-26 14:37:53 +020081It is also possible to manage the configuration of available RICs, provided that Consul is not used, from the Control Panel.
82From the menu on the left hand side, select "Policy -> RIC Config".
83
84.. image:: ./images/non-RT_RIC_controlpanel_ric_config.PNG
85
86
PatrikBuhr1408f852021-12-14 08:48:59 +010087From the main page, click on the "Information information coordinator" card or use the menu on the left hand side of the page.
88From here it is possible to view producers and jobs from the Information service,
ychaconaf912b92021-04-27 14:43:56 +020089
90.. image:: ./images/non-RT_RIC_controlpanel_EI.PNG
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010091
92End-to-end call
ychaconaf912b92021-04-27 14:43:56 +020093---------------
elinuxhenrik3c2c02c2020-03-27 15:59:32 +010094
95In order to make a complete end-to-end call, follow the instructions given in this `guide`_.
96
JohnKeeney461bbaa2021-12-15 18:24:03 +000097.. _guide: https://wiki.o-ran-sc.org/display/RICNR/Testing+End+to+End+call+in+Release+E