X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=docs%2Fdeveloper-guide.rst;h=2469d240a35c888500ae2a1459e6cc765aa3aa21;hb=1408f85fa0f65041ade63bfdafc01674d22384ca;hp=1716666d9be08a785725ddf9c0780331142e0e61;hpb=616ea8d57a6dba93bc0d048301155c349c13f20c;p=portal%2Fnonrtric-controlpanel.git diff --git a/docs/developer-guide.rst b/docs/developer-guide.rst index 1716666..2469d24 100644 --- a/docs/developer-guide.rst +++ b/docs/developer-guide.rst @@ -8,53 +8,90 @@ Developer Guide This document provides a quickstart for developers of the Non-RT RIC Control Panel. The Non-RT RIC Control Panel is an interface that allows human users to create, edit and delete policy instances, for -each existing policy type. The policy types and their definitions are retrieved from each Near-RT RIC. +each existing policy type. The policy types and their definitions are retrieved from each Near-RT RIC. It is also +possible to change the configuration of available RICs, provided that Consul is not used. -See the README.md file in the nonrtric-controlpanel repo for info about how to use it. +Additionally, producers and jobs for the Information coordinator service can be viewed. + +See the README.md file in the nonrtric-controlpanel repo for information about how to use it. Start the Control Panel for development -======================================= +--------------------------------------- + +To run the Control Panel locally for development, follow the steps below. + + +First, fetch the latest code from `gerrit `_ and +go in to the frontend folder in the repo: + -To run the Control Panel locally for development with simulated services, follow these steps: + +----------------------------------------------------+ + | cd nonrtric-controlpanel/webapp-frontend | + +----------------------------------------------------+ -- Fetch the latest code from `gerrit`_ +The Control Panel can be started with mock data to make it easy to develop the GUI without the need to start all services. +Run the following command to start with mock data: -.. _gerrit: https://gerrit.o-ran-sc.org/r/admin/repos/nonrtric-controlpanel + +------------------------------+ + | npm run start:mock | + +------------------------------+ -- Start the backend: +Open the URL: `localhost:4200`_ in a browser to access the Control Panel with mock information. - cd webapp-backend + .. _localhost:4200: http://localhost:4200 - mvn clean install +To start the frontend to get real information from Non-RT RIC services the following services need to be started first: - mvn -Dorg.oransc.portal.nonrtric.controlpanel=mock -Dtest=ControlPanelTestServer -DfailIfNoTests=false test +- ControlPanel API Gateway +- Policy Management Service, +- EI Service. +By pulling the `nonrtric `__ repo and using the script +"PM_EI_DEMO.sh" in the folder "test/autotest", the above services will be started and populated with data. It requires +Docker to run. To run this script with a local version of the Control Panel, a docker image of the Control Panel must +first be created. To do this, run the following command: -- Now you can open URL: `localhost:8080`_ in a browser to access the backend directly. + +-------------------------------------------------------------------+ + | docker build -t o-ran-sc/nonrtric-controlpanel:2.2.0-SNAPSHOT . | + +-------------------------------------------------------------------+ -.. _localhost:8080: localhost:8080 +Then run the following command to start the script with the local image: -Start the frontend: + +-------------------------------------------------------------------------------------------------------------------+ + | sudo ./PM_EI_DEMO.sh remote-remove docker --env-file ../common/test_env-oran-d-release.sh --use-local-image CP | + +-------------------------------------------------------------------------------------------------------------------+ - cd webapp-frontend +When the above servers are started and populated with data, run the following command: - ./ng serve --proxy-config proxy.conf.json + +---------------------+ + | npm start | + +---------------------+ -- Now you can open URL: `localhost:4200`_ in a browser to access the Control Panel. +Open the URL: `localhost:8080`_ in a browser to access the Control Panel with real information. -.. _localhost:4200: localhost:4200 + .. _localhost:8080: http://localhost:8080 -From the main page, click on the "Policy Control" card. From here, it is possible to create or list instances for each -existing policy type. +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 +is possible to create or list instances for each existing policy type. When the instances are listed, it is possible to edit or delete each instance from the expanded view. -.. image:: ./images/non-RT_RIC_controlpanel.png +.. image:: ./images/non-RT_RIC_controlpanel_Policy.PNG +It is also possible to manage the configuration of available RICs, provided that Consul is not used, from the Control Panel. +From the menu on the left hand side, select "Policy -> RIC Config". + +.. image:: ./images/non-RT_RIC_controlpanel_ric_config.PNG + + +From the main page, click on the "Information information coordinator" card or use the menu on the left hand side of the page. +From here it is possible to view producers and jobs from the Information service, + +.. image:: ./images/non-RT_RIC_controlpanel_EI.PNG End-to-end call -=============== +--------------- In order to make a complete end-to-end call, follow the instructions given in this `guide`_. -.. _guide: https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=12157166 \ No newline at end of file +.. _guide: https://wiki.o-ran-sc.org/pages/viewpage.action?pageId=34963461