Deploying SDN-C using helm chart

This wiki describes how to deploy SDN-C on a Kubernetes cluster using latest SDN-C helm chart.

Pre-requisite

This page assumes you have a configured kubernetes cluster. For more information see, Deploying Kubernetes Cluster with kubeadm.

Steps before "Configuring SDNC-ONAP" should only be followed.

Configure ONAP

Clone OOM project only on Kubernetes Master Node

As ubuntu user, clone the oom repository. 

ubuntu@k8s-s1-master:/home/ubuntu/# git clone https://gerrit.onap.org/r/oom ubuntu@k8s-s1-master:/home/ubuntu/# cd oom/kubernetes



Customize the oom/kubernetes/onap parent chart, like the values.yaml file, to suit your deployment. You may want to selectively enable or disable ONAP components by changing the subchart **enabled** flags to *true* or *false*.

ubuntu@k8s-s1-master:/home/ubuntu/# vi oom/kubernetes/onap/values.yaml Example: ... robot: # Robot Health Check enabled: true sdc: enabled: false sdnc: enabled: false so: # Service Orchestrator enabled: true



Deploy SDNC

To deploy only SDNC, customize the parent chart to disable all components except SDNC as shown in below file. Also set the global.persistence.mountPath to some non-mounted directory (by default, it is set to mounted directory /dockerdata-nfs).

ubuntu@k8s-s1-master:/home/ubuntu/oom/kubernetes# sudo mkdir /onapDev #Note that all components are changed to enabled:false except sdnc (and underlying mysql). Here we set number of SDNC/MySQL replica to 3/2. #Note that global.persistence.mountPath is set to non-mounted directory /onapDev (this is required to be done since we will keep nfs-provisioner as enabled in SDN-C configuration) ubuntu@k8s-s1-master:/home/ubuntu/oom/kubernetes# cat ~/oom/kubernetes/onap/values.yaml # Copyright © 2017 Amdocs, Bell Canada # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. ################################################################# # Global configuration overrides. # # These overrides will affect all helm charts (ie. applications) # that are listed below and are 'enabled'. ################################################################# global: # Change to an unused port prefix range to prevent port conflicts # with other instances running within the same k8s cluster nodePortPrefix: 302 # ONAP Repository # Uncomment the following to enable the use of a single docker # repository but ONLY if your repository mirrors all ONAP # docker images. This includes all images from dockerhub and # any other repository that hosts images for ONAP components. #repository: nexus3.onap.org:10001 repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== # readiness check - temporary repo until images migrated to nexus3 readinessRepository: oomk8s # logging agent - temporary repo until images migrated to nexus3 loggingRepository: docker.elastic.co # image pull policy pullPolicy: Always # default mount path root directory referenced # by persistent volumes and log files persistence: mountPath: /onapDev # flag to enable debugging - application support required debugEnabled: false ################################################################# # Enable/disable and configure helm charts (ie. applications) # to customize the ONAP deployment. ################################################################# aaf: enabled: false aai: enabled: false appc: enabled: false clamp: enabled: false cli: enabled: false consul: enabled: false dcaegen2: enabled: false esr: enabled: false log: enabled: false message-router: enabled: false mock: enabled: false msb: enabled: false multicloud: enabled: false policy: enabled: false portal: enabled: false robot: enabled: false sdc: enabled: false sdnc: enabled: true replicaCount: 3 config: enableClustering: false mysql: disableNfsProvisioner: true replicaCount: 2 so: enabled: false 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 uui: enabled: false vfc: enabled: false vid: enabled: false vnfsdk: enabled: false ubuntu@k8s-s1-master:/home/ubuntu/oom/kubernetes#

Note: If you set number of sdnc/mysql replicas in onap/values.yaml, it will overrides the setting you are about to do in the next step.

Customize the oom/kubernetes/sdnc chart, like the values.yaml file, to configure number of replicas for SDN-C and MySQL service as per your deployment needs.

  a) To configure mysql replicas edit mysql.replicaCount

  b) To configure sdnc replicas edit replicaCount



Run below command to setup a local Helm repository to serve up the local ONAP charts:



If you don't find the local repo, add it manually.

Note the IP(localhost) and port number that is listed in above response (8879 here) and use it in "helm repo add" command as follows:



Install "make" ( Learn more about ubuntu-make here : https://wiki.ubuntu.com/ubuntu-make)  and build a local Helm repository (from the kubernetes directory):

Setup of this Helm repository is a one time activity. If you make changes to your deployment charts or values, make sure to run **make** command again to update your local Helm repository.



If Change 41597 , has not been merged ,  create persistent volumes to be available for claim by persistent volumes claim created during MySQL pods deployment. (As of today, late April 2018, the change has been merged and you don't need to create PVs per following step.)



Once the repo is setup, installation of ONAP can be done with a single command:



Downgrade helm

 The helm installation procedure will put the latest version of it on your master node.  Then Tiller (helm server) version will follow the helm (helm client) version and Tiller version will be also the latest.

If helm/tiller version on your K8S master node is not  what ONAP installation wants, you  will get “Chart incompatible with Tiller v2.9.1”. See below:



ubuntu@kanatamaster:~/oominstall/kubernetes$ helm install local/onap --name dev --namespace onap

Error: Chart incompatible with Tiller v2.9.1

ubuntu@kanatamaster:~/oominstall/kubernetes$

A temporary fix for this will be often downgrading helm/tiller.  Here is the procedure:

Step 1)  downgrade helm client (helm)

Step 2) downgrade helm server (Tiller)

Use helm rest, . Follow the below steps:

The **--namespace onap** is currently required while all onap helm charts are migrated to version 2.0. After this activity is complete, namespaces will be optional.



Use the following to monitor your deployment and determine when ONAP is ready for use:



Cleanup deployed ONAP instance

To delete a deployed instance, use the following command:



Also, delete the existing persistent volumes and persistent volume claim in "onap" namespace:



Delete everything inside the chosen global.persistentPath in during SDN-C deployment: