Move DME participant to NONRTIC charts in SMO Install 32/14332/2
authoraravind.est <aravindhan.a@est.tech>
Tue, 22 Apr 2025 13:15:40 +0000 (14:15 +0100)
committeraravind.est <aravindhan.a@est.tech>
Tue, 22 Apr 2025 13:29:25 +0000 (14:29 +0100)
DME participant has been configured to run as part of the ONAP ACM Installation. This requires some modification of the ACM charts during the build process.
This has been moved to nonrtric charts as the access to strimzi is available from NONRTRIC namespae itself.

Issue-ID: NONRTRIC-1020
Change-Id: I9b8a70e1ed279c7b1f1515d37e185dae31503fb5
Signed-off-by: aravind.est <aravindhan.a@est.tech>
19 files changed:
smo-install/helm-override/default/oran-override.yaml
smo-install/oran_oom/dmeparticipant/.helmignore [new file with mode: 0644]
smo-install/oran_oom/dmeparticipant/Chart.yaml [moved from smo-install/oran_oom/policy-clamp-ac-dme-ppnt/Chart.yaml with 60% similarity]
smo-install/oran_oom/dmeparticipant/templates/configmap.yaml [new file with mode: 0644]
smo-install/oran_oom/dmeparticipant/templates/deployment.yaml [new file with mode: 0644]
smo-install/oran_oom/dmeparticipant/templates/kafkauser.yaml [moved from smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/secrets.yaml with 81% similarity]
smo-install/oran_oom/dmeparticipant/templates/secret.yaml [moved from smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/configmap.yaml with 51% similarity]
smo-install/oran_oom/dmeparticipant/templates/service.yaml [moved from smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/service.yaml with 79% similarity]
smo-install/oran_oom/dmeparticipant/values.yaml [new file with mode: 0644]
smo-install/oran_oom/nonrtric/Chart.yaml
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/application.yaml [deleted file]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/logback.xml [deleted file]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/authorizationpolicy.yaml [deleted file]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/deployment.yaml [deleted file]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/kafkauser.yaml [deleted file]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/values.yaml [deleted file]
smo-install/scripts/sub-scripts/add-oran-acm-participants.sh [deleted file]
smo-install/scripts/sub-scripts/build-onap.sh
smo-install/scripts/sub-scripts/install-nonrtric.sh

index c724693..f0fbc98 100644 (file)
@@ -35,6 +35,7 @@ nonrtric:
   installKong: true
   installTopology: true
   installDmaapadapterservice: true
+  installDmeparticipant: true
   installrAppmanager: true
   installCapifcore: true
   installServicemanager: true
@@ -51,6 +52,11 @@ nonrtric:
      # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning)
     size: 2Gi
     storageClassName: ics-storage
+  # 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:
+    - name: dmeparticipant-ku
+      dependsOn: nonrtric.installDmeparticipant
 
 common:
   releasePrefix: r3-dev-nonrtric
diff --git a/smo-install/oran_oom/dmeparticipant/.helmignore b/smo-install/oran_oom/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/
@@ -1,6 +1,6 @@
-#  ============LICENSE_START=======================================================
-#  Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved.
-#  ================================================================================
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023-2025 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
 #  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=================================================
 #
-#  SPDX-License-Identifier: Apache-2.0
-#  ============LICENSE_END=========================================================
 
 apiVersion: v2
-description: NONRTRIC DME ACM Participant
-name: policy-clamp-ac-dme-ppnt
+appVersion: "2.0.0"
+description: A Helm chart for DME Participant
+name: dmeparticipant
 version: 1.0.0
 
 dependencies:
-  - name: common
-    version: ~13.x-0
-    repository: '@local'
-  - name: repositoryGenerator
-    version: ~13.x-0
-    repository: '@local'
-  - name: serviceAccount
-    version: ~13.x-0
-    repository: '@local'
-  - name: readinessCheck
-    version: ~13.x-0
-    repository: '@local'
\ No newline at end of file
+  - name: nonrtric-common
+    version: ^2.0.0
+    repository: "@local"
\ No newline at end of file
diff --git a/smo-install/oran_oom/dmeparticipant/templates/configmap.yaml b/smo-install/oran_oom/dmeparticipant/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..a0fec02
--- /dev/null
@@ -0,0 +1,18 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023-2025 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=================================================
+#
+
+{{ include "common.applicationConfigmap" . }}
diff --git a/smo-install/oran_oom/dmeparticipant/templates/deployment.yaml b/smo-install/oran_oom/dmeparticipant/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..a033d37
--- /dev/null
@@ -0,0 +1,53 @@
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023-2025 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: {{- include "common.resourceMetadata" . | nindent 2 }}
+spec:
+  replicas: 1
+  selector: {{- include "common.selectors" . | nindent 4 }}
+  template:
+    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+    spec:
+      hostname: {{ include "common.name" . }}
+      containers:
+      - name: {{ include "common.containername" . }}
+        image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+        imagePullPolicy: {{ .Values.imagePullPolicy }}
+        ports: {{- include "common.containerPorts" . | nindent 8 }}
+        {{- include "common.tcpsocketProbes" . | nindent 8 }}
+        env:
+        - name: SPRING_SECURITY_USER_NAME
+          valueFrom:
+            secretKeyRef:
+              name: {{ include "common.name" . }}-security-secret
+              key: username
+        - name: SPRING_SECURITY_USER_PASSWORD
+          valueFrom:
+            secretKeyRef:
+              name: {{ include "common.name" . }}-security-secret
+              key: password
+        - name: SASL_JAAS_CONFIG
+          valueFrom:
+            secretKeyRef:
+              name: {{ include "common.name" . }}-ku
+              key: sasl.jaas.config
+        volumeMounts:
+        - name: {{ include "common.applicationConfigMountName" . }}
+          mountPath: /opt/app/participant/dme/config/
+      volumes: {{- include "common.applicationConfigVolume" . | nindent 8 }}            
@@ -1,17 +1,17 @@
-{{/*
-#  Copyright (C) 2024 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.
-*/}}
-
-{{ include "common.secretFast" . }}
\ No newline at end of file
+{{/*\r
+#  Copyright (C) 2024-2025 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
+*/}}\r
+\r
+{{ include "common.kafkauser" . }}
\ No newline at end of file
@@ -1,36 +1,25 @@
-{{/*
-#  ============LICENSE_START=======================================================
-#  Copyright (C) 2024 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.
-#
-#  SPDX-License-Identifier: Apache-2.0
-#  ============LICENSE_END=========================================================
-*/}}
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: {{ include "common.fullname" . }}-configmap
-  namespace: {{ include "common.namespace" . }}
-  labels:
-    app: {{ include "common.name" . }}
-    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
-    release: {{ include "common.release" . }}
-    heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/application.yaml").AsConfig . | indent 2 }}
-{{- if .Values.dmeconfig }}
-{{ toYaml .Values.dmeconfig | indent 4 }}
-{{- end }}
-{{ tpl (.Files.Glob "resources/config/*.{json,xml,sh}").AsConfig . | indent 2 }}
\ No newline at end of file
+#  ============LICENSE_START===============================================\r
+#  Copyright (C) 2023-2025 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" . }}-security-secret\r
+type: Opaque\r
+data:\r
+    username: {{ .Values.security.username }}\r
+    password: {{ .Values.security.password }}\r
@@ -1,21 +1,18 @@
-{{/*\r
-#  ============LICENSE_START=======================================================\r
-#  Copyright (C) 2024 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
-#\r
-#  SPDX-License-Identifier: Apache-2.0\r
-#  ============LICENSE_END=========================================================\r
-*/}}\r
-\r
-{{ include "common.service" . }}\r
+#  ============LICENSE_START===============================================
+#  Copyright (C) 2023-2025 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=================================================
+#
+
+{{ include "common.service" . }}
diff --git a/smo-install/oran_oom/dmeparticipant/values.yaml b/smo-install/oran_oom/dmeparticipant/values.yaml
new file mode 100644 (file)
index 0000000..58f710f
--- /dev/null
@@ -0,0 +1,116 @@
+#  ============LICENSE_START================================================
+#  Copyright (C) 2023-2025 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.
+
+imagePullPolicy: IfNotPresent
+image:
+  registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+  name: nonrtric-plt-participant-impl-dme
+  tag: 0.1.0
+service:
+  type: ClusterIP
+  ports:
+  - name: http
+    internalPort: "8080"
+    targetPort: "8080"
+liveness:
+  initialDelaySeconds: 20
+  periodSeconds: 10
+readiness:
+  initialDelaySeconds: 20
+  periodSeconds: 10
+ingress:
+  enabled: false
+security:
+  username: cGFydGljaXBhbnRVc2VyCg==
+  password: emIhWHp0RzM0
+
+componentName: &componentName dmeparticipant
+
+kafkaUser:
+  authenticationType: scram-sha-512
+  acls:
+    - name: *componentName
+      type: group
+      operations: [Read]
+    - name: policy-acruntime-participant
+      type: topic
+      operations: [Read, Write]
+
+application:
+  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:onap-strimzi-kafka-bootstrap.onap:9092}
+            additionalProps:
+              group.id: *componentName
+              allow.auto.create.topics: false
+              security.protocol: SASL_PLAINTEXT
+              sasl.mechanism: SCRAM-SHA-512
+              sasl.jaas.config: ${SASL_JAAS_CONFIG}
+            topicCommInfrastructure: kafka
+            fetchTimeout: 15000
+        topicSinks:
+          - topic: policy-acruntime-participant
+            servers:
+              - ${topicServer:onap-strimzi-kafka-bootstrap.onap:9092}
+            additionalProps:
+              client.id: *componentName
+              security.protocol: SASL_PLAINTEXT
+              sasl.mechanism: SCRAM-SHA-512
+              sasl.jaas.config: ${SASL_JAAS_CONFIG}
+            topicCommInfrastructure: kafka
+      participantSupportedElementTypes:
+        -
+          typeName: org.onap.policy.clamp.acm.DMEAutomationCompositionElement
+          typeVersion: 1.0.1
+        -
+          typeName: org.onap.policy.clamp.acm.AutomationCompositionElement
+          typeVersion: 1.0.0
+
+  management:
+    endpoints:
+      web:
+        base-path: /
+        exposure:
+          include: health, metrics, prometheus
+  server:
+    port: 8080
+    servlet:
+      context-path: /nonrtric/dmeparticipant
\ No newline at end of file
index c6d6a5e..5ab9a83 100644 (file)
@@ -35,6 +35,11 @@ dependencies:
     repository: "@local"
     condition: nonrtric.installA1simulator
 
+  - name: dmeparticipant
+    version: ~1.0.0
+    repository: "@local"
+    condition: nonrtric.installDmeparticipant
+
   - name: controlpanel
     version: ~2.0.0
     repository: "@local"
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/application.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/application.yaml
deleted file mode 100644 (file)
index a279a58..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-#  ============LICENSE_START=======================================================
-#  Copyright (C) 2024 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.
-
-#  SPDX-License-Identifier: Apache-2.0
-#  ============LICENSE_END=========================================================
-
-spring:
-  cloud:
-    kubernetes:
-      enabled: false
-    discovery:
-      enabled: false
-  security:
-    user:
-      name: ${RESTSERVER_USER}
-      password: ${RESTSERVER_PASSWORD}
-  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
-      - io.kubernetes.client.spring.extended.manifests.config.KubernetesManifestsAutoConfiguration
-      - io.kubernetes.client.spring.extended.network.config.KubernetesLoadBalancerAutoConfiguration
-
-security:
-  enable-csrf: false
-
-participant:
-  intermediaryParameters:
-    reportingTimeIntervalMs: 120000
-    description: Participant Description
-    participantId: 101c62b3-8918-41b9-a747-d21eb79c6c04
-    clampAutomationCompositionTopics:
-      topicSources:
-        -
-          useHttps: false
-          fetchTimeout: 15000
-          topic: {{ .Values.global.kafkaTopics.acRuntimeTopic.name }}
-          {{ if .Values.global.useStrimziKafka }}
-          topicCommInfrastructure: kafka
-          servers:
-            - {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
-          additionalProps:
-            group.id: {{ (first .Values.kafkaUser.acls).name }}
-            allow.auto.create.topics: false
-            security.protocol: SASL_PLAINTEXT
-            sasl.mechanism: {{ .Values.kafkaUser.authenticationType | upper }}
-            sasl.jaas.config: ${SASL_JAAS_CONFIG}
-          {{ else }}
-          topicCommInfrastructure: dmaap
-          servers:
-            - ${topicServer:message-router}
-          {{ end }}
-      topicSinks:
-        -
-          useHttps: false
-          fetchTimeout: 15000
-          topic: {{ .Values.global.kafkaTopics.acRuntimeTopic.name }}
-          {{ if .Values.global.useStrimziKafka }}
-          topicCommInfrastructure: kafka
-          servers:
-            - {{ include "common.release" . }}-strimzi-kafka-bootstrap:9092
-          additionalProps:
-            client.id: {{ (first .Values.kafkaUser.acls).name }}-client-id
-            security.protocol: SASL_PLAINTEXT
-            sasl.mechanism: {{ .Values.kafkaUser.authenticationType | upper }}
-            sasl.jaas.config: ${SASL_JAAS_CONFIG}
-          {{ else }}
-          topicCommInfrastructure: dmaap
-          servers:
-            - ${topicServer:message-router}
-          {{ end }}
-    participantSupportedElementTypes:
-      -
-        typeName: org.onap.policy.clamp.acm.DMEAutomationCompositionElement
-        typeVersion: 1.0.1
-      -
-        typeName: org.onap.policy.clamp.acm.AutomationCompositionElement
-        typeVersion: 1.0.0
-
-management:
-  endpoints:
-    web:
-      base-path: /
-      exposure:
-        include: health, metrics, prometheus
-server:
-  port: 8089
-  servlet:
-    context-path: /onap/policy/clamp/acm/dmeparticipant
-  ssl:
-    enabled: false
-
-
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/logback.xml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/logback.xml
deleted file mode 100644 (file)
index 6a04af7..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-<!--
-  ============LICENSE_START=======================================================
-  Copyright (C) 2024 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.
-  SPDX-License-Identifier: Apache-2.0
-  ============LICENSE_END=========================================================
--->
-
-<configuration scan="true" scanPeriod="30 seconds" debug="false">
-
-    <appender name="ErrorOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>/var/log/onap/policy/dme-participant/error.log</file>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>/var/log/onap/policy/dme-participant/error.%d{yyyy-MM-dd}.%i.log.zip
-            </fileNamePattern>
-            <maxFileSize>50MB</maxFileSize>
-            <maxHistory>30</maxHistory>
-            <totalSizeCap>10GB</totalSizeCap>
-        </rollingPolicy>
-        <filter class="ch.qos.logback.classic.filter.ThresholdFilter">
-            <level>WARN</level>
-        </filter>
-        <encoder>
-            <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <appender name="AsyncErrorOut" class="ch.qos.logback.classic.AsyncAppender">
-        <appender-ref ref="ErrorOut" />
-    </appender>
-
-    <appender name="DebugOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>/var/log/onap/policy/dme-participant/debug.log</file>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>/var/log/onap/policy/dme-participant/debug.%d{yyyy-MM-dd}.%i.log.zip
-            </fileNamePattern>
-            <maxFileSize>50MB</maxFileSize>
-            <maxHistory>30</maxHistory>
-            <totalSizeCap>10GB</totalSizeCap>
-        </rollingPolicy>
-        <encoder>
-            <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</pattern>
-        </encoder>
-    </appender>
-
-    <appender name="AsyncDebugOut" class="ch.qos.logback.classic.AsyncAppender">
-        <appender-ref ref="DebugOut" />
-    </appender>
-
-    <appender name="NetworkOut" class="ch.qos.logback.core.rolling.RollingFileAppender">
-        <file>/var/log/onap/policy/dme-participant/network.log</file>
-        <rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
-            <fileNamePattern>/var/log/onap/policy/dme-participant/network.%d{yyyy-MM-dd}.%i.log.zip
-            </fileNamePattern>
-            <maxFileSize>50MB</maxFileSize>
-            <maxHistory>30</maxHistory>
-            <totalSizeCap>10GB</totalSizeCap>
-        </rollingPolicy>
-        <encoder>
-            <pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n</pattern>
-        </encoder>
-    </appender>
-
-    <appender name="AsyncNetworkOut" class="ch.qos.logback.classic.AsyncAppender">
-        <appender-ref ref="NetworkOut" />
-    </appender>
-
-    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
-        <encoder>
-            <Pattern>[%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n</Pattern>
-        </encoder>
-    </appender>
-
-    <appender name="AsyncStdOut" class="ch.qos.logback.classic.AsyncAppender">
-        <appender-ref ref="STDOUT" />
-    </appender>
-
-    <logger name="network" level="INFO" additivity="false">
-        <appender-ref ref="AsyncNetworkOut" />
-        <appender-ref ref="AsyncStdOut" />
-    </logger>
-
-    <logger name="org.eclipse.jetty.server.RequestLog" level="info" additivity="false">
-        <appender-ref ref="AsyncNetworkOut" />
-        <appender-ref ref="AsyncStdOut" />
-    </logger>
-
-    <root level="INFO">
-        <appender-ref ref="AsyncDebugOut" />
-        <appender-ref ref="AsyncErrorOut" />
-        <appender-ref ref="AsyncStdOut" />
-    </root>
-
-</configuration>
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/authorizationpolicy.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/authorizationpolicy.yaml
deleted file mode 100644 (file)
index 06470fa..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-{{/*
-#  Copyright (C) 2024 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.
-*/}}
-
-{{ include "common.authorizationPolicy" . }}
\ No newline at end of file
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/deployment.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/deployment.yaml
deleted file mode 100644 (file)
index 26a33c7..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-{{/*
-#  ============LICENSE_START=======================================================
-#  Copyright (C) 2024 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.
-#
-#  SPDX-License-Identifier: Apache-2.0
-#  ============LICENSE_END=========================================================
-*/}}
-
-apiVersion: apps/v1
-kind: Deployment
-metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
-spec:
-  selector: {{- include "common.selectors" . | nindent 4 }}
-  replicas: {{ .Values.replicaCount }}
-  template:
-    metadata: {{- include "common.templateMetadata" . | nindent 6 }}
-    spec:
-      containers:
-        - name: {{ include "common.name" . }}
-          image: {{ .Values.image }}
-          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
-          ports: {{ include "common.containerPorts" . | nindent 12  }}
-          # disable liveness probe when breakpoints set in debugger
-          # so K8s doesn't restart unresponsive container
-          {{- if eq .Values.liveness.enabled true }}
-          livenessProbe:
-            tcpSocket:
-              port: {{ .Values.liveness.port }}
-            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
-            periodSeconds: {{ .Values.liveness.periodSeconds }}
-          {{ end -}}
-          readinessProbe:
-            tcpSocket:
-              port: {{ .Values.readiness.port }}
-            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
-            periodSeconds: {{ .Values.readiness.periodSeconds }}
-          env:
-          - name: RESTSERVER_USER
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-secret" "key" "login") | indent 12 }}
-          - name: RESTSERVER_PASSWORD
-            {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restserver-secret" "key" "password") | indent 12 }}
-{{- if .Values.global.useStrimziKafka }}
-          - name: SASL_JAAS_CONFIG
-            valueFrom:
-              secretKeyRef:
-                name: {{ include "common.name" . }}-ku
-                key: sasl.jaas.config
-{{- end }}
-          volumeMounts:
-          - mountPath: /opt/app/participant/dme/config/
-            name: ac-dme-ppnt-config
-          resources: {{ include "common.resources" . | nindent 12 }}
-        {{- if .Values.nodeSelector }}
-        nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
-        {{- end -}}
-        {{- if .Values.affinity }}
-        affinity:
-{{ toYaml .Values.affinity | indent 10 }}
-        {{- end }}
-      serviceAccountName: {{ include "common.fullname" (dict "suffix" "create" "dot" . )}}
-      volumes:
-        - name: ac-dme-ppnt-config
-          configMap:
-            name: {{ include "common.fullname" . }}-configmap
-            defaultMode: 0755
-      imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/kafkauser.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/kafkauser.yaml
deleted file mode 100644 (file)
index 8e8f576..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-{{/*\r
-#  Copyright (C) 2024 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
-*/}}\r
-\r
-{{ if .Values.global.useStrimziKafka }}\r
-{{ include "common.kafkauser" . }}\r
-{{ end }}
\ No newline at end of file
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/values.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/values.yaml
deleted file mode 100644 (file)
index c7027e5..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-#  ============LICENSE_START=======================================================
-#  Copyright (C) 2024 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.
-#
-#  SPDX-License-Identifier: Apache-2.0
-#  ============LICENSE_END=========================================================
-
-#################################################################
-# Global configuration defaults.
-#################################################################
-global:
-  persistence: {}
-  #Strimzi Kafka properties
-  useStrimziKafka: set-via-parent-chart-global-value
-  kafkaTopics:
-    acRuntimeTopic:
-      name: &acRuntimeTopic policy.clamp-runtime-acm
-
-#################################################################
-# Secrets metaconfig
-#################################################################
-secrets:
-  - uid: restserver-secret
-    type: basicAuth
-    externalSecret: '{{ tpl (default "" .Values.restServer.credsExternalSecret) . }}'
-    login: '{{ .Values.restServer.user }}'
-    password: '{{ .Values.restServer.password }}'
-    passwordPolicy: required
-
-#################################################################
-# Application configuration defaults.
-#################################################################
-# application image
-image: nexus3.o-ran-sc.org:10002/o-ran-sc/nonrtric-plt-participant-impl-dme:0.1.0
-pullPolicy: Always
-
-componentName: &componentName policy-clamp-ac-dme-ppnt
-
-# application configuration
-restServer:
-  user: participantUser
-  password: zb!XztG34
-
-# flag to enable debugging - application support required
-debugEnabled: false
-
-# default number of instances
-replicaCount: 1
-
-nodeSelector: {}
-
-affinity: {}
-ingress:
-  enabled: false
-
-serviceMesh:
-  authorizationPolicy:
-    authorizedPrincipals:
-      - serviceAccount: message-router-read
-
-# probe configuration parameters
-liveness:
-  initialDelaySeconds: 60
-  periodSeconds: 10
-  # necessary to disable liveness probe when setting breakpoints
-  # in debugger so K8s doesn't restart unresponsive container
-  enabled: true
-  port: http-dme-api
-
-readiness:
-  initialDelaySeconds: 60
-  periodSeconds: 10
-  port: http-dme-api
-
-service:
-  type: ClusterIP
-  name: *componentName
-  ports:
-    - name: http-dme-api
-      port: 8089
-
-flavor: small
-resources:
-  small:
-    limits:
-      cpu: 1
-      memory: 0.7Gi
-    requests:
-      cpu: 0.5
-      memory: 0.7Gi
-  large:
-    limits:
-      cpu: 2
-      memory: 1.4Gi
-    requests:
-      cpu: 1
-      memory: 1.4Gi
-  unlimited: {}
-#Pods Service Account
-serviceAccount:
-  nameOverride: *componentName
-  roles:
-    - create
-
-config:
-# Any new property can be added in the env by setting in overrides in the format mentioned below
-# All the added properties must be in "key: value" format instead of yaml.
-# additional:
-#   spring.config.max-size: 200
-#   spring.config.min-size: 10
-# Strimzi Kafka config
-kafkaUser:
-  authenticationType: scram-sha-512
-  acls:
-    - name: *componentName
-      type: group
-      operations: [Read]
-    - name: *acRuntimeTopic
-      type: topic
-      operations: [Read, Write]
-
-readinessCheck:
-  wait_for:
-    - message-router
-
-dmeconfig:
-  dme:
-    baseUrl: http://informationservice.nonrtric:9082
\ No newline at end of file
diff --git a/smo-install/scripts/sub-scripts/add-oran-acm-participants.sh b/smo-install/scripts/sub-scripts/add-oran-acm-participants.sh
deleted file mode 100755 (executable)
index 6bdb4f6..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/bin/bash
-# ============LICENSE_START=======================================================
-# Copyright (C) 2024 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============================================
-#
-
-echo "Copying ORAN ACM Participants..."
-
-cp -r ../../oran_oom/policy-clamp-ac-dme-ppnt ../../onap_oom/kubernetes/policy/components
-
-if ! grep -q "policy-clamp-ac-dme-ppnt" ../../onap_oom/kubernetes/policy/values.yaml; then
-    cat <<EOF >> ../../onap_oom/kubernetes/policy/values.yaml
-policy-clamp-ac-dme-ppnt:
-  enabled: true
-EOF
-fi
-
-if ! grep -q "policy-clamp-ac-dme-ppnt" ../../onap_oom/kubernetes/policy/Chart.yaml; then
-    cat <<EOF >> ../../onap_oom/kubernetes/policy/Chart.yaml
-  - name: policy-clamp-ac-dme-ppnt
-    version: ~1.0.0
-    repository: 'file://components/policy-clamp-ac-dme-ppnt'
-    condition: policy-clamp-ac-dme-ppnt.enabled
-EOF
-fi
-
-echo "ORAN ACM Participants copied and configured for build."
\ No newline at end of file
index 4fa74ea..d76ba5a 100755 (executable)
@@ -32,7 +32,5 @@ sudo apt-get install make -y
 helm plugin install ../../onap_oom/kubernetes/helm/plugins/undeploy/
 helm plugin install ../../onap_oom/kubernetes/helm/plugins/deploy/
 
-./add-oran-acm-participants.sh
-
 echo '### Building ONAP part###'
 (cd ../../onap_oom/kubernetes && make all -e SKIP_LINT=TRUE)
index 510853b..c40027a 100755 (executable)
@@ -64,6 +64,30 @@ fi
 
 helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$2"
 
+# Copying kafka secrets from onap namespace
+# SMO installation uses ONAP strimzi kafka
+# All KafkaUser and KafkaTopic resources should be created as part of ONAP namespace
+# This enables the strimzi entity operator to create the secrets as necessary
+# Once the secrets are created, it should be copied to the SMO namespace
+SECRETS_SIZE=$(yq '.nonrtric.secrets | length' $OVERRIDEYAML)
+if [ "$SECRETS_SIZE" -eq 0 ]; then
+    echo "No secrets to copy from onap namespace"
+    exit 0
+else
+    for i in $(seq 0 $((SECRETS_SIZE - 1))); do
+        secret=$(yq ".nonrtric.secrets[$i].name" $OVERRIDEYAML)
+        dependsOn=$(yq ".nonrtric.secrets[$i].dependsOn" $OVERRIDEYAML)
+        if [ $(yq ".$dependsOn" $OVERRIDEYAML) != "true" ]; then
+            echo "$dependsOn is not set to true. Skipping $secret copy..."
+            continue
+        fi
+        echo "Copying $secret from onap namespace..."
+        check_for_secrets $secret
+        kubectl get secret $secret -n onap -o json | jq 'del(.metadata["namespace","creationTimestamp","resourceVersion","selfLink","uid","ownerReferences"])' | kubectl apply -n nonrtric -f -
+    done
+fi
+
+
 if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then
     pushd ../../../nonrtric/servicemanager-preload
     # Send stderr to /dev/null to turn off chatty logging