Add NONRTRIC DME ACM Participant charts 56/12056/1
authoraravind.est <aravindhan.a@est.tech>
Thu, 16 Nov 2023 13:19:15 +0000 (13:19 +0000)
committeraravind.est <aravindhan.a@est.tech>
Thu, 16 Nov 2023 13:22:15 +0000 (13:22 +0000)
DME ACM participant charts added.
This version uses snapshot repo/image and it needs to be modified later once the release image is available.

Issue-ID: NONRTRIC-953
Signed-off-by: aravind.est <aravindhan.a@est.tech>
Change-Id: I4c9c6f4cb62c0a35d11971d6a64e37bf6b244211

14 files changed:
bin/deploy-nonrtric
nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
nonrtric/helm/dmeparticipant/.helmignore [new file with mode: 0644]
nonrtric/helm/dmeparticipant/Chart.yaml [new file with mode: 0644]
nonrtric/helm/dmeparticipant/requirements.yaml [new file with mode: 0644]
nonrtric/helm/dmeparticipant/resources/config/application.yaml [new file with mode: 0644]
nonrtric/helm/dmeparticipant/templates/configmap.yaml [new file with mode: 0644]
nonrtric/helm/dmeparticipant/templates/deployment.yaml [new file with mode: 0644]
nonrtric/helm/dmeparticipant/templates/secret.yaml [new file with mode: 0755]
nonrtric/helm/dmeparticipant/templates/service.yaml [new file with mode: 0644]
nonrtric/helm/dmeparticipant/values.yaml [new file with mode: 0644]
nonrtric/helm/nonrtric/Chart.yaml
nonrtric/helm/nonrtric/values.yaml
ric-common/Common-Template/helm/nonrtric-common/templates/dmeparticipant.tpl [new file with mode: 0644]

index ee118a0..50622ad 100755 (executable)
@@ -107,7 +107,7 @@ rm $HELM_LOCAL_REPO/*
 helm repo remove local
 $ROOT_DIR/prepare-common-templates
 
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice rappcatalogueenhancedservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager orufhrecovery ransliceassurance capifcore ranpm rappmanager"
+COMPONENTS="controlpanel a1controller a1simulator policymanagementservice informationservice rappcatalogueservice rappcatalogueenhancedservice nonrtricgateway dmaapadapterservice dmaapmediatorservice helmmanager orufhrecovery ransliceassurance capifcore ranpm rappmanager dmeparticipant"
 for component in $COMPONENTS; do
     echo "Packaging NONRTRIC component [$component]"
     helm dep up $ROOT_DIR/../nonrtric/helm/$component
index e1da6e3..2f927d4 100644 (file)
@@ -39,6 +39,7 @@ nonrtric:
   installCapifcore: true
   installRanpm: true
   installrAppmanager: true
+  installDmeParticipant: true
 
   volume1:
     # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning)
@@ -400,3 +401,26 @@ rappmanager:
     acm:
       username: cnVudGltZVVzZXI=
       password: emIhWHp0RzM0
+
+dmeparticipant:
+  dmeparticipant:
+    imagePullPolicy: IfNotPresent
+    image:
+      registry: "nexus3.o-ran-sc.org:10003/o-ran-sc"
+      name: nonrtric-plt-participant-impl-dme
+      tag: 0.0.1-SNAPSHOT
+    service:
+      httpName: http
+      internalPort1: 8080
+      targetPort1: 8080
+    liveness:
+      initialDelaySeconds: 20
+      periodSeconds: 10
+    readiness:
+      initialDelaySeconds: 20
+      periodSeconds: 10
+    ingress:
+      enabled: false
+    security:
+      username: cGFydGljaXBhbnRVc2VyCg==
+      password: emIhWHp0RzM0
diff --git a/nonrtric/helm/dmeparticipant/.helmignore b/nonrtric/helm/dmeparticipant/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -0,0 +1,22 @@
+# 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
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/nonrtric/helm/dmeparticipant/Chart.yaml b/nonrtric/helm/dmeparticipant/Chart.yaml
new file mode 100644 (file)
index 0000000..d55b76b
--- /dev/null
@@ -0,0 +1,22 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. 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
+appVersion: "2.0.0"
+description: A Helm chart for DME Participant
+name: dmeparticipant
+version: 1.0.0
diff --git a/nonrtric/helm/dmeparticipant/requirements.yaml b/nonrtric/helm/dmeparticipant/requirements.yaml
new file mode 100644 (file)
index 0000000..d0fba08
--- /dev/null
@@ -0,0 +1,21 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. 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=================================================
+#
+
+dependencies:
+  - name: nonrtric-common
+    version: ^2.0.0
+    repository: "@local"
diff --git a/nonrtric/helm/dmeparticipant/resources/config/application.yaml b/nonrtric/helm/dmeparticipant/resources/config/application.yaml
new file mode 100644 (file)
index 0000000..648a0fc
--- /dev/null
@@ -0,0 +1,45 @@
+spring:
+  autoconfigure:
+    exclude:
+      - org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
+      - org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
+      - org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration
+      - org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration
+security:
+  enable-csrf: false
+
+dme:
+  baseUrl: http://informationservice:9082
+
+participant:
+  intermediaryParameters:
+    reportingTimeIntervalMs: 120000
+    description: Participant Description
+    participantId: 101c62b3-8918-41b9-a747-d21eb79c6c08
+    clampAutomationCompositionTopics:
+      topicSources:
+        - topic: POLICY-ACRUNTIME-PARTICIPANT
+          servers:
+           - ${topicServer:message-router.default}
+          topicCommInfrastructure: dmaap
+          fetchTimeout: 15000
+      topicSinks:
+        - topic: POLICY-ACRUNTIME-PARTICIPANT
+          servers:
+           - ${topicServer:message-router.default}
+          topicCommInfrastructure: dmaap
+    participantSupportedElementTypes:
+      -
+        typeName: org.onap.policy.clamp.acm.DMEAutomationCompositionElement
+        typeVersion: 1.0.1
+
+management:
+  endpoints:
+    web:
+      base-path: /
+      exposure:
+        include: health, metrics, prometheus
+server:
+  port: 8080
+  servlet:
+    context-path: /nonrtric/dmeparticipant
diff --git a/nonrtric/helm/dmeparticipant/templates/configmap.yaml b/nonrtric/helm/dmeparticipant/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..7a2b4dd
--- /dev/null
@@ -0,0 +1,29 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. 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: ConfigMap
+metadata:
+  name: {{ include "common.name.dmeparticipant" . }}-configmap-config
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
diff --git a/nonrtric/helm/dmeparticipant/templates/deployment.yaml b/nonrtric/helm/dmeparticipant/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..790f411
--- /dev/null
@@ -0,0 +1,78 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. 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=================================================
+#
+
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+  name: {{ include "common.name.dmeparticipant" . }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  generation: 1
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    deployment.kubernetes.io/revision: '1'
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.dmeparticipant" . }}
+      containers:
+      - name: {{ include "common.container.dmeparticipant" . }}
+        image: {{ .Values.dmeparticipant.image.registry }}/{{ .Values.dmeparticipant.image.name }}:{{ .Values.dmeparticipant.image.tag }}
+        imagePullPolicy: {{ .Values.dmeparticipant.imagePullPolicy }}
+        ports:
+        - containerPort: {{ .Values.dmeparticipant.service.targetPort1 }}
+          protocol: TCP
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.dmeparticipant.service.targetPort1 }}
+          initialDelaySeconds: {{ .Values.dmeparticipant.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.dmeparticipant.liveness.periodSeconds }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.dmeparticipant.service.targetPort1 }}
+          initialDelaySeconds: {{ .Values.dmeparticipant.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.dmeparticipant.liveness.periodSeconds }}
+        env:
+        - name: SPRING_SECURITY_USER_NAME
+          valueFrom:
+            secretKeyRef:
+              name: {{ include "common.name.dmeparticipant" . }}-security-secret
+              key: username
+        - name: SPRING_SECURITY_USER_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              name: {{ include "common.name.dmeparticipant" . }}-security-secret
+              key: password
+        volumeMounts:
+        - name: {{ include "common.name.dmeparticipant" . }}-dmeparticipant-config
+          mountPath: /opt/app/participant/dme/config/
+      volumes:
+        - name: {{ include "common.name.dmeparticipant" . }}-dmeparticipant-config
+          configMap:
+            name: {{ include "common.name.dmeparticipant" . }}-configmap-config
diff --git a/nonrtric/helm/dmeparticipant/templates/secret.yaml b/nonrtric/helm/dmeparticipant/templates/secret.yaml
new file mode 100755 (executable)
index 0000000..d134413
--- /dev/null
@@ -0,0 +1,25 @@
+#  ============LICENSE_START===============================================\r
+#  Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.\r
+#  ========================================================================\r
+#  Licensed under the Apache License, Version 2.0 (the "License");\r
+#  you may not use this file except in compliance with the License.\r
+#  You may obtain a copy of the License at\r
+#\r
+#       http://www.apache.org/licenses/LICENSE-2.0\r
+#\r
+#  Unless required by applicable law or agreed to in writing, software\r
+#  distributed under the License is distributed on an "AS IS" BASIS,\r
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+#  See the License for the specific language governing permissions and\r
+#  limitations under the License.\r
+#  ============LICENSE_END=================================================\r
+#\r
+\r
+apiVersion: v1\r
+kind: Secret\r
+metadata:\r
+  name: {{ include "common.name.dmeparticipant" . }}-security-secret\r
+type: Opaque\r
+data:\r
+    username: {{ .Values.dmeparticipant.security.username }}\r
+    password: {{ .Values.dmeparticipant.security.password }}\r
diff --git a/nonrtric/helm/dmeparticipant/templates/service.yaml b/nonrtric/helm/dmeparticipant/templates/service.yaml
new file mode 100644 (file)
index 0000000..9c9f030
--- /dev/null
@@ -0,0 +1,37 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. 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=================================================
+#
+
+kind: Service
+apiVersion: v1
+metadata:
+  name: {{ include "common.name.dmeparticipant" . }}
+  namespace: {{ include "common.namespace.nonrtric" . }}
+  labels:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+    - name: {{ index .Values.dmeparticipant.service.httpName }}
+      port: {{ .Values.dmeparticipant.service.internalPort1 }}
+      targetPort: {{ .Values.dmeparticipant.service.targetPort1 }}
+      protocol: TCP
+  selector:
+    app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmeparticipant" . }}
+    release: {{ .Release.Name }}
+  type: ClusterIP
diff --git a/nonrtric/helm/dmeparticipant/values.yaml b/nonrtric/helm/dmeparticipant/values.yaml
new file mode 100644 (file)
index 0000000..92f21cf
--- /dev/null
@@ -0,0 +1,42 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023 OpenInfra Foundation Europe. 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 DME Participant.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+dmeparticipant:
+  imagePullPolicy: IfNotPresent
+  image:
+    registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+    name: nonrtric-plt-participant-impl-dme
+    tag: 1.0.0
+  service:
+    httpName: http
+    internalPort1: 8080
+    targetPort1: 8080
+  liveness:
+    initialDelaySeconds: 20
+    periodSeconds: 10
+  readiness:
+    initialDelaySeconds: 20
+    periodSeconds: 10
+  ingress:
+    enabled: false
+  security:
+    username: cGFydGljaXBhbnRVc2VyCg==
+    password: emIhWHp0RzM0
index af3e5e1..bc4b175 100644 (file)
@@ -100,3 +100,8 @@ dependencies:
     version: ~1.0.0
     repository: "@local"
     condition: nonrtric.installrAppmanager
+
+  - name: dmeparticipant
+    version: ~1.0.0
+    repository: "@local"
+    condition: nonrtric.installDmeParticipant
index c2f97c6..5ee6f53 100644 (file)
@@ -31,6 +31,7 @@ nonrtric:
   installRansliceassurance: true
   installCapifcore: true
   installrAppmanager: true
+  installDmeParticipant: true
 
   volume1:
     size: 1Gi
diff --git a/ric-common/Common-Template/helm/nonrtric-common/templates/dmeparticipant.tpl b/ric-common/Common-Template/helm/nonrtric-common/templates/dmeparticipant.tpl
new file mode 100644 (file)
index 0000000..a7629ca
--- /dev/null
@@ -0,0 +1,24 @@
+################################################################################
+#   Copyright (C) 2023 OpenInfra Foundation Europe. 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.                                             #
+################################################################################
+
+{{- define "common.name.dmeparticipant" -}}
+  {{- printf "dmeparticipant" -}}
+{{- end -}}
+
+{{- define "common.container.dmeparticipant" -}}
+  {{- $name := ( include "common.name.dmeparticipant" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}