Add chart for VESPA Mgr 01/901/4
authorwrider <lji@research.att.com>
Thu, 5 Sep 2019 17:26:29 +0000 (13:26 -0400)
committerLusheng Ji <lji@research.att.com>
Thu, 5 Sep 2019 18:02:10 +0000 (18:02 +0000)
Signed-off-by: wrider <lji@research.att.com>
Change-Id: Ie6e1f977ec7eed84f28272c9dc8e2d44d73b8b33
Signed-off-by: wrider <lji@research.att.com>
16 files changed:
RECIPE_EXAMPLE/RIC_PLATFORM_RECIPE_EXAMPLE
ric-common/Common-Template/helm/ric-common/Chart.yaml
ric-common/Common-Template/helm/ric-common/templates/_containername.tpl
ric-common/Common-Template/helm/ric-common/templates/_deploymentname.tpl
ric-common/Common-Template/helm/ric-common/templates/_name.tpl
ric-common/Common-Template/helm/ric-common/templates/_ports.tpl
ric-common/Common-Template/helm/ric-common/templates/_servicename.tpl
ric-platform/50-RIC-Platform/bin/install
ric-platform/50-RIC-Platform/bin/uninstall
ric-platform/50-RIC-Platform/helm/vespamgr/.helmignore [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/vespamgr/Chart.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/vespamgr/README [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/vespamgr/requirements.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/vespamgr/templates/deployment.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/vespamgr/templates/service.yaml [new file with mode: 0644]
ric-platform/50-RIC-Platform/helm/vespamgr/values.yaml [new file with mode: 0644]

index c89eb5a..c8e9c04 100644 (file)
@@ -156,6 +156,14 @@ submgr:
     name: ric-plt-submgr
     tag: 0.5.0
 
+# VESPA Manager
+vespamgr:
+  # Use the following option to override the docker registry value
+  # repositoryOverride:
+  image:
+    name: ric-plt-vespamgr
+    tag: 0.0.1
+
 # the service for redirecting to AUX cluster
 extsvcplt:
   auxip:
index cc0d1cb..597dd54 100644 (file)
@@ -18,4 +18,4 @@
 apiVersion: v1
 description: Common templates for inclusion in other charts
 name: ric-common
-version: 2.0.3
+version: 2.0.4
index b80a7ad..913ed16 100644 (file)
   {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
+{{- define "common.containername.vespamgr" -}}
+  {{- $name := ( include "common.fullname.vespamgr" . ) -}}
+  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
 {{- define "common.containername.nexus" -}}
   {{- $name := ( include "common.fullname.nexus" . ) -}}
   {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
index c7a0ed2..e946ed3 100644 (file)
   {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
+{{- define "common.deploymentname.vespamgr" -}}
+  {{- $name := ( include "common.fullname.vespamgr" . ) -}}
+  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
 {{- define "common.deploymentname.nexus" -}}
   {{- $name := ( include "common.fullname.nexus" . ) -}}
   {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}
index bbfce4f..6402565 100644 (file)
 {{- end -}}
 
 
+{{- define "common.name.vespamgr" -}}
+  {{- if .Values.vespamgr -}}
+    {{- if .Values.vespamgr.nameOverride -}}
+      {{- printf "%s" .Values.vespamgr.nameOverride -}}
+    {{- else -}}
+      {{- printf "vespamgr" -}}
+    {{- end -}}
+  {{- else -}}
+    {{- printf "vespamgr" -}}
+  {{- end -}}
+{{- end -}}
+
+
+{{- define "common.fullname.vespamgr" -}}
+  {{- $name := ( include "common.name.vespamgr" . ) -}}
+  {{- $namespace := ( include "common.namespace.platform" . ) -}}
+  {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+
+
 
 {{- define "common.name.nexus" -}}
   {{- if .Values.nexus -}}
index c5db065..0b9b6a5 100644 (file)
@@ -53,6 +53,8 @@
 {{- define "common.serviceport.appmgr.rmr.route" -}}4561{{- end -}}
 {{- define "common.serviceport.appmgr.http" -}}8080{{- end -}}
 
+{{- define "common.serviceport.vespamgr.http" -}}8080{{- end -}}
+
 {{- define "common.serviceport.nexus.http" -}}8080{{- end -}}
 
 {{- define "common.serviceport.chartmuseum.http" -}}8080{{- end -}}
index 4d82848..509daed 100644 (file)
   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
 {{- end -}}
 
+{{- define "common.servicename.vespamgr.http" -}}
+  {{- $name := ( include "common.fullname.vespamgr" . ) -}}
+  {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
 {{- define "common.servicename.nexus.http" -}}
   {{- $name := ( include "common.fullname.nexus" . ) -}}
   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
index ddfeaaf..c14781a 100755 (executable)
@@ -60,7 +60,7 @@ else
 fi
 
 
-RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr"
+RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr vespamgr"
 
 echo "Deploying RIC Platform components [$RICPLT_COMPONENTS]"
 echo "Helm Release Name: $RELEASE_NAME"
index 9baaf5e..21a8e3f 100755 (executable)
@@ -30,7 +30,7 @@ else
    RELEASE_NAME=$RICPLT_RELEASE_NAME
 fi
 
-RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr"
+RICPLT_COMPONENTS="appmgr rtmgr dbaas e2mgr e2term a1mediator submgr vespamgr"
 
 
 echo "Undeploying RIC Platform components [$RICPLT_COMPONENTS]"
diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/.helmignore b/ric-platform/50-RIC-Platform/helm/vespamgr/.helmignore
new file mode 100644 (file)
index 0000000..d29b399
--- /dev/null
@@ -0,0 +1,37 @@
+#   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.
+
+# 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/ric-platform/50-RIC-Platform/helm/vespamgr/Chart.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/Chart.yaml
new file mode 100644 (file)
index 0000000..8b224af
--- /dev/null
@@ -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.
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Kubernetes
+name: vespamgr
+version: 0.0.1
diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/README b/ric-platform/50-RIC-Platform/helm/vespamgr/README
new file mode 100644 (file)
index 0000000..9e7d7fe
--- /dev/null
@@ -0,0 +1 @@
+The files under this directory and the subdirectories can be used as an example.
diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/requirements.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/requirements.yaml
new file mode 100644 (file)
index 0000000..2ab71b4
--- /dev/null
@@ -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/vespamgr/templates/deployment.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/templates/deployment.yaml
new file mode 100644 (file)
index 0000000..9ea0639
--- /dev/null
@@ -0,0 +1,59 @@
+#   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: apps/v1
+kind: Deployment
+metadata:
+  name: {{ include "common.deploymentname.vespamgr" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.vespamgr.replicaCount }}
+  selector:
+    matchLabels:
+      app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+      release: {{ .Release.Name }}
+  template:
+    metadata:
+      {{- if .Values.vespamgr.annotations }}
+      annotations:
+        {{- .Values.vespamgr.annotations | nindent 8 -}}
+      {{ end }}
+      labels:
+        app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+        release: {{ .Release.Name }}
+    spec:
+      hostname: {{ include "common.name.vespamgr" . }}
+      imagePullSecrets:
+        - name: {{ include "common.repositoryCred" . }}
+      containers:
+        - name: {{ include "common.containername.vespamgr" . }}
+          image: {{ include "common.repository" . }}/{{ .Values.vespamgr.image.name }}:{{ .Values.vespamgr.image.tag }}
+          imagePullPolicy: {{ include "common.pullPolicy" . }}
+          ports:
+            - name: http
+              containerPort: {{ include "common.serviceport.vespamgr.http" . }}
+              protocol: TCP
+          #envFrom:
+          #  - configMapRef:
+          #      name: vespa-config
+          #  - secretRef:
+          #      name: vespa-secrets
+
+
diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/templates/service.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/templates/service.yaml
new file mode 100644 (file)
index 0000000..cb26519
--- /dev/null
@@ -0,0 +1,35 @@
+#   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: Service
+metadata:
+  name: {{ include "common.servicename.vespamgr.http" . }}
+  namespace: {{ include "common.namespace.platform" . }}
+  labels:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: ClusterIP
+  ports:
+    - port: {{ include "common.serviceport.vespamgr.http" . }}
+      protocol: "TCP"
+      name: "http"
+      targetPort: "http"
+  selector:
+    app: {{ include "common.namespace.platform" . }}-{{ include "common.name.vespamgr" . }}
+    release: {{ .Release.Name }}
diff --git a/ric-platform/50-RIC-Platform/helm/vespamgr/values.yaml b/ric-platform/50-RIC-Platform/helm/vespamgr/values.yaml
new file mode 100644 (file)
index 0000000..0b4024b
--- /dev/null
@@ -0,0 +1,37 @@
+################################################################################
+#   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
+
+vespamgr:
+  replicaCount: 1
+
+  image:
+    name: ric-plt-vespamgr
+    tag: 0.0.1
+
+  # 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.