From 733a5063ec4577ff3d04c4f44535516a02ade874 Mon Sep 17 00:00:00 2001 From: wrider Date: Fri, 1 Nov 2019 17:31:46 -0400 Subject: [PATCH] Add rsm and dbaas1 charts Change-Id: I4d434d88f716d1573bcd2ba31a6759651a549a3f Signed-off-by: wrider --- README.md | 42 +++++++ ric-platform/50-RIC-Platform/bin/install | 2 +- ric-platform/50-RIC-Platform/bin/uninstall | 2 +- .../50-RIC-Platform/helm/dbaas1/Chart.yaml | 21 ++++ .../50-RIC-Platform/helm/dbaas1/requirements.yaml | 19 +++ .../helm/dbaas1/templates/_helper.tpl | 49 ++++++++ .../helm/dbaas1/templates/deployment.yaml | 54 ++++++++ .../helm/dbaas1/templates/service.yaml | 35 ++++++ .../50-RIC-Platform/helm/dbaas1/values.yaml | 32 +++++ ric-platform/50-RIC-Platform/helm/rsm/Chart.yaml | 21 ++++ .../50-RIC-Platform/helm/rsm/requirements.yaml | 19 +++ .../helm/rsm/templates/configmap.yaml | 139 +++++++++++++++++++++ .../helm/rsm/templates/deployment.yaml | 77 ++++++++++++ .../50-RIC-Platform/helm/rsm/templates/env.yaml | 28 +++++ .../helm/rsm/templates/ingress-rsm.yaml | 27 ++++ .../helm/rsm/templates/service-http.yaml | 36 ++++++ .../helm/rsm/templates/service-rmr.yaml | 40 ++++++ ric-platform/50-RIC-Platform/helm/rsm/values.yaml | 52 ++++++++ 18 files changed, 693 insertions(+), 2 deletions(-) create mode 100644 ric-platform/50-RIC-Platform/helm/dbaas1/Chart.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/dbaas1/requirements.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/dbaas1/templates/_helper.tpl create mode 100644 ric-platform/50-RIC-Platform/helm/dbaas1/templates/deployment.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/dbaas1/templates/service.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/dbaas1/values.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/Chart.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/requirements.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/templates/configmap.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/templates/deployment.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/templates/env.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/templates/ingress-rsm.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/templates/service-http.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/templates/service-rmr.yaml create mode 100755 ric-platform/50-RIC-Platform/helm/rsm/values.yaml diff --git a/README.md b/README.md index 02860d78..04ac0383 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,45 @@ + + +[comment]: <> ( Copyright (c) 2019 AT&T Intellectual Property. ) +[comment]: <> ( Licensed under the Creative Commons License, Attribution 4.0 Intl. (the +[comment]: <> ( "License") +[comment]: <> ( you may not use this file except in compliance with the License. +[comment]: <> ( You may obtain a copy of the License at # +[comment]: <> ( # +[comment]: <> ( http://www.apache.org/licenses/LICENSE-2.0 # +# licensedunder the Creative Commons License, Attribution 4.0 Intl. (the"Documentation License"); you may not use this documentation except incompliance with the Documentation License. You may obtain a copy of theDocumentation License athttps://creativecommons.org/licenses/by/4.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. # + + +This is a comment, it will not be included) +[comment]: <> (in the output file unless you use it in) +[comment]: <> (a reference style link.) + + # RIC Integration This repo contains RAN Intelligent Controller (RIC) deployments related files. diff --git a/ric-platform/50-RIC-Platform/bin/install b/ric-platform/50-RIC-Platform/bin/install index c49d1875..7e46ad91 100755 --- a/ric-platform/50-RIC-Platform/bin/install +++ b/ric-platform/50-RIC-Platform/bin/install @@ -48,7 +48,7 @@ GLOBAL_BLOCK=$(cat $OVERRIDEYAML | awk '/^global:/{getline; while ($0 ~ /^ +.*|^ NAMESPACE_BLOCK=$(cat $OVERRIDEYAML | awk '/^ namespace:/{getline; while ($0 ~ /^ .*|^ *$/) {print $0; if (getline == 0) {break}}}') NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *platform:/{print $2}') RELEASE_PREFIX=$(echo "$GLOBAL_BLOCK" | awk '/^ *releasePrefix:/{print $2}') -COMPONENTS=${LIST_OF_COMPONENTS:-"appmgr rtmgr e2mgr e2term a1mediator submgr vespamgr jaegeradapter"} +COMPONENTS=${LIST_OF_COMPONENTS:-"appmgr rtmgr dbaas1 e2mgr e2term a1mediator submgr vespamgr rsm jaegeradapter"} echo "Deploying RIC infra components [$COMPONENTS]" diff --git a/ric-platform/50-RIC-Platform/bin/uninstall b/ric-platform/50-RIC-Platform/bin/uninstall index bad70194..88c021eb 100755 --- a/ric-platform/50-RIC-Platform/bin/uninstall +++ b/ric-platform/50-RIC-Platform/bin/uninstall @@ -16,7 +16,7 @@ # limitations under the License. # ################################################################################ -COMPONENTS="appmgr rtmgr e2mgr e2term a1mediator submgr vespamgr jaegeradapter" +COMPONENTS="appmgr rtmgr dbaas1 e2mgr e2term a1mediator submgr vespamgr rsm jaegeradapter" echo "Undeploying RIC platform components [$COMPONENTS]" diff --git a/ric-platform/50-RIC-Platform/helm/dbaas1/Chart.yaml b/ric-platform/50-RIC-Platform/helm/dbaas1/Chart.yaml new file mode 100644 index 00000000..0af02a38 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/dbaas1/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +apiVersion: v1 +appVersion: "1.0" +description: DBaaS realized with standalone, non-persistent, non-redundant Redis +name: dbaas1 +version: 1.1.0 diff --git a/ric-platform/50-RIC-Platform/helm/dbaas1/requirements.yaml b/ric-platform/50-RIC-Platform/helm/dbaas1/requirements.yaml new file mode 100644 index 00000000..e753fb5a --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/dbaas1/requirements.yaml @@ -0,0 +1,19 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +dependencies: + - name: ric-common + version: ~2.0.0 diff --git a/ric-platform/50-RIC-Platform/helm/dbaas1/templates/_helper.tpl b/ric-platform/50-RIC-Platform/helm/dbaas1/templates/_helper.tpl new file mode 100644 index 00000000..5d643806 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/dbaas1/templates/_helper.tpl @@ -0,0 +1,49 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "dbaas.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "dbaas.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "dbaas.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + diff --git a/ric-platform/50-RIC-Platform/helm/dbaas1/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/dbaas1/templates/deployment.yaml new file mode 100644 index 00000000..44b0a81b --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/dbaas1/templates/deployment.yaml @@ -0,0 +1,54 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "common.deploymentname.dbaas" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.dbaas.backend.replicas }} + selector: + matchLabels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }} + release: {{ .Release.Name }} + template: + metadata: + {{- if .Values.dbaas.annotations }} + annotations: + {{- .Values.dbaas.annotations | nindent 8 -}} + {{ end }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }} + release: {{ .Release.Name }} + spec: + imagePullSecrets: + - name: {{ include "common.repositoryCred" . }} + terminationGracePeriodSeconds: {{ .Values.dbaas.backend.terminationGracePeriodSeconds }} + containers: + - image: {{ include "common.repository" . }}/{{ .Values.dbaas.backend.image.name }}:{{ .Values.dbaas.backend.image.tag }} + imagePullPolicy: {{ include "common.pullPolicy" . }} + ports: + - containerPort: {{ include "common.serviceport.dbaas.tcp" . }} + name: sql + protocol: TCP + name: {{ include "common.containername.dbaas" . }} + restartPolicy: Always diff --git a/ric-platform/50-RIC-Platform/helm/dbaas1/templates/service.yaml b/ric-platform/50-RIC-Platform/helm/dbaas1/templates/service.yaml new file mode 100644 index 00000000..591594bb --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/dbaas1/templates/service.yaml @@ -0,0 +1,35 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename.dbaas.tcp" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + selector: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.dbaas" . }} + release: {{ .Release.Name }} + ports: + - port: {{ include "common.serviceport.dbaas.tcp" . }} + targetPort: "sql" + protocol: "TCP" + name: "sql" diff --git a/ric-platform/50-RIC-Platform/helm/dbaas1/values.yaml b/ric-platform/50-RIC-Platform/helm/dbaas1/values.yaml new file mode 100644 index 00000000..11be791f --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/dbaas1/values.yaml @@ -0,0 +1,32 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +repository: "nexus3.o-ran-sc.org:10004" +imagePullPolicy: IfNotPresent +repositoryCred: docker-reg-cred + +dbaas: + backend: + terminationGracePeriodSeconds: 0 + replicas: 1 + image: + name: ric-plt-dbaas + tag: 0.1.0 + + # Service ports are now defined in + # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file. + # If need to change a service port, make the code change necessary, then + # update the _ports.tpl file with the new port number. diff --git a/ric-platform/50-RIC-Platform/helm/rsm/Chart.yaml b/ric-platform/50-RIC-Platform/helm/rsm/Chart.yaml new file mode 100755 index 00000000..96f586cd --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/Chart.yaml @@ -0,0 +1,21 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +appVersion: "1.0" +apiVersion: v1 +description: Oran rsm Helm charts +name: rsm +version: 2.0.6 diff --git a/ric-platform/50-RIC-Platform/helm/rsm/requirements.yaml b/ric-platform/50-RIC-Platform/helm/rsm/requirements.yaml new file mode 100755 index 00000000..75eee1bf --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/requirements.yaml @@ -0,0 +1,19 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +dependencies: + - name: ric-common + version: ~2.0.6 diff --git a/ric-platform/50-RIC-Platform/helm/rsm/templates/configmap.yaml b/ric-platform/50-RIC-Platform/helm/rsm/templates/configmap.yaml new file mode 100755 index 00000000..c8eca961 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/templates/configmap.yaml @@ -0,0 +1,139 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.configmapname.rsm" . }}-router-configmap + namespace: {{ include "common.namespace.platform" . }} +data: + rmr_verbose: | + 0 + router.txt: | + newrt|start + rte|10090|{{ include "common.servicename.e2term.rmr" . }}.{{ include "common.namespace.platform" . }}:{{ include "common.serviceport.e2term.rmr.data" . }} + newrt|end +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.configmapname.rsm" . }} + namespace: {{ include "common.namespace.platform" . }} +data: + configuration.yaml: | + logging: + {{- if hasKey .Values.rsm "logLevel" }} + logLevel: {{ .Values.rsm.logLevel }} + {{- else }} + logLevel: "info" + {{- end }} + http: + {{- if hasKey .Values.rsm "httpPort" }} + port: {{ .Values.rsm.httpPort }} + {{- else }} + port: 4800 + {{- end }} + rmr: + {{- if hasKey .Values.rsm "rmrPort" }} + port: {{ .Values.rsm.rmrPort }} + {{- else }} + port: 4801 + {{- end }} + {{- if hasKey .Values.rsm "maxMsgSize" }} + maxMsgSize: {{ .Values.rsm.maxMsgSize }} + {{- else }} + maxMsgSize: 4096 + {{- end }} + {{- if hasKey .Values.rsm "readyIntervalSec" }} + readyIntervalSec: {{ .Values.rsm.readyIntervalSec }} + {{- else }} + readyIntervalSec: 1 + {{- end }} + rnib: + {{- if hasKey .Values.rsm "maxRnibConnectionAttempts" }} + maxRnibConnectionAttempts: {{ .Values.rsm.maxRnibConnectionAttempts }} + {{- else }} + maxRnibConnectionAttempts: 3 + {{- end }} + {{- if hasKey .Values.rsm "rnibRetryIntervalMs" }} + rnibRetryIntervalMs: {{ .Values.rsm.rnibRetryIntervalMs }} + {{- else }} + rnibRetryIntervalMs: 10 + {{- end }} + characteristics: + {{- if hasKey .Values.rsm "enableResourceStatus" }} + enableResourceStatus: {{ .Values.rsmenableResourceStatus }} + {{- else }} + enableResourceStatus: true + {{- end }} + {{- if hasKey .Values.rsm "prbPeriodic" }} + prbPeriodic: {{ .Values.rsm.prbPeriodic }} + {{- else }} + prbPeriodic: true + {{- end }} + {{- if hasKey .Values.rsm "tnlLoadIndPeriodic" }} + tnlLoadIndPeriodic: {{ .Values.rsm.tnlLoadIndPeriodic }} + {{- else }} + tnlLoadIndPeriodic: true + {{- end }} + {{- if hasKey .Values.rsm "hwLoadIndPeriodic" }} + hwLoadIndPeriodic: {{ .Values.rsm.hwLoadIndPeriodic }} + {{- else }} + hwLoadIndPeriodic: true + {{- end }} + {{- if hasKey .Values.rsm "absStatusPeriodic" }} + absStatusPeriodic: {{ .Values.rsm.absStatusPeriodic }} + {{- else }} + absStatusPeriodic: true + {{- end }} + {{- if hasKey .Values.rsm "rsrpMeasurementPeriodic" }} + rsrpMeasurementPeriodic: {{ .Values.rsm.rsrpMeasurementPeriodic }} + {{- else }} + rsrpMeasurementPeriodic: true + {{- end }} + {{- if hasKey .Values.rsm "csiPeriodic" }} + csiPeriodic: {{ .Values.rsm.csiPeriodic }} + {{- else }} + csiPeriodic: true + {{- end }} + {{- if hasKey .Values.rsm "periodicityMs" }} + periodicityMs: {{ .Values.rsm.periodicityMs }} + {{- else }} + periodicityMs: 1 + {{- end }} + {{- if hasKey .Values.rsm "periodicityRsrpMeasurementMs" }} + periodicityRsrpMeasurementMs: {{ .Values.rsm.periodicityRsrpMeasurementMs }} + {{- else }} + periodicityRsrpMeasurementMs: 120 + {{- end }} + {{- if hasKey .Values.rsm "periodicityCsiMs" }} + periodicityCsiMs: {{ .Values.rsm.periodicityCsiMs }} + {{- else }} + periodicityCsiMs: 5 + {{- end }} + resourceStatusParams: + enableResourceStatus: true + partialSuccessAllowed: true + prbPeriodic: true + tnlLoadIndPeriodic: true + hwLoadIndPeriodic: true + absStatusPeriodic: true + rsrpMeasurementPeriodic: true + csiPeriodic: true + periodicityMs: 1000 + periodicityRsrpMeasurementMs: 480 + periodicityCsiMs: 20 +--- diff --git a/ric-platform/50-RIC-Platform/helm/rsm/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/rsm/templates/deployment.yaml new file mode 100755 index 00000000..49005392 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/templates/deployment.yaml @@ -0,0 +1,77 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "common.deploymentname.rsm" .}} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rsm" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.rsm.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rsm" . }} + release: {{ .Release.Name }} + template: + metadata: + {{- if .Values.rsm.annotations }} + annotations: + {{- .Values.rsm.annotations | nindent 8 -}} + {{ end }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rsm" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.rsm" . }} + imagePullSecrets: + - name: {{ include "common.repositoryCred" . }} + containers: + - name: {{ include "common.containername.rsm" . }} + image: {{ include "common.repository" . }}/{{ .Values.rsm.image.name }}:{{ .Values.rsm.image.tag }} + imagePullPolicy: {{ include "common.pullPolicy" . }} + volumeMounts: + - mountPath: /opt/RSM/router.txt + name: local-router-file + subPath: router.txt + - mountPath: /opt/RSM/resources/configuration.yaml + name: local-configuration-file + subPath: configuration.yaml + envFrom: + - configMapRef: + name: {{ include "common.configmapname.rsm" . }}-env + ports: + - name: "http" + containerPort: {{ include "common.serviceport.rsm.http" . }} + - name: "rmrroute" + containerPort: {{ include "common.serviceport.rsm.rmr.route" . }} + - name: "rmrdata" + containerPort: {{ include "common.serviceport.rsm.rmr.data" . }} + stdin: true + tty: true + securityContext: + privileged: {{ .Values.rsm.privilegedmode}} + volumes: + - name: local-router-file + configMap: + name: {{ include "common.configmapname.rsm" . }}-router-configmap + - name: local-configuration-file + configMap: + name: {{ include "common.configmapname.rsm" . }} diff --git a/ric-platform/50-RIC-Platform/helm/rsm/templates/env.yaml b/ric-platform/50-RIC-Platform/helm/rsm/templates/env.yaml new file mode 100755 index 00000000..9fad361a --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/templates/env.yaml @@ -0,0 +1,28 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.configmapname.rsm" . }}-env +data: + DBAAS_SERVICE_HOST: {{ include "common.servicename.dbaas.tcp" . | quote }} + DBAAS_SERVICE_PORT: {{ include "common.serviceport.dbaas.tcp" . | quote }} + DBAAS_PORT_6379_TCP_ADDR: {{ include "common.servicename.dbaas.tcp" . | quote }} + DBAAS_PORT_6379_TCP_PORT: {{ include "common.serviceport.dbaas.tcp" . | quote }} + RMR_RTG_SVC: {{ include "common.serviceport.rsm.rmr.route" . | quote }} + + + diff --git a/ric-platform/50-RIC-Platform/helm/rsm/templates/ingress-rsm.yaml b/ric-platform/50-RIC-Platform/helm/rsm/templates/ingress-rsm.yaml new file mode 100755 index 00000000..bbafd62c --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/templates/ingress-rsm.yaml @@ -0,0 +1,27 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ +apiVersion: networking.k8s.io/v1beta1 +kind: Ingress +metadata: + name: {{ include "common.ingressname.rsm" . }} +spec: + rules: + - http: + paths: + - path: {{ include "common.kongpath.ric.rsm" . }} + backend: + serviceName: {{ include "common.servicename.rsm.http" . }} + servicePort: {{ include "common.serviceport.rsm.http" . }} diff --git a/ric-platform/50-RIC-Platform/helm/rsm/templates/service-http.yaml b/ric-platform/50-RIC-Platform/helm/rsm/templates/service-http.yaml new file mode 100755 index 00000000..05dbb505 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/templates/service-http.yaml @@ -0,0 +1,36 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename.rsm.http" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rsm" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: ClusterIP + ports: + - port: {{ include "common.serviceport.rsm.http" . }} + protocol: "TCP" + name: "http" + targetPort: "http" + selector: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rsm" . }} + release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/rsm/templates/service-rmr.yaml b/ric-platform/50-RIC-Platform/helm/rsm/templates/service-rmr.yaml new file mode 100755 index 00000000..c328bc87 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/templates/service-rmr.yaml @@ -0,0 +1,40 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.servicename.rsm.rmr" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rsm" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: ClusterIP + ports: + - port: {{ include "common.serviceport.rsm.rmr.route" . }} + protocol: "TCP" + name: "rmrroute" + targetPort: "rmrroute" + - port: {{ include "common.serviceport.rsm.rmr.data" . }} + protocol: "TCP" + name: "rmrdata" + targetPort: "rmrdata" + selector: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.rsm" . }} + release: {{ .Release.Name }} diff --git a/ric-platform/50-RIC-Platform/helm/rsm/values.yaml b/ric-platform/50-RIC-Platform/helm/rsm/values.yaml new file mode 100755 index 00000000..6aaa94fd --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/rsm/values.yaml @@ -0,0 +1,52 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# # +# 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. # +################################################################################ + +################################################################# +# Application configuration defaults. +################################################################# +# application image + +repository: "nexus3.o-ran-sc.org:10004" +imagePullPolicy: IfNotPresent +repositoryCred: docker-reg-cred + + +# Uncomment the following line to override the docker registry +#repositoryOverride: "" + + +# Uncomment the following line to override the docker registry credential +#repositoryCredOverride: "" + +# Uncomment the following line to override the image pull policy +#imagePullPolicyOverride: "" + + +rsm: + image: + name: ric-plt-rsm + tag: 2.0.6 + + privilegedmode: false + + replicaCount: 1 + enableResourceStatus: true + + + # Service ports are now defined in + # ric-common/Common-Template/helm/ric-common/templates/_ports.tpl file. + # If need to change a service port, make the code change necessary, then + # update the _ports.tpl file with the new port number. -- 2.16.6