Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The use case implementations are located in the "nonrtric/rapp/orufronthaulrecoveryorufhrecovery" repo. Some test scripts and docker compose files are located in the "nonrtric" repo.

...

  • First of all, deploy the sdnr-simulator in the cluster (if not using the real SDNR in ONAP). The sdnr simulator can be found in the nonrtric/rapp/orufronthaulrecovery orufhrecovery repo of OSC.
Code Block
languagebash
git clone "https://gerrit.o-ran-sc.org/r/nonrtric/rapp/orufhrecovery"
git checkout f-release --track origin/f-release

cd orucfronthaulrecovery/scriptversion/helm/sdnr-simulator/
helm package .

helm install sdnr-simulator sdnr-simulator-0.1.0.tgz --set image.repository=registry.nordix.org/onap/sdnr-simulator --set image.tag=1.0.0 --set messagerouter.host="http://message-router.onap" --set messagerouter.port="3904" --namespace nonrtric --create-namespace --wait

...

  • Finally, to test that the apex policy is actually working, an example LinkFailureEvent can be sent to the DmaaP MR.
Code Block
languagebash
cd orufronthaulrecoveryorufhrecovery/apexpolicyversion/LinkMonitor

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

...

  • Next step is to copy the helm charts of all three components into the kubernetes-participant. The helm charts are located in the nonrtric repo of OSC.
Code Block
languagebash
cd orufronthaulrecoveryorufhrecovery/scriptversion/helm/sdnr-simulator/
helm package .
kubectl cp ./sdnr-simulator-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/sdnr-simulator-0.1.0.tgz

cd orufronthaulrecoveryorufhrecovery/scriptversion/helm/message-generator/
helm package .
kubectl cp ./message-generator-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/message-generator-0.1.0.tgz

cd orufronthaulrecoveryorufhrecovery/scriptversion/helm/oru-app/
helm package .
kubectl cp ./oru-app-0.1.0.tgz onap/<POD-NAME-k8s-ppnt>:/home/policy/local-charts/oru-app-0.1.0.tgz

...

  • The next step is to start the controlloop-runtime and policy-participant components of the clamp.
Code Block
languagebash
cd orufronthaulrecoveryorufhrecovery/apexpolicyversion/LinkMonitor/docker-compose-controlloop
docker-compose up -d

...

  • Once all the components get up and running, the control loop can be commissioned and instantiated. This can be done by making a REST call to the controlloop-runtime component of the clamp. The tosca template for commissioning and the instantiation payload are provided in this directory of the nonrtric repo:
Code Block
languagebash
cd orufronthaulrecoveryorufhrecovery/apexpolicyversion/LinkMonitor/controlloop-rest-payloads

...

  • Send the example link failure event.
Code Block
languagebash
cd orufronthaulrecoveryorufhrecovery/apexpolicyversion/LinkMonitor

curl -X POST -H accept:application/json -H Content-Type:application/json "http://localhost:3904/events/unauthenticated.SEC_FAULT_OUTPUT/" -d @./events/LinkFailureEvent.json

...

Code Block
languagebash
eval $(minikube docker-env)

cd orufronthaulrecoveryorufhrecovery/scriptversion/app
docker build -t oru-app .

cd orufronthaulrecoveryorufhrecovery/scriptversion/simulators
docker build -f Dockerfile-sdnr-sim -t sdnr-simulator .
docker build -f Dockerfile-message-generator -t message-generator:v2 .

cd nonrtric/test/mrstub/
docker build -t mrstub .

...

  • Next step is to prepare the kube config file of minikube for mounting it inside the k8s-participant component of policy/clamp. First of all, copy the kube config file inside the config directory used by docker-compose file that runs k8s-participant.
Code Block
languagebash
cd orufronthaulrecoveryorufhrecovery/scriptversion/docker-compose-controlloop

cp ~/.kube/config ./config/kube-config

...

  • Once all the components get up and running, the control loop can be commissioned and instantiated. This can be done by making a REST call to the controlloop-runtime component of the clamp. The tosca template for commissioning and the instantiation payload are provided in this directory of the nonrtric repo:
Code Block
languagebash
cd orufronthaulrecoveryorufhrecovery/scriptversion/controlloop-rest-payloads

...

  • In order to stop the docker containers and free up resources on the host machine, use the following commands:
Code Block
languagebash
cd orufronthaulrecoveryorufhrecovery/scriptversion/docker-compose-controlloop
docker-compose down

docker volume rm docker-compose-controlloop_db-vol

...