Versions Compared

Key

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

...

The value of $ONAP_INSTALL_VALUES_YAML must be a relative path from the oom/kubernetes/onap/Chart.yaml to the configuration YAML file that we place under the overrides folder (eg ./resources/overrides/cps-minimal.yaml ).


When the installation is complete we must provide an Ingress srevice to expose CPS to the wider world.


Code Block
kubectl expose service cps-core --port 9001 --target-port=8080 --name=cps-http-api -n cps --type=NodePort


Update CPS

Upgrade the installment:

Code Block
helm upgrade $ONAP_INSTALL_RELEASE_NAME xerces/onap -i -f values.yaml -f $ONAP_INSTALL_VALUES_YAML --namespace $ONAP_INSTALL_NAMESPACE --set global.masterPassword=$ONAP_INSTALL_MASTER_PASSWORD --debug

...

Override YAML

This basic .yaml information should be enough to deploy a CPS instance. Check the comments for explanations.


Code Block
# we can set pull policy for every image under the global key
global:
  pullPolicy: IfNotPresent

cps:
  # enable certain services under their respective keys (here we enable CPS etc.)
  enabled: true
  cps-temporal:
    enabled: false
  cps-core:
    config:
      # under the additional section we can affect certain configurations of the Spring Boot application (new prefix for the REST endpoints)
      additional:
        rest:
          api:
            cps-base-path: /kiscica
    postgres:
      config:
        pgUserExternalSecret: '{{ .Release.Name }}-postgres-{{ include "common.postgres.secret.userCredentialsUID" . }}'
    postgres-init:
      config:
        # add external secrets to the deployments
        pgUserExternalSecret: '{{ .Release.Name }}-postgres-{{ include "common.postgres.secret.userCredentialsUID" . }}'

sdnc:
  enabled: false
strimzi:
  enabled: true
  # set the running number of replicas
  replicaCount: 1


Compile onap chart

When you modify the deployment yaml you need to recompile the onap chart (it is not necessary for installation or when you just modify the values.yaml)

compile onap

navigate to the <git>/oom/kubernetes folder

Code Block
languagebash
helm package ./onap --dependency-update

upload onap

Code Block
languagebash
helm cm-push onap-<version>.tgz xerces -f

missing dependencies

When you run this compilation first you must compile every dependency as well.

First you need to start a local chartmuseum

Code Block
languagebash
docker run -p 8879:8080 bitnami/chartmuseum:latest 

add local repository to helm

Code Block
languagebash
helm repo add local http://localhost:8879/

after that you can compile the whole onap project. It has a make file so it is quiet easy, but take a long time ca. an hour 

Code Block
languagebash
make build

then you can continue with the second step

Pnf-simulator

Open pnf-simulator's directory in your terminal. Compile and upload must be run once for each cluster.

compile pnf-simulator

Code Block
languagebash
helm package ./pnfsim --dependency-update

upload pnf-simulator

Code Block
languagebash
helm cm-push pnfsim-0.1.0.tgz xerces -f

install pnf-simulator

Code Block
languagebash
helm install pnfsim xerces/pnfsim -f ./pnfsim/values.yaml --namespace <your-namespace> --set global.masterPassword=mySec --debug

uninstall pnf-simulator

Code Block
languagebash
helm uninstall pnfsim --namespace <your-namespace>


Troubleshooting

helm repository unreachable on xerces

restart charmuseum on xerces as root:

Code Block
languagebash
chartmuseum --storage local --storage-local-rootdir /root/helm3-storage -port 8879 &


EOF Exception

sometimes when you start an install you can see an error message

Code Block
languagebash
install.go:192: [debug] Original chart version: ""
Error: INSTALLATION FAILED: unexpected EOF
helm.go:84: [debug] unexpected EOF
INSTALLATION FAILED
main.newInstallCmd.func2
	helm.sh/helm/v3/cmd/helm/install.go:141
github.com/spf13/cobra.(*Command).execute
	github.com/spf13/cobra@v1.5.0/command.go:872
github.com/spf13/cobra.(*Command).ExecuteC
	github.com/spf13/cobra@v1.5.0/command.go:990
github.com/spf13/cobra.(*Command).Execute
	github.com/spf13/cobra@v1.5.0/command.go:918
main.main
	helm.sh/helm/v3/cmd/helm/helm.go:83
runtime.main
	runtime/proc.go:250
runtime.goexit
	runtime/asm_386.s:1326

It is a bug in helm, not necessary to do anything, just rerun the installation

Strimzi-kafka can not start

You can run only one strimzi-kafka per cluster. When your strimzi-kafka can not start, maybe there is another one on the cluster in a different namespace. Uninstall the other and then restart your strimzi-kafka

Misc

Cps images:

registry.nordix.org/onaptest/cps-and-ncmp:3.1.1-SNAPSHOT-20221013T094139Z
registry.nordix.org/onaptest/cps-and-ncmp:3.1.1-SNAPSHOT-20221013T121804Z

Expose services:

kubectl expose service cps-core --port 9001 --target-port=8080 --name=cps-core-loop-back -n onap --type=NodePort
kubectl expose service pnfsim --port 9001 --target-port=6513 --name=pnfsim-loop-back -n onap --type=NodePort
kubectl expose service ncmp-dmi-plugin --port 9001 --target-port=8080 --name=ncmp-dmi-plugin-loop-back -n onap --type=NodePort

Install helm-push plugin:

helm plugin install https://github.com/chartmuseum/helm-push

Compile pnp-simulator:

docker build --tag registry.nordix.org/onaptest/netconf-pnp-simulator:2.8.6-mocked .
docker run -ti -p 6513:6513 registry.nordix.org/onaptest/netconf-pnp-simulator:2.8.6-mocked
docker push registry.nordix.org/onaptest/netconf-pnp-simulator:2.8.6-mocked

Install pnfsim:

helm package ~/git/cps/pnfsim --dependency-update
helm cm-push pnfsim-0.1.0.tgz xerces -f
helm uninstall pnfsim --namespace cps
helm install pnfsim xerces/pnfsim -f ~/git/cps/pnfsim/values.yaml --namespace cps --set global.masterPassword=mySec --debug

View file
nameTestCpsOnCluster.postman_collection.json
height250