You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

This page describes how to create and run the control loops for the "Hello World" O-RU Fronthaul Recovery usecase. This can be done either in docker environment using docker-compose files (available in the nonrtric repo of OSC), or in kubernetes environment using the complete ONAP installation done via OOM. Moreover, the control loop for apex policy version of the usecase can be created using Policy participant, whereas the control loop for script version of the usecase can be created using Kubernetes participant (both participants available in policy/clamp repo of ONAP). 

Control loops in kubernetes

This section is related to running the control loops in a kubernetes environment. Specifically, it describes how to deploy the control loops in a full-fledge installation of ONAP assuming that the installation was done in a cluster using 'istanbul' branch of OOM.

Firstly, the common steps for creating control loops for both apex policy and script versions of the usecase are described. This is followed by the steps that are unique for setting up and testing each version individually. 

Create topic in DmaaP MR

In order to create the fault notification topic in DMaaP Message Router, the first step is to find out its NodePort and NodeIP. The NodeIP is the IP address of any k8s node in the cluster where ONAP has been installed, and it can be found using the command "kubectl get nodes -o wide". The NodePort can be found using the command "kubectl -n onap get svc | grep message-router-external". Next, the topic defined for this usecase can be created using:

curl -k -X POST -H "Content-Type: application/json" -d "{"topicName": "unauthenticated.SEC_FAULT_OUTPUT"}" https://<NodeIP>:<NodePort-message-router>/events/unauthenticated.SEC_FAULT_OUTPUT

Run Policy GUI

The easiest way to create the control loops is via Policy GUI component of the clamp. The below steps describe how to start this GUI.

NOTE: At the time of writing this page (15 Dec 2021), there is a bug in the helm chart of policy/clamp in 'istanbul' branch of OOM. The bug should be fixed by the policy/clamp team. Until then, the following steps should be done to fix this problem. Run the command:

kubectl -n onap edit cm def-policy-clamp-be-configmap

(whereas "def" refers to the name of deployment and should be replaced with the name used when installing ONAP. The same should be done for all instructions given below that use "def" as deployment name)

and change http to https in clamp.config.controlloop.runtime.url under application.properties. Then, run this command:

kubectl rollout restart deployment def-policy-clamp-be


Next step is to find out the NodePort of policy-guy. This can be done by using the command "kubectl -n onap get svc | grep policy-gui".

Then, open a web browser and navigate to the url:

https://<NodeIP>:<NodePort-policy-gui>/clamp/

Use below credentials for the GUI:

username: demo@people.osaaf.org.                 password: demo123456!

Start-up screen of Policy GUI

Start-up screen of the Policy GUI

Commission/Instantiate control loop via GUI

This sub-section shows how to commission and instantiate the control loops via policy-gui. The individual tosca templates for each of the apex policy and script versions are provided below in the relevant sub-sections. The screenshots shown in this sub-section are general steps that are applicable for both versions.


Apex Policy version

This version is run in the stand-alone ONAP policy framework and uses an apex policy.

Assumption:

It is assumed that the DMaaP Message Router is already running as a docker container with the hostname "onap-dmaap" and connected to the docker network named "nonrtric-docker-net". It is also assumed that a topic named "unauthenticated.SEC_FAULT_OUTPUT" has already been created in the Message Router.

Start the ONAP Policy framework

The ONAP Policy framework can be run in a stand-alone mode using the docker-compose in OSC nonrtric repo:

git clone "https://gerrit.o-ran-sc.org/r/nonrtric"
git checkout e-release --track origin/e-release
cd nonrtric/docker-compose/docker-compose-policy-framework

Start all the containers by running this command:

docker-compose up -d
  • No labels