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