From 2db1c70b20bf3fe03fa7c6eb79e55949fc2d12f7 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Wed, 9 Nov 2022 14:06:19 +0000 Subject: [PATCH] Add Slice assurance charts to smo install Issue-ID: NONRTRIC-723 Signed-off-by: aravind.est Change-Id: I1d875f529f5fedcfd42eb71ccb9c3491b9c20603 --- smo-install/helm-override/cnf/oran-override.yaml | 48 ++++++------- .../helm-override/default/oran-override.yaml | 46 +++++++------ .../pythonsdk-tests/oran-override.yaml | 48 ++++++------- .../standalone-nonrtric/oran-override.yaml | 2 + smo-install/oran_oom/nonrtric/Chart.yaml | 10 +++ smo-install/oran_oom/nonrtric/values.yaml | 4 +- .../oran_oom/odu-app-ics-version/.helmignore | 23 +++++++ .../oran_oom/odu-app-ics-version/Chart.yaml | 10 +++ .../odu-app-ics-version/templates/_helpers.tpl | 79 +++++++++++++++++++++ .../odu-app-ics-version/templates/deployment.yaml | 80 ++++++++++++++++++++++ .../odu-app-ics-version/templates/service.yaml | 30 ++++++++ .../oran_oom/odu-app-ics-version/values.yaml | 80 ++++++++++++++++++++++ smo-install/oran_oom/odu-app/.helmignore | 23 +++++++ smo-install/oran_oom/odu-app/Chart.yaml | 10 +++ .../oran_oom/odu-app/templates/_helpers.tpl | 79 +++++++++++++++++++++ .../oran_oom/odu-app/templates/deployment.yaml | 78 +++++++++++++++++++++ .../oran_oom/odu-app/templates/service.yaml | 30 ++++++++ smo-install/oran_oom/odu-app/values.yaml | 77 +++++++++++++++++++++ 18 files changed, 688 insertions(+), 69 deletions(-) create mode 100755 smo-install/oran_oom/odu-app-ics-version/.helmignore create mode 100755 smo-install/oran_oom/odu-app-ics-version/Chart.yaml create mode 100755 smo-install/oran_oom/odu-app-ics-version/templates/_helpers.tpl create mode 100755 smo-install/oran_oom/odu-app-ics-version/templates/deployment.yaml create mode 100755 smo-install/oran_oom/odu-app-ics-version/templates/service.yaml create mode 100755 smo-install/oran_oom/odu-app-ics-version/values.yaml create mode 100755 smo-install/oran_oom/odu-app/.helmignore create mode 100755 smo-install/oran_oom/odu-app/Chart.yaml create mode 100755 smo-install/oran_oom/odu-app/templates/_helpers.tpl create mode 100755 smo-install/oran_oom/odu-app/templates/deployment.yaml create mode 100755 smo-install/oran_oom/odu-app/templates/service.yaml create mode 100755 smo-install/oran_oom/odu-app/values.yaml diff --git a/smo-install/helm-override/cnf/oran-override.yaml b/smo-install/helm-override/cnf/oran-override.yaml index c2ccb22c..d000c291 100644 --- a/smo-install/helm-override/cnf/oran-override.yaml +++ b/smo-install/helm-override/cnf/oran-override.yaml @@ -24,7 +24,7 @@ ######### NONRTRIC ######### -nonrtric: +nonrtric: installPms: false installA1controller: false installA1simulator: true @@ -34,6 +34,8 @@ nonrtric: installNonrtricgateway: true installKong: true installORUApp: true + installODUSMOApp: true + installODUICSApp: true installTopology: true installDmaapadapterservice: true installDmaapmediatorservice: true @@ -42,21 +44,21 @@ nonrtric: # referenced by persistent volumes and log files persistence: mountPath: /dockerdata-nfs - 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 - 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 + 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 + 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 volume3: size: 1Gi - storageClassName: helmmanager-storage + storageClassName: helmmanager-storage -common: - releasePrefix: r3-dev-nonrtric - ingressClassName: kong +common: + releasePrefix: r3-dev-nonrtric + ingressClassName: kong informationservice: informationservice: @@ -68,21 +70,21 @@ informationservice: ingress: enabled: true - -# Need to check the external port Availability -policymanagementservice: - policymanagementservice: - persistence: - # 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 + +# Need to check the external port Availability +policymanagementservice: + policymanagementservice: + persistence: + # 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 ingress: enabled: true kong: ingressController: - installCRDs: false + installCRDs: false admin: enabled: true diff --git a/smo-install/helm-override/default/oran-override.yaml b/smo-install/helm-override/default/oran-override.yaml index c2ccb22c..d40e97a1 100644 --- a/smo-install/helm-override/default/oran-override.yaml +++ b/smo-install/helm-override/default/oran-override.yaml @@ -24,7 +24,7 @@ ######### NONRTRIC ######### -nonrtric: +nonrtric: installPms: false installA1controller: false installA1simulator: true @@ -34,6 +34,8 @@ nonrtric: installNonrtricgateway: true installKong: true installORUApp: true + installODUSMOApp: true + installODUICSApp: true installTopology: true installDmaapadapterservice: true installDmaapmediatorservice: true @@ -42,21 +44,21 @@ nonrtric: # referenced by persistent volumes and log files persistence: mountPath: /dockerdata-nfs - 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 - 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 + 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 + 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 volume3: size: 1Gi - storageClassName: helmmanager-storage + storageClassName: helmmanager-storage -common: - releasePrefix: r3-dev-nonrtric - ingressClassName: kong +common: + releasePrefix: r3-dev-nonrtric + ingressClassName: kong informationservice: informationservice: @@ -68,21 +70,21 @@ informationservice: ingress: enabled: true - -# Need to check the external port Availability -policymanagementservice: + +# Need to check the external port Availability +policymanagementservice: policymanagementservice: - persistence: - # 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 + persistence: + # 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 ingress: enabled: true kong: ingressController: - installCRDs: false + installCRDs: false admin: enabled: true diff --git a/smo-install/helm-override/pythonsdk-tests/oran-override.yaml b/smo-install/helm-override/pythonsdk-tests/oran-override.yaml index 27f98210..b722d130 100644 --- a/smo-install/helm-override/pythonsdk-tests/oran-override.yaml +++ b/smo-install/helm-override/pythonsdk-tests/oran-override.yaml @@ -24,7 +24,7 @@ ######### NONRTRIC ######### -nonrtric: +nonrtric: installPms: false installA1controller: false installA1simulator: true @@ -34,6 +34,8 @@ nonrtric: installNonrtricgateway: true installKong: true installORUApp: false + installODUSMOApp: false + installODUICSApp: false installTopology: true installDmaapadapterservice: true installDmaapmediatorservice: true @@ -42,21 +44,21 @@ nonrtric: # referenced by persistent volumes and log files persistence: mountPath: /dockerdata-nfs - 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 - 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 + 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 + 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 volume3: size: 1Gi - storageClassName: helmmanager-storage + storageClassName: helmmanager-storage -common: - releasePrefix: r3-dev-nonrtric - ingressClassName: kong +common: + releasePrefix: r3-dev-nonrtric + ingressClassName: kong informationservice: informationservice: @@ -68,21 +70,21 @@ informationservice: ingress: enabled: true - -# Need to check the external port Availability -policymanagementservice: - policymanagementservice: - persistence: - # 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 + +# Need to check the external port Availability +policymanagementservice: + policymanagementservice: + persistence: + # 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 ingress: enabled: true kong: ingressController: - installCRDs: false + installCRDs: false admin: enabled: true diff --git a/smo-install/helm-override/standalone-nonrtric/oran-override.yaml b/smo-install/helm-override/standalone-nonrtric/oran-override.yaml index 8506a9f6..a874e55e 100644 --- a/smo-install/helm-override/standalone-nonrtric/oran-override.yaml +++ b/smo-install/helm-override/standalone-nonrtric/oran-override.yaml @@ -35,6 +35,8 @@ nonrtric: installNonrtricgateway: true installKong: false installORUApp: false + installODUSMOApp: false + installODUICSApp: false installTopology: false installDmaapadapterservice: true installDmaapmediatorservice: true diff --git a/smo-install/oran_oom/nonrtric/Chart.yaml b/smo-install/oran_oom/nonrtric/Chart.yaml index 07703a70..19e87743 100644 --- a/smo-install/oran_oom/nonrtric/Chart.yaml +++ b/smo-install/oran_oom/nonrtric/Chart.yaml @@ -53,6 +53,16 @@ dependencies: repository: "@local" condition: nonrtric.installORUApp + - name: odu-app + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installODUSMOApp + + - name: odu-app-ics-version + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installODUICSApp + - name: topology version: ~1.0.0 repository: "@local" diff --git a/smo-install/oran_oom/nonrtric/values.yaml b/smo-install/oran_oom/nonrtric/values.yaml index d258857f..4fa6544e 100644 --- a/smo-install/oran_oom/nonrtric/values.yaml +++ b/smo-install/oran_oom/nonrtric/values.yaml @@ -25,6 +25,8 @@ nonrtric: installRappcatalogueservice: true installNonrtricgateway: true installORUApp: true + installODUSMOApp: true + installODUICSApp: true installTopology: true installKong: true installDmaapadapterservice: true @@ -43,7 +45,7 @@ nonrtric: kong: ingressController: - installCRDs: false + installCRDs: false admin: enabled: true cert-wrapper: diff --git a/smo-install/oran_oom/odu-app-ics-version/.helmignore b/smo-install/oran_oom/odu-app-ics-version/.helmignore new file mode 100755 index 00000000..0e8a0eb3 --- /dev/null +++ b/smo-install/oran_oom/odu-app-ics-version/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/odu-app-ics-version/Chart.yaml b/smo-install/oran_oom/odu-app-ics-version/Chart.yaml new file mode 100755 index 00000000..7095fb52 --- /dev/null +++ b/smo-install/oran_oom/odu-app-ics-version/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +appVersion: "1.0.0" +description: A Helm chart to deploy odu-app-ics-version version +name: odu-app-ics-version +version: 1.0.0 + +dependencies: + - name: common + version: ~10.x-0 + repository: '@local' diff --git a/smo-install/oran_oom/odu-app-ics-version/templates/_helpers.tpl b/smo-install/oran_oom/odu-app-ics-version/templates/_helpers.tpl new file mode 100755 index 00000000..8f0fc56d --- /dev/null +++ b/smo-install/oran_oom/odu-app-ics-version/templates/_helpers.tpl @@ -0,0 +1,79 @@ +{{/* +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +*/}} + +{{/* +Expand the name of the chart. +*/}} +{{- define "odu-app-ics-version.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "odu-app-ics-version.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "odu-app-ics-version.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "odu-app-ics-version.labels" -}} +helm.sh/chart: {{ include "odu-app-ics-version.chart" . }} +{{ include "odu-app-ics-version.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "odu-app-ics-version.selectorLabels" -}} +app.kubernetes.io/name: {{ include "odu-app-ics-version.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "odu-app-ics-version.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "odu-app-ics-version.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/smo-install/oran_oom/odu-app-ics-version/templates/deployment.yaml b/smo-install/oran_oom/odu-app-ics-version/templates/deployment.yaml new file mode 100755 index 00000000..f431a398 --- /dev/null +++ b/smo-install/oran_oom/odu-app-ics-version/templates/deployment.yaml @@ -0,0 +1,80 @@ +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "odu-app-ics-version.fullname" . }} + labels: + {{- include "odu-app-ics-version.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "odu-app-ics-version.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "odu-app-ics-version.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: CONSUMER_HOST + value: "{{ .Values.consumer.host }}" + - name: CONSUMER_PORT + value: "{{ .Values.consumer.port }}" + - name: SDNR_ADDR + value: "{{ .Values.sdnr.address }}" + - name: SDNR_USER + value: "{{ .Values.sdnr.user }}" + - name: SDNR_PASSWORD + value: "{{ .Values.sdnr.password }}" + - name: INFO_COORD_ADDR + value: "{{ .Values.informationcoordinator.address }}" + - name: NODE_ID + value: "{{ .Values.simulator.node }}" + ports: + - name: http + containerPort: 8095 + protocol: TCP + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/smo-install/oran_oom/odu-app-ics-version/templates/service.yaml b/smo-install/oran_oom/odu-app-ics-version/templates/service.yaml new file mode 100755 index 00000000..aad3ac1c --- /dev/null +++ b/smo-install/oran_oom/odu-app-ics-version/templates/service.yaml @@ -0,0 +1,30 @@ +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "odu-app-ics-version.fullname" . }} + labels: + {{- include "odu-app-ics-version.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "odu-app-ics-version.selectorLabels" . | nindent 4 }} diff --git a/smo-install/oran_oom/odu-app-ics-version/values.yaml b/smo-install/oran_oom/odu-app-ics-version/values.yaml new file mode 100755 index 00000000..af2e8730 --- /dev/null +++ b/smo-install/oran_oom/odu-app-ics-version/values.yaml @@ -0,0 +1,80 @@ +# Copyright (C) 2022 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= + +# Default values for odu-app-ics-version. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-rapp-ransliceassurance-icsversion + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "1.1.0" + +consumer: + host: http://odu-app-ics-version.nonrtric + port: 8095 + +sdnr: + address: http://10.1.49.120:8181 + user: admin + password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +informationcoordinator: + address: http://informationservice.nonrtric:9082 + +simulator: + node: o-du-1122 + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 8095 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/smo-install/oran_oom/odu-app/.helmignore b/smo-install/oran_oom/odu-app/.helmignore new file mode 100755 index 00000000..0e8a0eb3 --- /dev/null +++ b/smo-install/oran_oom/odu-app/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/odu-app/Chart.yaml b/smo-install/oran_oom/odu-app/Chart.yaml new file mode 100755 index 00000000..1af814a4 --- /dev/null +++ b/smo-install/oran_oom/odu-app/Chart.yaml @@ -0,0 +1,10 @@ +apiVersion: v2 +appVersion: "1.0.0" +description: A Helm chart to deploy odu-app smo version +name: odu-app +version: 1.0.0 + +dependencies: + - name: common + version: ~10.x-0 + repository: '@local' diff --git a/smo-install/oran_oom/odu-app/templates/_helpers.tpl b/smo-install/oran_oom/odu-app/templates/_helpers.tpl new file mode 100755 index 00000000..0220d2e2 --- /dev/null +++ b/smo-install/oran_oom/odu-app/templates/_helpers.tpl @@ -0,0 +1,79 @@ +{{/* +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +*/}} + +{{/* +Expand the name of the chart. +*/}} +{{- define "odu-app.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "odu-app.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "odu-app.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "odu-app.labels" -}} +helm.sh/chart: {{ include "odu-app.chart" . }} +{{ include "odu-app.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "odu-app.selectorLabels" -}} +app.kubernetes.io/name: {{ include "odu-app.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "odu-app.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "odu-app.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/smo-install/oran_oom/odu-app/templates/deployment.yaml b/smo-install/oran_oom/odu-app/templates/deployment.yaml new file mode 100755 index 00000000..7978f8fa --- /dev/null +++ b/smo-install/oran_oom/odu-app/templates/deployment.yaml @@ -0,0 +1,78 @@ +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "odu-app.fullname" . }} + labels: + {{- include "odu-app.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "odu-app.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "odu-app.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: MR_HOST + value: "{{ .Values.messagerouter.host }}" + - name: MR_PORT + value: "{{ .Values.messagerouter.port }}" + - name: SDNR_ADDR + value: "{{ .Values.sdnr.address }}" + - name: SDNR_USER + value: "{{ .Values.sdnr.user }}" + - name: SDNR_PASSWORD + value: "{{ .Values.sdnr.password }}" + - name: NODE_ID + value: "{{ .Values.simulator.node }}" + ports: + - name: http + containerPort: 80 + protocol: TCP + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/smo-install/oran_oom/odu-app/templates/service.yaml b/smo-install/oran_oom/odu-app/templates/service.yaml new file mode 100755 index 00000000..6c64790d --- /dev/null +++ b/smo-install/oran_oom/odu-app/templates/service.yaml @@ -0,0 +1,30 @@ +# Copyright (C) 2021 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "odu-app.fullname" . }} + labels: + {{- include "odu-app.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "odu-app.selectorLabels" . | nindent 4 }} diff --git a/smo-install/oran_oom/odu-app/values.yaml b/smo-install/oran_oom/odu-app/values.yaml new file mode 100755 index 00000000..4752c13e --- /dev/null +++ b/smo-install/oran_oom/odu-app/values.yaml @@ -0,0 +1,77 @@ +# Copyright (C) 2022 Nordix Foundation. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= + +# Default values for odu-app. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: nexus3.o-ran-sc.org:10004/o-ran-sc/nonrtric-rapp-ransliceassurance + pullPolicy: Always + # Overrides the image tag whose default is the chart appVersion. + tag: "1.2.0" + +messagerouter: + host: http://message-router.onap + port: 3904 + +sdnr: + address: http://10.1.49.120:8181 + user: admin + password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U + +simulator: + node: o-du-1122 + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} -- 2.16.6