SO How to over OOM

This is an initial draft and up for comments before uploading to the readthedocs.

gerrit

Pulling code :

Following are the repository which are required to be pulled



gerrit
# Repository which contains source code for SO git clone ssh://<LFID>@gerrit.onap.org:29418/so && scp -p -P 29418 <LFID>@gerrit.onap.org:hooks/commit-msg so/.git/hooks/ # This repository is libraries for openstack services git clone ssh://<LFID>@gerrit.onap.org:29418/so/libs && scp -p -P 29418 <LFID>@gerrit.onap.org:hooks/commit-msg libs/.git/hooks/ # This repository contains required docker configs for various dockers git clone ssh://<LFID>@gerrit.onap.org:29418/so/docker-config && scp -p -P 29418 <LFID>@gerrit.onap.org:hooks/commit-msg docker-config/.git/hooks/




After cloning repository one can use mvm to build code.

$ mvn clean install



If you want to switch branch to any any specific tag, release :

git checkout <branch-name> # current active branches master, casablanca etc...



SO docker images and docker build

Following are the list of dockers required for SO deployment




Below are the responsibilities of each module

docker-config_mariadb_1 # responsible for handling the DB store (mariadb).
docker-config_api-handler-infra_1 # responsible for handling the DB store (mariadb).
docker-config_sdc-controller_1 # responsible for handling CSAR distribution and parsing.
docker-config_bpmn-infra_1 # responsible for executing BMPN worklows.
docker-config_vfc-adapter_1 is # responsible for communicating with VFC.
docker-config_sdnc-adapter_1 # responsible for communicating with SDNC.
docker-config_openstack-adapter_1 # responsible for comomunicating with openstack.
docker-config_catalog-db-adapter_1 # responsible for API to communicate with DB.
docker-config_request-db-adapter_1 # responsible for API to track requests details.
docker-config_so-monitoring_1 # responsible for Monitoring.



One can create docker image locally from code using following command from /so/packages/docker:

For creating docker image you need to run the above command from /so/package/docker

To run the docker images go to /docker-config folder which was cloned from the above command and run the command 

SO docker deployment

For initialization of docker there are 2 deployment options currently adpoted in ONAP:
- using heat template
- using OOM

OOM based deployment

- for installing and configuring SO using OOM deployment one can refer to the below links:

https://onap.readthedocs.io/en/latest/submodules/oom.git/docs/oom_setup_kubernetes_rancher.html
https://onap.readthedocs.io/en/latest/submodules/oom.git/docs/oom_quickstart_guide.html#quick-start-label

- Ensure SO is marked true against field enabled in the oom/oom_setup_kubernetes\onap\values.yaml for successful deployment.






Upgrade Images in OOM deployment

To Upgrade SO image one has to modify the the image for the respective component in SO charts by modifying values.yaml

e.g.




Now build the charts after modifying image version following the below sequence of commands:

step1:  Build all repos again


step2: Delete the existing pods already deployed



step3: Deploy the new pods.




Now SO will be upgraded with new image version.

Pull Daily Images in OOM deployment

To pull the daily image one can go to https://nexus3.onap.org/#browse/browse:docker.snapshot and pull the appropriate image tag by following previous steps.

Testing your patch

- To test patch developer has to replace corresponding `jar` files in pod to path `/app` in corresponding pod. This can be done using :



- Modify your \app\start-appp.sh to specify name of your jar as follows :



- Now, restart docker instance from corresponding node.



SO debug logging

To see the various logs on can go to /app/log folder inside corresponding pod e.g. /app/logs/bpmn for bpmn related logs.