CDS can be deployed to minikube just like all other ONAP components.

Install Kubernetes, kubectl and Helm clients according to instructions here.

Storage Class

In minikube mariadb-galera has problems to deploy because of persistence problems:

Maridb-galera problem in Minikube
2019-08-23  6:26:17 140342013503744 [Note] mysqld (mysqld 10.1.24-MariaDB) starting as process 1 ...
2019-08-23  6:26:17 140342013503744 [Note] WSREP: Read nil XID from storage engines, skipping position init
2019-08-23  6:26:17 140342013503744 [Note] WSREP: wsrep_load(): loading provider library '/usr/lib64/galera/libgalera_smm.so'
2019-08-23  6:26:17 140342013503744 [Note] WSREP: wsrep_load(): Galera 25.3.20(r3703) by Codership Oy <info@codership.com> loaded successfully.
2019-08-23  6:26:17 140342013503744 [Note] WSREP: CRC-32C: using hardware acceleration.
2019-08-23  6:26:17 140342013503744 [Note] WSREP: Found saved state: 00000000-0000-0000-0000-000000000000:-1, safe_to_bootsrap: 1
2019-08-23  6:26:17 140342013503744 [ERROR] WSREP: Requested size 134219048 for '/var/lib/mysql//galera.cache' exceeds available storage space 0: 28 (No space left on device)
         at galerautils/src/gu_fdesc.cpp:FileDescriptor():101
2019-08-23  6:26:17 140342013503744 [ERROR] WSREP: wsrep::init() failed: 7, must shutdown
2019-08-23  6:26:17 140342013503744 [ERROR] Aborting

You can check which storageclass you'll need by using "kubectl get sc":

When deploying cds or other ONAP components needing mariadb-galera, override "global.persistence.storageClass" with correct storage class.

Deploy CDS

Run Helm commands on oom/kubernetes directory after charts are packages according to instructions here.  For Frankfurt release `--set global.masterPassword=random` is required in the following commands.

helm upgrade --install dev ./onap --namespace onap \
--set cds.enabled=true \
--set mariadb-galera.enabled=true \
--set cds.cds-blueprints-processor.dmaapEnabled=false \
--set global.persistence.storageClass=standard

Deploy CDS with more overrides e.g. different image versions

helm upgrade --install dev ./onap --namespace onap \
--set cds.enabled=true \
--set mariadb-galera.enabled=true \
--set cds.cds-blueprints-processor.dmaapEnabled=false \
--set global.persistence.storageClass=standard \
--set cds.cds-blueprints-processor.image=onap/ccsdk-blueprintsprocessor:0.7.0-STAGING-latest \
--set cds.cds-command-executor.image=onap/ccsdk-commandexecutor:0.7.0-STAGING-latest \
--set cds.cds-ui.image=onap/ccsdk-cds-ui-server:0.7.0-STAGING-latest \
--set global.pullPolicy=IfNotPresent

Normally Helm charts (e.g. image versions) should be kept completely in sync with related software version, but for CDS this has not been the case. This also leads to problems that CDS may not work in the Kubernetes (where is should be run). Developers, please test CDS daily in the Kubernetes and update OOM git repo for Helm charts changes.

Result

As end result you should see CDS pods running. Note that "cds-sdc-listener" POD will never get up with this setup because it's dependent on SDC.

$ kubectl -n onap get pod
NAME                                            READY   STATUS     RESTARTS   AGE
dev-cds-blueprints-processor-5f9866676c-292j2   1/1     Running    0          23m
dev-cds-command-executor-5f58579c64-hswxj       1/1     Running    0          23m
dev-cds-db-0                                    1/1     Running    0          23m
dev-cds-sdc-listener-84c59d9dbd-89lmf           0/1     Init:0/1   2          23m
dev-cds-ui-5b669bf7dc-kjzzh                     1/1     Running    0          23m

Port forwarding  for external access to CDS-UI

Ports can be forwarded e.g. to access the CDS-UI from another machine. To forward the CDS-UI Port use the following command.

kubectl port-forward dev-cds-ui-5b669bf7dc-kjzzh -n onap --address 0.0.0.0 3000:3000

Take care to provide the right pod name and port number.  The port of CDS-UI can be displayed by:

kubectl -n onap get pod dev-cds-ui-5b669bf7dc-kjzzh --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'

Afterwards the CDS-UI should be accessable externally.

  • No labels

4 Comments

  1. I've installed this component successfully but I didn't get any data dictionary nor data type. Should I import this information from somewhere or do I need to use another git repository for creating the charts?

  2. You need to run bootstrap command for the DD, and Component to be loaded etc...

    CDS Bootstrap command for preloading the CDS Catalog Data for Data Dictionary, Node Types, and CBA:  

    Step 1:

    Edit the blueprint processor HTTP service and change the ClusterIP to NodePort. This shall expose an http external node port need to execute the curl command in step 2. 

     

    Step 2:

    Execute the Curl Command to preload the CDS Catalog Data for Data Dictionary, Node Types and CBA.  Substitute k8s and cds_http_port with the right information. 



    CDS CBA & DD Bootstrap

    curl --location --request POST 'http://{{k8s}}:{{cds_http_port}}/api/v1/blueprint-model/bootstrap' \
    --header 'Content-Type: application/json' \
    --header 'Authorization: Basic Y2NzZGthcHBzOmNjc2RrYXBwcw==' \
    --data-raw '{
    "loadModelType" : true,
    "loadResourceDictionary" : true,
    "loadCBA" : true
    }'

  3. Thank you Yuriy Malakov for your answer. I now have the dictionary and the data types.

  4. I am not able to login in mariaDB, i am using the default password for root defined in oom/kubernetes/onap/values.yml

    I am trying to login as follow in one of the pods created for mariaDB:

    kubectl -n onap exec --stdin --tty dev-mariadb-galera-0 -- /bin/bash

    mysql -u root -p (using default password = "password")

    I need to do it in other way? or i could have something wrong in my environment ? What could be ?


    Any answer will be really appreciated.