From 9989a1fdfe8e6277391e87388faeaa4c5d9494e3 Mon Sep 17 00:00:00 2001 From: "aravind.est" Date: Tue, 22 Apr 2025 14:15:40 +0100 Subject: [PATCH] Move DME participant to NONRTIC charts in SMO Install 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 --- .../helm-override/default/oran-override.yaml | 6 + smo-install/oran_oom/dmeparticipant/.helmignore | 22 ++++ .../Chart.yaml | 29 ++--- .../dmeparticipant/templates/configmap.yaml | 18 +++ .../dmeparticipant/templates/deployment.yaml | 53 ++++++++ .../templates/kafkauser.yaml} | 34 ++--- .../templates/secret.yaml} | 61 ++++----- .../templates/service.yaml | 39 +++--- smo-install/oran_oom/dmeparticipant/values.yaml | 116 +++++++++++++++++ smo-install/oran_oom/nonrtric/Chart.yaml | 5 + .../resources/config/application.yaml | 106 ---------------- .../resources/config/logback.xml | 103 --------------- .../templates/authorizationpolicy.yaml | 17 --- .../templates/deployment.yaml | 80 ------------ .../templates/kafkauser.yaml | 19 --- .../oran_oom/policy-clamp-ac-dme-ppnt/values.yaml | 139 --------------------- .../sub-scripts/add-oran-acm-participants.sh | 39 ------ smo-install/scripts/sub-scripts/build-onap.sh | 2 - .../scripts/sub-scripts/install-nonrtric.sh | 24 ++++ 19 files changed, 314 insertions(+), 598 deletions(-) create mode 100644 smo-install/oran_oom/dmeparticipant/.helmignore rename smo-install/oran_oom/{policy-clamp-ac-dme-ppnt => dmeparticipant}/Chart.yaml (60%) create mode 100644 smo-install/oran_oom/dmeparticipant/templates/configmap.yaml create mode 100644 smo-install/oran_oom/dmeparticipant/templates/deployment.yaml rename smo-install/oran_oom/{policy-clamp-ac-dme-ppnt/templates/secrets.yaml => dmeparticipant/templates/kafkauser.yaml} (81%) rename smo-install/oran_oom/{policy-clamp-ac-dme-ppnt/templates/configmap.yaml => dmeparticipant/templates/secret.yaml} (51%) rename smo-install/oran_oom/{policy-clamp-ac-dme-ppnt => dmeparticipant}/templates/service.yaml (79%) create mode 100644 smo-install/oran_oom/dmeparticipant/values.yaml delete mode 100644 smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/application.yaml delete mode 100644 smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/logback.xml delete mode 100644 smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/authorizationpolicy.yaml delete mode 100644 smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/deployment.yaml delete mode 100644 smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/kafkauser.yaml delete mode 100644 smo-install/oran_oom/policy-clamp-ac-dme-ppnt/values.yaml delete mode 100755 smo-install/scripts/sub-scripts/add-oran-acm-participants.sh diff --git a/smo-install/helm-override/default/oran-override.yaml b/smo-install/helm-override/default/oran-override.yaml index c724693e..f0fbc98b 100644 --- a/smo-install/helm-override/default/oran-override.yaml +++ b/smo-install/helm-override/default/oran-override.yaml @@ -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 index 00000000..50af0317 --- /dev/null +++ b/smo-install/oran_oom/dmeparticipant/.helmignore @@ -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/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/Chart.yaml b/smo-install/oran_oom/dmeparticipant/Chart.yaml similarity index 60% rename from smo-install/oran_oom/policy-clamp-ac-dme-ppnt/Chart.yaml rename to smo-install/oran_oom/dmeparticipant/Chart.yaml index ac4a5b0d..7bdc15a7 100644 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/Chart.yaml +++ b/smo-install/oran_oom/dmeparticipant/Chart.yaml @@ -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 @@ -12,25 +12,16 @@ # 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 index 00000000..a0fec02f --- /dev/null +++ b/smo-install/oran_oom/dmeparticipant/templates/configmap.yaml @@ -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 index 00000000..a033d376 --- /dev/null +++ b/smo-install/oran_oom/dmeparticipant/templates/deployment.yaml @@ -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 }} diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/secrets.yaml b/smo-install/oran_oom/dmeparticipant/templates/kafkauser.yaml similarity index 81% rename from smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/secrets.yaml rename to smo-install/oran_oom/dmeparticipant/templates/kafkauser.yaml index 41292e05..8521e87d 100644 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/secrets.yaml +++ b/smo-install/oran_oom/dmeparticipant/templates/kafkauser.yaml @@ -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 +{{/* +# Copyright (C) 2024-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. +*/}} + +{{ include "common.kafkauser" . }} \ 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/dmeparticipant/templates/secret.yaml similarity index 51% rename from smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/configmap.yaml rename to smo-install/oran_oom/dmeparticipant/templates/secret.yaml index 64098e79..db435d38 100644 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/configmap.yaml +++ b/smo-install/oran_oom/dmeparticipant/templates/secret.yaml @@ -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=============================================== +# 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================================================= +# + +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.name" . }}-security-secret +type: Opaque +data: + username: {{ .Values.security.username }} + password: {{ .Values.security.password }} diff --git a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/service.yaml b/smo-install/oran_oom/dmeparticipant/templates/service.yaml similarity index 79% rename from smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/service.yaml rename to smo-install/oran_oom/dmeparticipant/templates/service.yaml index 057bbfe9..6a133ed0 100644 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/service.yaml +++ b/smo-install/oran_oom/dmeparticipant/templates/service.yaml @@ -1,21 +1,18 @@ -{{/* -# ============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========================================================= -*/}} - -{{ include "common.service" . }} +# ============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 index 00000000..58f710f1 --- /dev/null +++ b/smo-install/oran_oom/dmeparticipant/values.yaml @@ -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 diff --git a/smo-install/oran_oom/nonrtric/Chart.yaml b/smo-install/oran_oom/nonrtric/Chart.yaml index c6d6a5ea..5ab9a838 100644 --- a/smo-install/oran_oom/nonrtric/Chart.yaml +++ b/smo-install/oran_oom/nonrtric/Chart.yaml @@ -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 index a279a582..00000000 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/application.yaml +++ /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 index 6a04af77..00000000 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/resources/config/logback.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - /var/log/onap/policy/dme-participant/error.log - - /var/log/onap/policy/dme-participant/error.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - WARN - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - /var/log/onap/policy/dme-participant/debug.log - - /var/log/onap/policy/dme-participant/debug.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - /var/log/onap/policy/dme-participant/network.log - - /var/log/onap/policy/dme-participant/network.%d{yyyy-MM-dd}.%i.log.zip - - 50MB - 30 - 10GB - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%t]%m%n - - - - - - - - - - [%d{yyyy-MM-dd'T'HH:mm:ss.SSS+00:00, UTC}|%level|%logger{0}|%thread] %msg%n - - - - - - - - - - - - - - - - - - - - - - - - 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 index 06470fa5..00000000 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/authorizationpolicy.yaml +++ /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 index 26a33c7e..00000000 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/deployment.yaml +++ /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 index 8e8f5769..00000000 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/templates/kafkauser.yaml +++ /dev/null @@ -1,19 +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. -*/}} - -{{ if .Values.global.useStrimziKafka }} -{{ include "common.kafkauser" . }} -{{ 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 index c7027e59..00000000 --- a/smo-install/oran_oom/policy-clamp-ac-dme-ppnt/values.yaml +++ /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 index 6bdb4f68..00000000 --- a/smo-install/scripts/sub-scripts/add-oran-acm-participants.sh +++ /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 <> ../../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 <> ../../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 diff --git a/smo-install/scripts/sub-scripts/build-onap.sh b/smo-install/scripts/sub-scripts/build-onap.sh index 4fa74eac..d76ba5a5 100755 --- a/smo-install/scripts/sub-scripts/build-onap.sh +++ b/smo-install/scripts/sub-scripts/build-onap.sh @@ -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) diff --git a/smo-install/scripts/sub-scripts/install-nonrtric.sh b/smo-install/scripts/sub-scripts/install-nonrtric.sh index 510853bc..c40027af 100755 --- a/smo-install/scripts/sub-scripts/install-nonrtric.sh +++ b/smo-install/scripts/sub-scripts/install-nonrtric.sh @@ -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 -- 2.16.6