Add DME Participant charts in ORAN_OOM 62/12662/4
authoraravind.est <aravindhan.a@est.tech>
Thu, 4 Apr 2024 19:49:13 +0000 (20:49 +0100)
committeraravind.est <aravindhan.a@est.tech>
Fri, 5 Apr 2024 13:39:16 +0000 (14:39 +0100)
DME Participant charts added to be installed as part of policy charts in onap namespace.

Issue-ID: NONRTRIC-997
Change-Id: If953b25d2fd0ff95aa99ea59a340ca014878bdce
Signed-off-by: aravind.est <aravindhan.a@est.tech>
17 files changed:
smo-install/helm-override/cnf/onap-override.yaml
smo-install/helm-override/default/onap-override.yaml
smo-install/helm-override/network-slicing/onap-override.yaml
smo-install/helm-override/pythonsdk-tests/onap-override.yaml
smo-install/oran_oom/Makefile
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/Chart.yaml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/application.yaml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/logback.xml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/authorizationpolicy.yaml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/configmap.yaml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/deployment.yaml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/kafkauser.yaml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/secrets.yaml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/service.yaml [new file with mode: 0644]
smo-install/oran_oom/policy-clamp-ac-dme-ppnt/values.yaml [new file with mode: 0644]
smo-install/scripts/sub-scripts/add-oran-acm-participants.sh [new file with mode: 0644]
smo-install/scripts/sub-scripts/build-onap.sh

index beccc62..a279001 100644 (file)
@@ -1,6 +1,7 @@
 # Copyright © 2017 Amdocs, Bell Canada
-# 
+#
 # Modifications Copyright © 2021 AT&T
+# Modifications 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.
@@ -298,11 +299,13 @@ policy:
     enabled: true
   policy-clamp-ac-http-ppnt:
     enabled: true
+  policy-clamp-ac-dme-ppnt:
+    enabled: true
 pomba:
   enabled: false
 portal:
   enabled: false
-robot: 
+robot:
   enabled: false
 sdc:
   enabled: true
index ad29d4c..6c1ae4c 100644 (file)
@@ -1,6 +1,7 @@
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Modifications Copyright © 2021 AT&T
+# Modifications 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.
@@ -185,6 +186,8 @@ policy:
         baseUrl: http://policymanagementservice.nonrtric:8081
   policy-clamp-ac-kserve-ppnt:
     enabled: true
+  policy-clamp-ac-dme-ppnt:
+    enabled: true
 sdnc:
   enabled: true
   replicaCount: 1
index d5ce917..9915e63 100644 (file)
@@ -1,6 +1,7 @@
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Modifications Copyright © 2021 AT&T
+# Modifications 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.
@@ -299,6 +300,8 @@ policy:
     enabled: true
   policy-clamp-ac-http-ppnt:
     enabled: true
+  policy-clamp-ac-dme-ppnt:
+    enabled: true
 
 pomba:
   enabled: false
index 257f9d8..d6cb81e 100644 (file)
@@ -1,6 +1,7 @@
 # Copyright © 2017 Amdocs, Bell Canada
 #
 # Modifications Copyright © 2021 AT&T
+# Modifications 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.
@@ -307,14 +308,16 @@ policy:
     enabled: true
   policy-clamp-ac-http-ppnt:
     enabled: true
+  policy-clamp-ac-dme-ppnt:
+    enabled: true
 
 pomba:
   enabled: false
-portal: 
+portal:
   enabled: false
-robot: 
-  enabled: false 
-sdc: 
+robot:
+  enabled: false
+sdc:
   enabled: false
   sdc-be:
     config:
index 4db61f6..8e106c2 100644 (file)
@@ -1,4 +1,5 @@
 # Copyright © 2017 Amdocs, Bell Canada
+# 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.
@@ -41,7 +42,7 @@ endif
 
 #SUBMODS := robot
 #EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART) dcae $(SUBMODS)
-EXCLUDES := config oneclick readiness test dist helm $(PARENT_CHART)
+EXCLUDES := config oneclick readiness test dist helm policy-clamp-ac-dme-ppnt $(PARENT_CHART)
 HELM_CHARTS := $(filter-out $(EXCLUDES), $(sort $(patsubst %/.,%,$(wildcard */.)))) $(PARENT_CHART)
 
 .PHONY: $(EXCLUDES) $(HELM_CHARTS) check-for-staging-images
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/Chart.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/Chart.yaml
new file mode 100644 (file)
index 0000000..ac4a5b0
--- /dev/null
@@ -0,0 +1,36 @@
+#  ============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: v2
+description: NONRTRIC DME ACM Participant
+name: policy-clamp-ac-dme-ppnt
+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
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
new file mode 100644 (file)
index 0000000..a279a58
--- /dev/null
@@ -0,0 +1,106 @@
+#  ============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
new file mode 100644 (file)
index 0000000..6a04af7
--- /dev/null
@@ -0,0 +1,103 @@
+<!--
+  ============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
new file mode 100644 (file)
index 0000000..06470fa
--- /dev/null
@@ -0,0 +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.authorizationPolicy" . }}
\ No newline at end of file
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/configmap.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..64098e7
--- /dev/null
@@ -0,0 +1,36 @@
+{{/*
+#  ============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
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
new file mode 100644 (file)
index 0000000..26a33c7
--- /dev/null
@@ -0,0 +1,80 @@
+{{/*
+#  ============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
new file mode 100644 (file)
index 0000000..8e8f576
--- /dev/null
@@ -0,0 +1,19 @@
+{{/*\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/templates/secrets.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..41292e0
--- /dev/null
@@ -0,0 +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
diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/service.yaml b/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/service.yaml
new file mode 100644 (file)
index 0000000..057bbfe
--- /dev/null
@@ -0,0 +1,21 @@
+{{/*\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
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
new file mode 100644 (file)
index 0000000..f75f811
--- /dev/null
@@ -0,0 +1,139 @@
+#  ============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.0.1
+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
new file mode 100644 (file)
index 0000000..6bdb4f6
--- /dev/null
@@ -0,0 +1,39 @@
+#!/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 23753b4..4fa74ea 100755 (executable)
@@ -4,8 +4,8 @@
 # ============LICENSE_START=======================================================
 # ORAN SMO Package
 # ================================================================================
-# Copyright (C) 2021 AT&T Intellectual Property. All rights
-#                             reserved.
+# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved.
+# 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.
@@ -32,5 +32,7 @@ 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)