1.background

The previous document mentioned how to separate the UUI server with postgres and connect the database

on the docker.

Now we use the previously created images UUI server: 1 and Postgres: 14.4 to integrate them into the oom

environment of ONAP.

First, you need to understand the knowledge of oom and the basic operations of k8s and helm.

2.pre-knowledge

OOM requires local k8s and helm environments.

Please refer to the offiffifficial documents for specifific installation

https://docs.onap.org/projects/onap-oom/en/latest/oom_quickstart_guide.html#oom-quickstart-guide

The use of helm can be learned from the offiffifficial documents

https://helm.sh/docs/

The common helm commands are:

#helm repository

helm repo list

helm repo update

helm search repo onap

#install and uninstall

helm install

helm uninstall

#deploy & undeploy (

helm plugins)

helm deploy ...

helm undeploy ...

Since helm 3 does not have a server, there is a way to create the helm local warehouse chartuseum in the

installation document of oom.

3.Specifific implementation

fifirst , we git clone oom.

current branch have not been merged.

git fetch "https://gerrit.onap.org/r/oom" refs/changes/92/129992/6 && git checkout -b

change-129992-6 FETCH_HEAD

The code to be modifified is in the directory of oom/kubernetes/uui/components


You can see other components of UUI: uui-server, uui-postgres, and uui-intent analysis

You need to add the initialization statement of uui-server to uui-postgres and connect the UUI server to uui

postgres.

The directory structure of uui-server 、uui-postgres、uui-intent-analysisserver is as follows:


3.1 uui-postgres/templates/confifigmap.yaml

Modify confifigmap.yaml is used to confifigure the database and write the initialization command of the

database.

Add at the end of the fifile

3.2 uui-server/values.yaml

service.name values in uui-postgres/values.yaml

add values in uui-server/values.yaml below

Note: keep postgres.name=uui-postgres.service.name , or uui-server cannot connect postgres

modify the image version of uui-server

image: onap/usecase-ui-server:latest

3.3 uui-server/templates/deployment.yaml

Add a parameter in the env fifield

Note : All labels in yaml must be of type string

(MSB_ADDR and MR_ADDR are also injected here and need not be modifified)

3.4 Copy the previously modifified applications.properties and run.sh

confifig/applications.properties

entrypoint/run.sh

So far, the submitted online environment has been modifified.

4.offlfflffline debug

For offlfflffline debugging, we need to modify some confifigurations before it can run. The modifified content is

commented out in the following code

4.1uui-server/values.yaml

4.2 uui-server/templates/deployment.yaml

4.3 run make

run command in dir oom/kubernetes

4.4 run uui

As can be seen from the above command, after Postgres is started, the UUI server does not report the

database connection error. It started normally. The database is connected!

In the local environment, since no probe is added and the service is started after the database is started, the

server may not be able to connect to the database for the fifirst time. The corresponding pod needs to be

deleted.

kubectl delete uui-uui-server-74fb68fdcd-clxcd -n uuisee the new server pod started to run successfully

5.follow-up work

Subsequently, we need to standardize the database connection mode of oom, that is, add probes, etc

  • No labels