From 6cacc1f18011ec5a71e32fe09e406ed13c8603b5 Mon Sep 17 00:00:00 2001 From: rshacham Date: Tue, 16 Jul 2019 18:44:15 +0000 Subject: [PATCH] submgr chart using common port listing Change-Id: Ic3f2a6c9b18699c54a996c82146558f4deb69e35 Signed-off-by: rshacham --- .../helm/ric-common/templates/_configmapname.tpl | 5 ++ .../helm/ric-common/templates/_containername.tpl | 5 ++ .../helm/ric-common/templates/_deploymentname.tpl | 5 ++ .../helm/ric-common/templates/_ingressname.tpl | 5 ++ .../helm/ric-common/templates/_servicename.tpl | 5 ++ ric-platform/50-RIC-Platform/bin/install | 2 +- ric-platform/50-RIC-Platform/bin/uninstall | 2 +- .../50-RIC-Platform/helm/submgr/Chart.yaml | 22 ++++++++ .../50-RIC-Platform/helm/submgr/requirements.yaml | 20 +++++++ .../helm/submgr/templates/deployment.yaml | 65 ++++++++++++++++++++++ .../50-RIC-Platform/helm/submgr/templates/env.yaml | 27 +++++++++ .../helm/submgr/templates/service-http.yaml | 42 ++++++++++++++ .../helm/submgr/templates/service-rmr.yaml | 47 ++++++++++++++++ .../50-RIC-Platform/helm/submgr/values.yaml | 33 +++++++++++ 14 files changed, 283 insertions(+), 2 deletions(-) create mode 100644 ric-platform/50-RIC-Platform/helm/submgr/Chart.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/submgr/requirements.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/submgr/templates/deployment.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/submgr/templates/env.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/submgr/templates/service-http.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/submgr/templates/service-rmr.yaml create mode 100644 ric-platform/50-RIC-Platform/helm/submgr/values.yaml diff --git a/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl index 7aa27956..1210d91a 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_configmapname.tpl @@ -46,6 +46,11 @@ {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.configmapname.submgr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.configmapname.a1mediator" -}} {{- $name := ( include "common.fullname.a1mediator" . ) -}} {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl b/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl index 3935beb9..e0dbc3b3 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_containername.tpl @@ -45,6 +45,11 @@ {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.containername.submgr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.containername.a1mediator" -}} {{- $name := ( include "common.fullname.a1mediator" . ) -}} {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl index 185bfc1b..3b11c3ee 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl @@ -45,6 +45,11 @@ {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.deploymentname.submgr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.deploymentname.a1mediator" -}} {{- $name := ( include "common.fullname.a1mediator" . ) -}} {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl b/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl index f80063f4..d10ebcf9 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_ingressname.tpl @@ -37,6 +37,11 @@ {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.ingressname.submgr" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.ingressname.a1mediator" -}} {{- $name := ( include "common.fullname.a1mediator" . ) -}} {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl index b480cec7..81d20260 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl @@ -83,6 +83,11 @@ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{- define "common.servicename.submgr.http" -}} + {{- $name := ( include "common.fullname.submgr" . ) -}} + {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{- define "common.servicename.a1mediator.http" -}} {{- $name := ( include "common.fullname.a1mediator" . ) -}} {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} diff --git a/ric-platform/50-RIC-Platform/bin/install b/ric-platform/50-RIC-Platform/bin/install index ea7f493e..fde899c6 100755 --- a/ric-platform/50-RIC-Platform/bin/install +++ b/ric-platform/50-RIC-Platform/bin/install @@ -60,7 +60,7 @@ else fi -RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp" +RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp submgr" echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]" echo "Helm Release Name: $RELEASE_NAME" diff --git a/ric-platform/50-RIC-Platform/bin/uninstall b/ric-platform/50-RIC-Platform/bin/uninstall index 38e7ca4c..153e350b 100755 --- a/ric-platform/50-RIC-Platform/bin/uninstall +++ b/ric-platform/50-RIC-Platform/bin/uninstall @@ -30,7 +30,7 @@ else RELEASE_NAME=$RICPLT_RELEASE_NAME fi -RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp" +RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator kong-platform kong-xapp submgr" echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]" diff --git a/ric-platform/50-RIC-Platform/helm/submgr/Chart.yaml b/ric-platform/50-RIC-Platform/helm/submgr/Chart.yaml new file mode 100644 index 00000000..d51c7294 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/submgr/Chart.yaml @@ -0,0 +1,22 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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 Subscription Manager Helm charts +name: submgr +version: 1.1.0 diff --git a/ric-platform/50-RIC-Platform/helm/submgr/requirements.yaml b/ric-platform/50-RIC-Platform/helm/submgr/requirements.yaml new file mode 100644 index 00000000..2ab71b4e --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/submgr/requirements.yaml @@ -0,0 +1,20 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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/submgr/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/submgr/templates/deployment.yaml new file mode 100644 index 00000000..bb4808a0 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/submgr/templates/deployment.yaml @@ -0,0 +1,65 @@ +# +#================================================================================== +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia +# +# 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. +#================================================================================== +# +# +# Abstract: Subscription Manager Kubernetes manifest +# Date: 28 May 2019 +# +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "common.deploymentname.submgr" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.submgr.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.submgr" . }} + imagePullSecrets: + - name: {{ include "common.repositoryCred" . }} + containers: + - name: {{ include "common.containername.submgr" . }} + image: {{ include "common.repository" . }}/{{ .Values.submgr.image.name }}:{{ .Values.submgr.image.tag }} + imagePullPolicy: {{ include "common.pullPolicy" . }} + command: ["/run_submgr.sh"] + envFrom: + - configMapRef: + name: {{ include "common.configmapname.submgr" . }}-env + ports: + - name: http + containerPort: {{ include "common.serviceport.submgr.http" . }} + protocol: TCP + - name: rmrroute + containerPort: {{ include "common.serviceport.submgr.rmr.route" . }} + protocol: TCP + - name: rmrdata + containerPort: {{ include "common.serviceport.submgr.rmr.data" . }} + protocol: TCP \ No newline at end of file diff --git a/ric-platform/50-RIC-Platform/helm/submgr/templates/env.yaml b/ric-platform/50-RIC-Platform/helm/submgr/templates/env.yaml new file mode 100644 index 00000000..091207b5 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/submgr/templates/env.yaml @@ -0,0 +1,27 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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.submgr" . }}-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.submgr.rmr.route" . | quote }} + diff --git a/ric-platform/50-RIC-Platform/helm/submgr/templates/service-http.yaml b/ric-platform/50-RIC-Platform/helm/submgr/templates/service-http.yaml new file mode 100644 index 00000000..ed2d790f --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/submgr/templates/service-http.yaml @@ -0,0 +1,42 @@ +# +#================================================================================== +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia +# +# 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. +#================================================================================== +# +# +# Abstract: Subscription Manager service manifest +# Date: 28 May 2019 +# +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.servicename.submgr.http" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + selector: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }} + release: {{ .Release.Name }} + clusterIP: None + ports: + - name: http + port: {{ include "common.serviceport.submgr.http" . }} + protocol: TCP + targetPort: http \ No newline at end of file diff --git a/ric-platform/50-RIC-Platform/helm/submgr/templates/service-rmr.yaml b/ric-platform/50-RIC-Platform/helm/submgr/templates/service-rmr.yaml new file mode 100644 index 00000000..3e8107e4 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/submgr/templates/service-rmr.yaml @@ -0,0 +1,47 @@ +# +#================================================================================== +# Copyright (c) 2019 AT&T Intellectual Property. +# Copyright (c) 2019 Nokia +# +# 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. +#================================================================================== +# +# +# Abstract: Subscription Manager service manifest +# Date: 28 May 2019 +# +kind: Service +apiVersion: v1 +metadata: + name: {{ include "common.servicename.submgr.rmr" . }} + namespace: {{ include "common.namespace.platform" . }} + labels: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + selector: + app: {{ include "common.namespace.platform" . }}-{{ include "common.name.submgr" . }} + release: {{ .Release.Name }} + clusterIP: None + ports: + - name: rmrdata + port: {{ include "common.serviceport.submgr.rmr.data" . }} + protocol: TCP + targetPort: rmrdata + - name: rmrroute + port: {{ include "common.serviceport.submgr.rmr.route" . }} + protocol: TCP + targetPort: rmrroute + diff --git a/ric-platform/50-RIC-Platform/helm/submgr/values.yaml b/ric-platform/50-RIC-Platform/helm/submgr/values.yaml new file mode 100644 index 00000000..f911e477 --- /dev/null +++ b/ric-platform/50-RIC-Platform/helm/submgr/values.yaml @@ -0,0 +1,33 @@ +################################################################################ +# Copyright (c) 2019 AT&T Intellectual Property. # +# Copyright (c) 2019 Nokia. # +# # +# 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 + +submgr: + + image: + name: ric-plt-submgr + tag: 0.1.1 + + replicaCount: 1 -- 2.16.6