Default volume provisioners doesn't provide proper permission for the volumes.
Hence there is an permission based issues in some containers.
Openebs provisioner able to handle the permissions properly during the volume provisioning.
Issue-ID: INT-170
Change-Id: Ifa1d284a8c39bc6fb3e73c30cccffdc30555928b
Signed-off-by: aravind.est <aravindhan.a@est.tech>
# referenced by persistent volumes and log files
persistence:
mountPath: /dockerdata-nfs
+ storageClass: &smo-sc smo-storage
# flag to enable debugging - application support required
debugEnabled: false
mariadbOperator:
appVersion: 11.1.2
persistence:
- storageClassName: mariadb-galera-sc
+ storageClassName: *smo-sc
galera:
enabled: false
postgres:
volume1:
# Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning)
size: 2Gi
- storageClassName: pms-storage
+ storageClassName: &smo-sc smo-storage
volume2:
# Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning)
size: 2Gi
- storageClassName: ics-storage
+ storageClassName: *smo-sc
# List of secrets to be copied from ONAP namespace to NONRTRIC
# Based on the dependsOn value, the secrets will be copied to the SMO namespace
secrets:
# Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
# The alternative use a dynamic volume provisioner in the cluster. Storage class can then be for instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
size: 2Gi
- storageClassName: ics-storage
+ storageClassName: *smo-sc
ingress:
enabled: true
# Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
# The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
size: 2Gi
- storageClassName: pms-storage
+ storageClassName: *smo-sc
ingress:
enabled: true
+++ /dev/null
-###############################################################################
-# Copyright (c) 2021 Nordix Foundation. #
-# #
-# 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. #
-################################################################################
-
-{{- if .Values.nonrtric.volume3.size }}
-
-kind: PersistentVolume
-apiVersion: v1
-metadata:
- name: nonrtric-pv3
- namespace: {{ include "common.namespace" . }}
-spec:
- capacity:
- storage: {{ .Values.nonrtric.volume3.size }}
- accessModes:
- - ReadWriteOnce
- - ReadWriteMany
- persistentVolumeReclaimPolicy: Retain
- hostPath:
- path: {{ .Values.nonrtric.persistence.mountPath }}/nonrtric/volume3
- storageClassName: {{ .Values.nonrtric.volume3.storageClassName }}
-
-{{- end }}
-
################################################################################
-# Copyright (c) 2021-2023 Nordix Foundation. #
-# Copyright (C) 2023-2025 OpenInfra Foundation Europe #
+# Copyright (C) 2025 OpenInfra Foundation Europe #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# limitations under the License. #
################################################################################
-kind: PersistentVolume
-apiVersion: v1
+apiVersion: storage.k8s.io/v1
+kind: StorageClass
metadata:
- name: mariadb-galera-pv
-spec:
- capacity:
- storage: 3Gi
- accessModes:
- - ReadWriteOnce
- - ReadWriteMany
- persistentVolumeReclaimPolicy: Retain
- hostPath:
- path: /dockerdata-nfs/onap/mariadb
- storageClassName: mariadb-galera-sc
+ annotations:
+ cas.openebs.io/config: |
+ - name: StorageType
+ value: "hostpath"
+ - name: BasePath
+ value: "/dockerdata/smo"
+ openebs.io/cas-type: local
+ name: smo-storage
+provisioner: openebs.io/local
+reclaimPolicy: Delete
+volumeBindingMode: WaitForFirstConsumer
kubectl get secret $secret -n onap -o json | jq 'del(.metadata["namespace","creationTimestamp","resourceVersion","selfLink","uid","ownerReferences"])' | kubectl apply -n nonrtric -f -
done
fi
+
+# Wait for the Kong deployment to be ready
+kubectl wait --for=condition=available deployment/oran-nonrtric-kong -n nonrtric
\ No newline at end of file
# ============LICENSE_END============================================
#
-# Check whether k8s is multinode or not and provide warning
-if [ $(kubectl get nodes --no-headers | wc -l) -gt 1 ]; then
- echo "----------------------------------- WARNING!!! -------------------------------------------"
- echo "This is a multi-node cluster."
- echo "----------------------------------- Node Details -----------------------------------------"
- kubectl get nodes
- echo "-------------------------------------------------------------------------------------------"
- echo "This installation uses /dockerdata-nfs as a volume mount point."
- echo "Each application creates its own sub-directory under /dockerdata-nfs."
- echo "-------------------------------------------------------------------------------------------"
- echo "If there is any previous installation, please ensure that the /dockerdata-nfs directory is empty."
- echo "Leaving any previous data in this directory may cause issues with the new installation."
- echo "-------------------------------------------------------------------------------------------"
- echo "The file permission of the sub-directory should be set to 777. "
- echo "Setting the permission to 777 is required for the application to work properly."
- echo "Hence, the following command should be run on all nodes in the cluster."
- echo "-------------------------------------------------------------------------------------------"
- echo "sudo mkdir -p /dockerdata-nfs/onap"
- echo "sudo mkdir -p /dockerdata-nfs/onap/mariadb"
- echo "sudo mkdir -p /dockerdata-nfs/onap/elastic-master-0"
- echo "sudo mkdir -p /dockerdata-nfs/onap/cps-temporal/data"
- echo "sudo mkdir -p /dockerdata-nfs/onap/strimzi-kafka/kafka-0"
- echo "sudo mkdir -p /dockerdata-nfs/onap/strimzi-kafka/zk-0"
- echo "sudo mkdir -p /dockerdata-nfs/onap/strimzi-kafka/controller-0"
- echo "sudo mkdir -p /dockerdata-nfs/onap/strimzi-kafka/broker-0"
- echo "sudo chmod -R 777 /dockerdata-nfs"
- echo "-------------------------------------------------------------------------------------------"
-else
- echo "This is a single-node cluster."
- echo "The installation will proceed with the assumption that /dockerdata-nfs is available on this node."
- echo "------------------------------------- WARNING!!! -------------------------------------------"
- echo "If there is any previous installation, please ensure that the /dockerdata-nfs directory is empty."
- echo "Leaving any previous data in this directory may cause issues with the new installation."
- echo "-------------------------------------------------------------------------------------------"
-fi
+# OpenEBS installation
+helm repo add openebs https://openebs.github.io/openebs
+helm repo update
+helm upgrade --install openebs --namespace openebs openebs/openebs --version 4.3.0 --create-namespace --set engines.replicated.mayastor.enabled=false --set engines.local.lvm.enabled=false --set engines.local.zfs.enabled=false --set loki.enabled=false --set alloy.enabled=false --wait
-# This needs to be done on all nodes in case of multi-node setup
-sudo mkdir -p /dockerdata-nfs/onap
-sudo mkdir -p /dockerdata-nfs/onap/mariadb
-sudo mkdir -p /dockerdata-nfs/onap/elastic-master-0
-sudo mkdir -p /dockerdata-nfs/onap/cps-temporal/data
-sudo mkdir -p /dockerdata-nfs/onap/strimzi-kafka/kafka-0
-sudo mkdir -p /dockerdata-nfs/onap/strimzi-kafka/zk-0
-sudo mkdir -p /dockerdata-nfs/onap/strimzi-kafka/controller-0
-sudo mkdir -p /dockerdata-nfs/onap/strimzi-kafka/broker-0
-sudo chmod -R 777 /dockerdata-nfs
+# Create storage class for smo
+kubectl apply -f ../packages/pre-configuration/smo-sc.yaml
# Mariadb operator installation
kubectl create ns mariadb-operator
helm install mariadb-operator-crds mariadb-operator/mariadb-operator-crds -n mariadb-operator
helm install mariadb-operator mariadb-operator/mariadb-operator -n mariadb-operator
kubectl wait deployment mariadb-operator -n mariadb-operator --for=condition=available --timeout=120s
-
-# K8s Volume creation as required
-kubectl apply -f ../packages/pre-configuration/mariadb-galera-pv.yaml
-
-
-
-
-
-
-
-