Versions Compared

Key

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

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


Code Block
languagebash
titlegerrit
# 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.

Code Block
languagebash
$ mvn clean install


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

Code Block
languagebash
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

Code Block
languagebash
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
fb338faccd2a onap/so/api-handler-infra "/app/wait-for.sh ..." 13 days ago Up 56 seconds 0.0.0.0:5080->5080/tcp, 0.0.0.0:8080->8080/tcp testlab_api-handler-infra_1 # responsible for exposing north bound APIs.
c7d645a3a948 onap/so/vfc-adapter "/app/wait-for.sh ..." 13 days ago Up 22 seconds 0.0.0.0:5084->5084/tcp, 0.0.0.0:8084->8084/tcp testlab_vfc-adapter_1 # responsible for
b352794e9129 onap/so/sdnc-adapter "/app/wait-for.sh ..." 13 days ago Up 14 seconds 0.0.0.0:5086->5086/tcp, 0.0.0.0:8086->8086/tcp testlab_sdnc-adapter_1
4fd0a0ac1723 onap/so/sdc-controller "/app/wait-for.sh ..." 13 days ago Up 34 seconds 0.0.0.0:5085->5085/tcp, 0.0.0.0:8085->8085/tcp testlab_sdc-controller_1
8ddd1639b983 onap/so/openstack-adapter "/app/wait-for.sh ..." 13 days ago Up 1 second 0.0.0.0:5087->5087/tcp, 0.0.0.0:8087->8087/tcp testlab_openstack-adapter_1
631ca370ea66 onap/so/bpmn-infra "/app/wait-for.sh ..." 13 days ago Up 46 seconds 0.0.0.0:5081->5081/tcp, 0.0.0.0:8081->8081/tcp testlab_bpmn-infra_1
0d881e6506c1 onap/so/request-db-adapter "/app/wait-for.sh ..." 13 days ago Up About a minute 0.0.0.0:5083->5083/tcp, 0.0.0.0:8083->8083/tcp testlab_request-db-adapter_1
762578ec4e8d onap/so/catalog-db-adapter "/app/wait-for.sh ..." 13 days ago Up About a minute 0.0.0.0:5082->5082/tcp, 0.0.0.0:8082->8082/tcp testlab_catalog-db-adapter_1
c9f544cfd7b4 mariadb:10.1.11 "/docker-entrypoin..." 13 days ago Up About a minute 0.0.0.0:32787->3306/tcp testlab_mariadb_1


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:

Code Block
languagebash
$ mvn clean install -U -DskipTests=true -Dmaven.test.skip=true -Dmaven.javadoc.skip=true -Dadditionalparam=-Xdoclint:none -P 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 

Code Block
languagebash
$ docker-compose up -d

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.


Code Block
languageyml
===== values.yaml =====
so:
enabled: true

replicaCount: 1

liveness:
# necessary to disable liveness probe when setting breakpoints
# in debugger so K8s doesn't restart unresponsive container
enabled: true

# so server configuration
config:
# message router configuration
dmaapTopic: "AUTO"
# openstack configuration
openStackUserName: "vnf_user"
openStackRegion: "RegionOne"
openStackKeyStoneUrl: "http://1.2.3.4:5000"
openStackServiceTenantName: "service"
openStackEncryptedPasswordHere: "c124921a3a0efbe579782cde8227681e"

# configure embedded mariadb
mariadb:
config:
mariadbRootPassword: password



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.

Code Block
languageyml
====== oom/kubernetes/so/charts/so-bpmn-infra/values.yaml =====
...
repository: nexus3.onap.org:10001
image: onap/so/bpmn-infra:1.3.3
pullPolicy: Always
...


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

step1:  Build all repos again

Code Block
languagebash
$ make all # from path oom/kubernetes


step2: Delete the existing pods already deployed

Code Block
languagebash
$ helm del dev-so --purge # delete previous existing deployment


step3: Deploy the new pods.

Code Block
languagebash
$ helm deploy dev local/onap --namespace onap


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 :

Code Block
languagebash
$ kubectl cp mso-infrastructure-bpmn-1.3.0-SNAPSHOT.jar onap/dev-so-so-bpmn-infra-54db5cd955-h7f5s:/app/mso-infrastructure-bpmn-1.3.0-SNAPSHOT.jar


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

Code Block
languagebash
===== start-app.sh =====
java ${jvmargs} -jar mso-infrastructure-bpmn-1.3.0-SNAPSHOT.jar


- Now, restart docker instance from corresponding node.

Code Block
languagebash
$ docker restart <docker-name>


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.

Code Block
languagebash