Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Instruction how to run CDS on Microk8s.

System Setup:

Make sure to have the correct versions of Kubernetes, kubectl and Helm installed to match the desired ONAP version. Find out required versions for onap e.g. from  https://docs.onap.org/en/latest/submodules/oom.git/docs/oom_cloud_setup_guide.html. Guide is tested on a dedicated linux box (Ubuntu 18_04).

Microk8s:

It is yet not clear which version of Microk8s works for which ONAP release. Successfuly tested is Microk8s 1.15 for Frankfurt release. E.g. the latest Microk8s version doesnt work for Frankfurt. Run the following command to install a specific version of Microk8s.

Install Microk8s
snap install microk8s --classic --channel=1.15/stable


Following commands will enable all required add-ons for CDS


Enable add-ons of Microk8s
microk8s enable storage

microk8s enable helm

microk8s enable dns 


Note the default storage class with the following command, it is required in the Helm deploy command later on.

Get storage class of Microk8s
microk8s kubectl get sc --all-namespaces

Example output:

Example output storage class
NAME                          PROVISIONER            AGE
microk8s-hostpath (default)   microk8s.io/hostpath   29s

ONAP Helm charts

  1. Clone ONAP Helm charts for specific release including submodules

    git clone --branch frankfurt--recurse-submodules "https://gerrit.onap.org/r/oom"

  2. Change to kubernetes dir

    cd oom/kubernetes

  3. Initialize Helm and configure Tiller

    Configure Tiller
    microk8s kubectl -n kube-system create serviceaccount tiller
     
    microk8s kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller
     
    microk8s helm init --service-account tiller
     
    microk8s kubectl -n kube-system rollout status deploy/tiller-deploy
    
  4. Start Helm service and initialize local Helm repository

    make repo
    # This will do same as:

    helm serve &
    helm repo add local http://127.0.0.1:8879

  5. Package ONAP Helm charts

    make

Deploy CDS

Run the following Helm command on oom/kubernetes directory do deploy CDS. Note that '--set global.masterPassword=random' is required for Frankfurt and probably newer releases. Storage class needs to be storage class from the section of Microk8s setup.

Deploy CDS
microk8s helm upgrade --install dev ./onap --namespace onap \
--set cds.enabled=true \
--set mariadb-galera.enabled=true \
--set global.masterPassword=random \
--set cds.cds-blueprints-processor.dmaapEnabled=false \
--set global.persistence.storageClass=microk8s-hostpath

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-5d74bff479-kn4jw   1/1     Running    0          8m51s
dev-cds-command-executor-745869c5f7-pt8sj       1/1     Running    0          8m51s
dev-cds-db-0                                    1/1     Running    0          8m51s
dev-cds-py-executor-7c5458f747-t88ws            1/1     Running    0          8m51s
dev-cds-sdc-listener-b5f59bdf5-ztsjc            0/1     Init:0/1   0          8m51s
dev-cds-ui-679cbf49fd-hswkd                     1/1     Running    0          8m51s
dev-mariadb-galera-0                            1/1     Running    0          8m51s
dev-mariadb-galera-1                            1/1     Running    1          4m25s
dev-mariadb-galera-2                            1/1     Running    0          2m36s

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-679cbf49fd-hswkd -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-679cbf49fd-hswkd --template='{{(index (index .spec.containers 0).ports 0).containerPort}}{{"\n"}}'

Afterwards the CDS-UI should be accessable externally.


  • No labels