adding aux functions MR and VES Collector 20/220/6
authorrshacham <rshacham@research.att.com>
Thu, 30 May 2019 20:44:08 +0000 (20:44 +0000)
committerrshacham <rshacham@research.att.com>
Fri, 7 Jun 2019 14:30:26 +0000 (14:30 +0000)
Change-Id: I0375935ea22a4906383d5f63794bc282bd8178f4
Signed-off-by: rshacham <rshacham@research.att.com>
41 files changed:
ric-aux/80-Auxiliary-Functions/bin/install
ric-aux/80-Auxiliary-Functions/bin/uninstall
ric-aux/80-Auxiliary-Functions/helm/message-router/.helmignore [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/Chart.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/.helmignore [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/Chart.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/poddisruptionbudget.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/pv.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/service-hs.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/service.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/statefulset.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/values.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/.helmignore [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/Chart.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/_zkquorum.tpl [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/poddisruptionbudget.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/pv.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/service.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/statefulset.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/values.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/MsgRtrApi.properties [new file with mode: 0755]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/cadi.properties [new file with mode: 0755]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/mykey [new file with mode: 0755]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/mr_clusters/san-francisco.json [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PM_MAPPER.json [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PNF_READY.json [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PNF_REGISTRATION.json [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/README [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/mirrormakeragent.json [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/templates/configmap.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/templates/secrets.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/templates/service.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/templates/statefulset.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/message-router/values.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/ves/.helmignore [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/ves/Chart.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/ves/templates/_helpers.tpl [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/ves/templates/configmap.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml [new file with mode: 0644]
ric-aux/80-Auxiliary-Functions/helm/ves/values.yaml [new file with mode: 0644]

index de7c09b..e759f66 100755 (executable)
@@ -36,7 +36,7 @@ else
    NAMESPACE=$RICAUX_NAMESPACE
 fi
 
-RICAUX_COMPONENTS="dashboard"
+RICAUX_COMPONENTS="dashboard ves message-router"
 
 echo "Deploying RIC AUX components [$RICAUX_COMPONENTS]"
 echo "Platform Namespace: $NAMESPACE"
index 9ab2775..91e56e8 100755 (executable)
@@ -35,7 +35,7 @@ else
    NAMESPACE=$RICAUX_NAMESPACE
 fi
 
-RICAUX_COMPONENTS="dashboard"
+RICAUX_COMPONENTS="dashboard message-router ves"
 
 echo "Undeploying RIC AUX components [$RICAUX_COMPONENTS]"
 echo "Platform Namespace: $NAMESPACE"
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/.helmignore b/ric-aux/80-Auxiliary-Functions/helm/message-router/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/Chart.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/Chart.yaml
new file mode 100644 (file)
index 0000000..e0267cc
--- /dev/null
@@ -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.                                             #
+################################################################################
+
+
+apiVersion: v1
+description: ONAP Message Router
+name: message-router
+version: 1.1.0
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/.helmignore b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/Chart.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/Chart.yaml
new file mode 100644 (file)
index 0000000..50be1b4
--- /dev/null
@@ -0,0 +1,23 @@
+################################################################################
+#   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
+description: ONAP Message Router Kafka Service
+name: message-router-kafka
+version: 1.1.0
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/poddisruptionbudget.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/poddisruptionbudget.yaml
new file mode 100644 (file)
index 0000000..5c2db8c
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright © 2018  AT&T
+#
+# 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: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "common.fullname" . }}-pdb
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+  maxUnavailable: 1
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/pv.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/pv.yaml
new file mode 100644 (file)
index 0000000..44c9576
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright © 2018 Amdocs, Bell Canada, AT&T
+#
+# 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.
+
+{{- $root := . -}}
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{ range $i, $e := until (atoi (quote $root.Values.replicaCount) | default 3) }}
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+  name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }}
+  namespace: {{ $root.Release.Namespace }}
+  labels:
+    app: {{ $root.Values.service.name }}
+    chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }}
+    release: {{ $root.Release.Name }}
+    heritage: {{ $root.Release.Service }}
+spec:
+  capacity:
+    storage: {{ $root.Values.persistence.size }}
+  accessModes:
+    - {{ $root.Values.persistence.accessMode }}
+  hostPath:
+    path: {{ $root.Values.persistence.mountPath }}/{{ $root.Release.Name }}/{{ $root.Values.persistence.mountSubPath }}-{{ $i }}
+  persistentVolumeReclaimPolicy: {{ $root.Values.persistence.volumeReclaimPolicy }}
+{{ end }}
+{{ end }}
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/service-hs.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/service-hs.yaml
new file mode 100644 (file)
index 0000000..0dabe55
--- /dev/null
@@ -0,0 +1,34 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
+#
+# 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: {{ .Values.service.name }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  ports:
+    - port: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.portName }}
+  clusterIP: None
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/service.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/service.yaml
new file mode 100644 (file)
index 0000000..8200eda
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright © 2019 AT&T
+#
+# 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.
+
+{{- $root := . -}}
+{{ range $i, $e := until (atoi (quote $root.Values.replicaCount) | default 3) }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: {{ $root.Values.service.name }}-{{ $i }}
+  namespace: {{ $root.Release.Namespace }}
+  labels:
+    app: {{ $root.Values.service.name }}
+    chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }}
+    release: {{ $root.Release.Name }}
+    heritage: {{ $root.Release.Service }}
+
+spec:
+  type: {{ $root.Values.service.type }} 
+  externalTrafficPolicy: Local
+  selector:
+   statefulset.kubernetes.io/pod-name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }}
+  ports:
+    - port: {{ $root.Values.service.externalPort }}
+      targetPort: {{ $root.Values.service.externalPort }}
+      nodePort: {{ $root.Values.service.baseNodePort  | add $i }}
+      name: {{ $root.Values.service.name }}-{{ $i }}
+{{ end }}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/statefulset.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..0e38ed5
--- /dev/null
@@ -0,0 +1,179 @@
+################################################################################
+#   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/v1beta1
+kind: StatefulSet
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  serviceName: {{ .Values.service.name }}
+  replicas: {{ .Values.replicaCount }}
+  podManagementPolicy: Parallel
+  template:
+    metadata:
+      labels:
+        app:  {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      podAntiAffinity:
+         {{if eq .Values.podAntiAffinityType "hard" -}}
+         requiredDuringSchedulingIgnoredDuringExecution:
+         {{- else -}}
+         preferredDuringSchedulingIgnoredDuringExecution:
+         {{- end}}
+         - weight: 1
+           podAffinityTerm:
+             labelSelector:
+                matchExpressions:
+                  - key: "app"
+                    operator: In
+                    values:
+                    - {{ include "common.name" . }}
+             topologyKey: "kubernetes.io/hostname"
+      {{- if .Values.nodeAffinity }}
+      nodeAffinity:
+        {{ toYaml .Values.nodeAffinity | indent 10 }}
+      {{- end }}
+      initContainers:
+      - name: {{ include "common.name" . }}-initcontainer
+        image: "{{ .Values.global.ubuntuInitRepository }}/{{ .Values.ubuntuInitImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+      - command:
+        -  sh
+        - -exec
+        - |
+          chown -R 1000:1000 /opt/kafka/data;
+        image: "{{ .Values.busyBoxRepository }}/{{ .Values.busyBoxImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /opt/kafka/data
+          name: kafka-data
+        name: {{ include "common.name" . }}-permission-fixer
+      containers:
+      - name: {{ include "common.name" .  }}
+        image: "{{ .Values.onapRepository }}/{{ .Values.image }}"
+        imagePullPolicy:  {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+        - sh
+        - -exc
+        - |
+          export KAFKA_BROKER_ID=${HOSTNAME##*-} && \
+          export ENDPOINT_PORT=$(( $KAFKA_BROKER_ID + {{ .Values.service.baseNodePort }} )) && \
+          export KAFKA_ADVERTISED_LISTENERS=EXTERNAL_SASL_PLAINTEXT://$(HOST_IP):$(( $KAFKA_BROKER_ID + {{ .Values.service.baseNodePort }} )),INTERNAL_SASL_PLAINTEXT://:{{ .Values.service.internalPort }} && \
+          exec start-kafka.sh
+        resources:
+{{ include "common.resources" . | indent 12 }}
+        ports:
+        - containerPort: {{ .Values.service.internalPort }}
+        - containerPort: {{ .Values.service.externalPort }}
+       {{ if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end }}
+        readinessProbe:
+          tcpSocket:
+            port: {{ .Values.service.internalPort }}
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        env:
+        - name: HOST_IP
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: status.hostIP
+        - name: KAFKA_ZOOKEEPER_CONNECT
+          value: "{{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}"
+        - name: KAFKA_LISTENER_SECURITY_PROTOCOL_MAP
+          value: "INTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT,EXTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT"
+        - name: KAFKA_LISTENERS
+          value: "EXTERNAL_SASL_PLAINTEXT://0.0.0.0:{{ .Values.service.externalPort }},INTERNAL_SASL_PLAINTEXT://0.0.0.0:{{ .Values.service.internalPort }}"
+        - name: KAFKA_INTER_BROKER_LISTENER_NAME
+          value: "INTERNAL_SASL_PLAINTEXT"
+        - name: KAFKA_SASL_ENABLED_MECHANISMS
+          value: "PLAIN"
+        - name: KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL
+          value: "PLAIN"
+        - name: KAFKA_AUTHORIZER_CLASS_NAME
+          value: "{{ .Values.kafkaCustomAuthorizer }}"
+        - name: KAFKA_DELETE_TOPIC_ENABLE
+          value: "{{ .Values.deleteTopicEnable }}"
+        - name: aaf_locate_url
+          value: "https://aaf-locate:8095"
+        - name: KAFKA_LOG_DIRS
+          value: "/opt/kafka/data"
+        - name: KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR
+          value: "{{ .Values.replicaCount }}"
+        - name: KAFKA_DEFAULT_REPLICATION_FACTOR
+          value: "{{ .Values.replicaCount }}"
+        - name: KAFKA_NUM_PARTITIONS
+          value: "{{ .Values.defaultpartitions }}"
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /var/run/docker.sock
+          name: docker-socket
+        - mountPath: /opt/kafka/data
+          name: kafka-data
+      {{- if .Values.tolerations }}
+      tolerations:
+        {{ toYaml .Values.tolerations | indent 10 }}
+      {{- end }}
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+      - name: docker-socket
+        hostPath:
+          path: /var/run/docker.sock
+{{ if not .Values.persistence.enabled }}
+      - name: kafka-data
+        emptyDir: {}
+{{ else }}
+  volumeClaimTemplates:
+    - metadata:
+        name: kafka-data
+        labels:
+          app: {{ include "common.fullname" . }}
+          chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+          release: "{{ .Release.Name }}"
+          heritage: "{{ .Release.Service }}"
+      spec:
+        accessModes:
+          - {{ .Values.persistence.accessMode | quote }}
+        resources:
+          requests:
+            storage: {{ .Values.persistence.size | quote }}
+        selector:
+          matchLabels:
+            release: "{{ .Release.Name }}"
+            app: {{ .Values.service.name }}
+            chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+            heritage: "{{ .Release.Service }}"
+{{ end }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-kafka/values.yaml
new file mode 100644 (file)
index 0000000..f765ebb
--- /dev/null
@@ -0,0 +1,140 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:2.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+  persistence: {}
+  ubuntuInitRepository: registry.hub.docker.com
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+onapRepository: nexus3.onap.org:10001
+image: onap/dmaap/kafka111:1.0.0
+pullPolicy: Always
+ubuntuInitImage: oomk8s/ubuntu-init:2.0.0
+busyBoxImage: busybox:1.30
+busyBoxRepository: docker.io
+
+
+zookeeper:
+  name: message-router-zookeeper
+  port: 2181
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# default number of instances
+replicaCount: 3
+
+#Kafka custom authorizer class name
+kafkaCustomAuthorizer: org.onap.dmaap.kafkaAuthorize.KafkaCustomAuthorizer
+deleteTopicEnable: true
+
+# To access Kafka outside cluster, this value must be set to hard and the number of nodes in K8S cluster must be equal or greater then replica count
+podAntiAffinityType: soft
+
+# defult partitions
+defaultpartitions: 3
+
+nodeSelector: {}
+
+nodeAffinity: {}
+
+affinity: {}
+
+tolerations: {}
+
+
+
+# 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
+
+readiness:
+  initialDelaySeconds: 60
+  periodSeconds: 10
+
+## Persist data to a persitent volume
+persistence:
+  enabled: false
+
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  # storageClass: "-"
+  accessMode: ReadWriteMany
+  size: 2Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: message-router/data-kafka
+
+service:
+  type: NodePort
+  name: message-router-kafka
+  portName: message-router-kafka
+  internalPort: 9092
+  externalPort: 9093
+  baseNodePort: 30490
+
+  
+
+ingress:
+  enabled: false
+
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 2000m
+      memory: 4Gi
+    requests:
+      cpu: 100m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 4000m
+      memory: 8Gi
+    requests:
+      cpu: 200m
+      memory: 2Gi
+  unlimited: {}
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/.helmignore b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/.helmignore
new file mode 100644 (file)
index 0000000..f0c1319
--- /dev/null
@@ -0,0 +1,21 @@
+# 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
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/Chart.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/Chart.yaml
new file mode 100644 (file)
index 0000000..5e9c6fa
--- /dev/null
@@ -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.                                             #
+################################################################################
+
+
+apiVersion: v1
+description: ONAP Dmaap Message Router Zookeeper Service
+name: message-router-zookeeper
+version: 1.1.0
\ No newline at end of file
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/_zkquorum.tpl b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/_zkquorum.tpl
new file mode 100644 (file)
index 0000000..9af910e
--- /dev/null
@@ -0,0 +1,34 @@
+{{/*
+# Copyright © 2019 Amdocs, Bell Canada
+#
+# 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.
+*/}}
+
+{{- /*
+    Calculate the maximum number of zk server down in order to guarantee ZK quorum.
+    For guaranteeing ZK quorum we need half of the server + 1 up.
+
+    div in go template cast return an int64
+    so we need to know if it is an even number or an odd.
+    For this we are doing (n/2)*2=n?
+    if true it is even else it is even
+*/ -}}
+{{- define "zk.maxUnavailable" -}}
+{{- $halfReplica := div .Values.replicaCount 2 -}}
+ {{/* divide by 2 and multiply by 2 in order to know if it is an even number*/}}
+    {{if eq (mul $halfReplica 2) (int .Values.replicaCount) }}
+        {{- toYaml  (sub $halfReplica 1) -}}
+    {{else}}
+        {{- toYaml $halfReplica -}}
+    {{end}}
+{{- end -}}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/poddisruptionbudget.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/poddisruptionbudget.yaml
new file mode 100644 (file)
index 0000000..5a370cd
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright © 2018  AT&T
+#
+# 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: policy/v1beta1
+kind: PodDisruptionBudget
+metadata:
+  name: {{ include "common.fullname" . }}-pdb
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  selector:
+    matchLabels:
+      app: {{ include "common.name" . }}
+  maxUnavailable: {{ include "zk.maxUnavailable" . }}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/pv.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/pv.yaml
new file mode 100644 (file)
index 0000000..44c9576
--- /dev/null
@@ -0,0 +1,39 @@
+# Copyright © 2018 Amdocs, Bell Canada, AT&T
+#
+# 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.
+
+{{- $root := . -}}
+{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) -}}
+{{ range $i, $e := until (atoi (quote $root.Values.replicaCount) | default 3) }}
+---
+apiVersion: v1
+kind: PersistentVolume
+metadata:
+  name: {{ $root.Release.Name }}-{{ $root.Values.service.name }}-{{ $i }}
+  namespace: {{ $root.Release.Namespace }}
+  labels:
+    app: {{ $root.Values.service.name }}
+    chart: {{ $root.Chart.Name }}-{{ $root.Chart.Version | replace "+" "_" }}
+    release: {{ $root.Release.Name }}
+    heritage: {{ $root.Release.Service }}
+spec:
+  capacity:
+    storage: {{ $root.Values.persistence.size }}
+  accessModes:
+    - {{ $root.Values.persistence.accessMode }}
+  hostPath:
+    path: {{ $root.Values.persistence.mountPath }}/{{ $root.Release.Name }}/{{ $root.Values.persistence.mountSubPath }}-{{ $i }}
+  persistentVolumeReclaimPolicy: {{ $root.Values.persistence.volumeReclaimPolicy }}
+{{ end }}
+{{ end }}
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/service.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/service.yaml
new file mode 100644 (file)
index 0000000..da494b0
--- /dev/null
@@ -0,0 +1,38 @@
+# Copyright © 2018 Amdocs, AT&T, Bell Canada
+# Modifications Copyright © 2018 AT&T
+#
+# 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: {{ .Values.service.name }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+   - port: {{ .Values.service.clientPort }}
+     name: {{ .Values.service.clientPortName }}
+   - port: {{ .Values.service.serverPort }}
+     name: {{ .Values.service.serverPortName }}
+   - port: {{ .Values.service.leaderElectionPort }}
+     name: {{ .Values.service.leaderElectionPortName }}
+  clusterIP: None
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
\ No newline at end of file
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/statefulset.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..61f0a35
--- /dev/null
@@ -0,0 +1,150 @@
+################################################################################
+#   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/v1beta1
+kind: StatefulSet
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  serviceName: {{ .Values.service.name }}
+  replicas: {{ .Values.replicaCount }}
+  updateStrategy:
+    type: RollingUpdate
+    rollingUpdate:
+      maxUnavailable: {{ .Values.maxUnavailable }}
+  podManagementPolicy: Parallel
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      podAntiAffinity:
+         preferredDuringSchedulingIgnoredDuringExecution:
+         - weight: 1
+           podAffinityTerm:
+             labelSelector:
+                matchExpressions:
+                  - key: "app"
+                    operator: In
+                    values:
+                    - {{ include "common.name" . }}
+             topologyKey: "kubernetes.io/hostname"
+      {{- if .Values.nodeAffinity }}
+      nodeAffinity:
+        {{ toYaml .Values.nodeAffinity | indent 10 }}
+      {{- end }}
+      initContainers:
+      - name: {{ include "common.name" . }}-permission-fixer
+        command:
+        - sh
+        - -exec
+        - >
+          chown -R 1000:1000 /tmp/zookeeper/apikeys;
+        image: "{{ .Values.busyBoxRepository }}/{{ .Values.busyBoxImage }}"
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        volumeMounts:
+        - mountPath: /tmp/zookeeper/apikeys
+          name: zookeeper-data
+      containers:
+      - name: {{ include "common.name" . }}
+        image: "{{ .Values.onapRepository }}/{{ .Values.image }}"
+        imagePullPolicy:  {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        resources:
+{{ include "common.resources" . | indent 12 }}
+        ports:
+        - containerPort: {{ .Values.service.clientPort }}
+          name: {{ .Values.service.clientPortName }}
+        - containerPort: {{ .Values.service.serverPort }}
+          name: {{ .Values.service.serverPortName }}
+        - containerPort: {{ .Values.service.leaderElectionPort }}
+          name: {{ .Values.service.leaderElectionPortName }}
+        {{ if eq .Values.liveness.enabled true }}
+        livenessProbe:
+          exec:
+            command:
+            - sh
+            - -c
+            - "zookeeper-ready.sh 2181"
+          initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.liveness.periodSeconds }}
+        {{ end }}
+        readinessProbe:
+          exec:
+            command:
+            - sh
+            - -c
+            - "zookeeper-ready.sh 2181"
+          initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+          periodSeconds: {{ .Values.readiness.periodSeconds }}
+        env:
+        - name: ZK_REPLICAS
+          value: "{{ .Values.replicaCount }}"
+        - name: ZK_INIT_LIMIT
+          value: "{{ .Values.zk.initLimit }}"
+        - name: ZK_SYNC_LIMIT
+          value: "{{ .Values.zk.syncLimit }}"
+        volumeMounts:
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: /var/lib/zookeeper/data
+          name: zookeeper-data
+      {{- if .Values.tolerations }}
+      tolerations:
+        {{ toYaml .Values.tolerations | indent 10 }}
+      {{- end }}
+      volumes:
+      - name: localtime
+        hostPath:
+          path: /etc/localtime
+{{ if not .Values.persistence.enabled }}
+      - name: zookeeper-data
+        emptyDir: {}
+{{ else }}
+  volumeClaimTemplates:
+    - metadata:
+        name:  zookeeper-data
+        labels:
+          app:  {{ include "common.fullname" . }}
+          chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+          release: "{{ .Release.Name }}"
+          heritage: "{{ .Release.Service }}"
+      spec:
+        accessModes:
+          - {{ .Values.persistence.accessMode | quote }}
+        resources:
+          requests:
+            storage: {{ .Values.persistence.size | quote }}
+        selector:
+          matchLabels:
+            release: "{{ .Release.Name }}"
+            app: {{ .Values.service.name }}
+            chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
+            heritage: "{{ .Release.Service }}"
+{{ end }}
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/charts/message-router-zookeeper/values.yaml
new file mode 100644 (file)
index 0000000..c93dd69
--- /dev/null
@@ -0,0 +1,138 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:2.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+  ubuntuInitRepository: registry.hub.docker.com
+  persistence: {}
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+onapRepository: nexus3.onap.org:10001
+image: onap/dmaap/zookeeper:5.0.0
+pullPolicy: Always
+ubuntuInitImage: oomk8s/ubuntu-init:2.0.0
+busyBoxImage: busybox:1.30
+busyBoxRepository: docker.io
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config:
+  # gerrit branch where the latest code is checked in
+  gerritBranch: master
+  # gerrit project where the latest code is checked in
+  gerritProject: http://gerrit.onap.org/r/dmaap/messagerouter/messageservice.git
+
+# default number of instances
+replicaCount: 3
+
+nodeSelector: {}
+
+nodeAffinity: {}
+
+affinity: {}
+
+tolerations: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 10
+  periodSeconds: 10
+
+#Zookeeper properties
+zk:
+ initLimit: 5
+ syncLimit: 2
+
+## Persist data to a persitent volume
+persistence:
+  enabled: false
+
+  ## A manually managed Persistent Volume and Claim
+  ## Requires persistence.enabled: true
+  ## If defined, PVC must be created manually before volume will be bound
+  # existingClaim:
+  volumeReclaimPolicy: Retain
+
+  ## database data Persistent Volume Storage Class
+  ## If defined, storageClassName: <storageClass>
+  ## If set to "-", storageClassName: "", which disables dynamic provisioning
+  ## If undefined (the default) or set to null, no storageClassName spec is
+  ##   set, choosing the default provisioner.  (gp2 on AWS, standard on
+  ##   GKE, AWS & OpenStack)
+  ##
+  # storageClass: "-"
+  accessMode: ReadWriteMany
+  size: 2Gi
+  mountPath: /dockerdata-nfs
+  mountSubPath: message-router/data-zookeeper
+
+
+rollingUpdate:
+  maxUnavailable: 1
+service:
+  type: ClusterIP
+  name: message-router-zookeeper
+  portName: message-router-zookeeper
+  clientPortName: client
+  clientPort: 2181
+  serverPortName: server
+  serverPort: 2888
+  leaderElectionPortName: leader-election
+  leaderElectionPort: 3888
+
+ingress:
+  enabled: false
+
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 2000m
+      memory: 4Gi
+    requests:
+      cpu: 100m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 4000m
+      memory: 8Gi
+    requests:
+      cpu: 200m
+      memory: 2Gi
+  unlimited: {}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/MsgRtrApi.properties b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/MsgRtrApi.properties
new file mode 100755 (executable)
index 0000000..8e44661
--- /dev/null
@@ -0,0 +1,171 @@
+# LICENSE_START=======================================================
+#  org.onap.dmaap
+#  ================================================================================
+#  Copyright © 2017 AT&T Intellectual Property. 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=========================================================
+#
+#  ECOMP is a trademark and service mark of AT&T Intellectual Property.
+#  
+###############################################################################
+###############################################################################
+##
+## Cambria API Server config
+##
+##     - Default values are shown as commented settings.
+##
+
+###############################################################################
+##
+## HTTP service
+##
+##             - 3904 is standard as of 7/29/14.
+#
+## Zookeeper Connection
+##
+##     Both Cambria and Kafka make use of Zookeeper.
+##
+#config.zk.servers=172.18.1.1
+config.zk.servers={{.Values.zookeeper.name}}:{{.Values.zookeeper.port}}
+#config.zk.root=/fe3c/cambria/config
+
+
+###############################################################################
+##
+## Kafka Connection
+##
+##     Items below are passed through to Kafka's producer and consumer
+##     configurations (after removing "kafka.")
+##     if you want to change request.required.acks it can take this one value
+#kafka.metadata.broker.list=localhost:9092,localhost:9093
+kafka.metadata.broker.list={{.Values.kafka.name}}:{{.Values.kafka.port}}
+##kafka.request.required.acks=-1
+#kafka.client.zookeeper=${config.zk.servers}
+consumer.timeout.ms=100
+zookeeper.connection.timeout.ms=6000
+zookeeper.session.timeout.ms=20000
+zookeeper.sync.time.ms=2000
+auto.commit.interval.ms=1000
+fetch.message.max.bytes =1000000
+auto.commit.enable=false
+
+#(backoff*retries > zksessiontimeout)
+kafka.rebalance.backoff.ms=10000
+kafka.rebalance.max.retries=6
+
+
+###############################################################################
+##
+##     Secured Config
+##
+##     Some data stored in the config system is sensitive -- API keys and secrets,
+##     for example. to protect it, we use an encryption layer for this section
+##     of the config.
+##
+## The key is a base64 encode AES key. This must be created/configured for
+## each installation.
+#cambria.secureConfig.key=
+##
+## The initialization vector is a 16 byte value specific to the secured store.
+## This must be created/configured for each installation.
+#cambria.secureConfig.iv=
+
+## Southfield Sandbox
+cambria.secureConfig.key=b/7ouTn9FfEw2PQwL0ov/Q==
+cambria.secureConfig.iv=wR9xP5k5vbz/xD0LmtqQLw==
+authentication.adminSecret=fe3cCompound
+#cambria.secureConfig.key[pc569h]=YT3XPyxEmKCTLI2NK+Sjbw==
+#cambria.secureConfig.iv[pc569h]=rMm2jhR3yVnU+u2V9Ugu3Q==
+
+
+###############################################################################
+##
+## Consumer Caching
+##
+##     Kafka expects live connections from the consumer to the broker, which
+##     obviously doesn't work over connectionless HTTP requests. The Cambria
+##     server proxies HTTP requests into Kafka consumer sessions that are kept
+##     around for later re-use. Not doing so is costly for setup per request,
+##     which would substantially impact a high volume consumer's performance.
+##
+##     This complicates Cambria server failover, because we often need server
+##     A to close its connection before server B brings up the replacement.    
+##
+
+## The consumer cache is normally enabled.
+#cambria.consumer.cache.enabled=true
+
+## Cached consumers are cleaned up after a period of disuse. The server inspects
+## consumers every sweepFreqSeconds and will clean up any connections that are
+## dormant for touchFreqMs.
+#cambria.consumer.cache.sweepFreqSeconds=15
+cambria.consumer.cache.touchFreqMs=120000
+##stickforallconsumerrequests=false
+## The cache is managed through ZK. The default value for the ZK connection
+## string is the same as config.zk.servers.
+#cambria.consumer.cache.zkConnect=${config.zk.servers}
+
+##
+## Shared cache information is associated with this node's name. The default
+## name is the hostname plus the HTTP service port this host runs on. (The
+## hostname is determined via InetAddress.getLocalHost ().getCanonicalHostName(),
+## which is not always adequate.) You can set this value explicitly here.
+##
+#cambria.api.node.identifier=<use-something-unique-to-this-instance>
+
+#cambria.rateLimit.maxEmptyPollsPerMinute=30
+#cambria.rateLimitActual.delay.ms=10
+
+###############################################################################
+##
+## Metrics Reporting
+##
+##     This server can report its metrics periodically on a topic.
+##
+#metrics.send.cambria.enabled=true
+#metrics.send.cambria.topic=cambria.apinode.metrics                                  #msgrtr.apinode.metrics.dmaap 
+#metrics.send.cambria.sendEverySeconds=60
+
+cambria.consumer.cache.zkBasePath=/fe3c/cambria/consumerCache
+consumer.timeout=17
+default.partitions=3
+default.replicas=3
+##############################################################################
+#100mb
+maxcontentlength=10000
+
+
+##############################################################################
+#AAF Properties
+msgRtr.namespace.aaf=org.onap.dmaap.mr.topic
+msgRtr.topicfactory.aaf=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
+enforced.topic.name.AAF=org.onap.dmaap.mr
+forceAAF=false
+transidUEBtopicreqd=false
+defaultNSforUEB=org.onap.dmaap.mr
+##############################################################################
+#Mirror Maker Agent
+
+msgRtr.mirrormakeradmin.aaf=org.onap.dmaap.mr.mirrormaker|*|admin
+msgRtr.mirrormakeruser.aaf=org.onap.dmaap.mr.mirrormaker|*|user
+msgRtr.mirrormakeruser.aaf.create=org.onap.dmaap.mr.topicFactory|:org.onap.dmaap.mr.topic:
+msgRtr.mirrormaker.timeout=15000
+msgRtr.mirrormaker.topic=org.onap.dmaap.mr.mirrormakeragent
+msgRtr.mirrormaker.consumergroup=mmagentserver
+msgRtr.mirrormaker.consumerid=1
+
+kafka.max.poll.interval.ms=300000
+kafka.heartbeat.interval.ms=60000
+kafka.session.timeout.ms=240000
+kafka.max.poll.records=1000
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/cadi.properties b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/cadi.properties
new file mode 100755 (executable)
index 0000000..948577a
--- /dev/null
@@ -0,0 +1,20 @@
+aaf_locate_url=https://aaf-locate:8095
+aaf_url=https://AAF_LOCATE_URL/AAF_NS.service:2.1
+aaf_env=DEV
+aaf_lur=org.onap.aaf.cadi.aaf.v2_0.AAFLurPerm
+
+cadi_truststore=/appl/dmaapMR1/etc/truststoreONAPall.jks
+cadi_truststore_password=changeit
+
+cadi_keyfile=/appl/dmaapMR1/etc/keyfilenew
+
+cadi_alias=dmaapmr@mr.dmaap.onap.org
+cadi_keystore=/appl/dmaapMR1/etc/org.onap.dmaap.mr.p12
+cadi_keystore_password=Messaging for All
+cadi_x509_issuers=CN=intermediateCA_1, OU=OSAAF, O=ONAP, C=US
+
+
+cadi_loglevel=INFO
+cadi_protocols=TLSv1.1,TLSv1.2
+cadi_latitude=37.78187
+cadi_longitude=-122.26147
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/mykey b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/config/dmaap/mykey
new file mode 100755 (executable)
index 0000000..c2b8b87
--- /dev/null
@@ -0,0 +1,27 @@
+_sNOLphPzrU7L0L3oWv0pYwgV_ddGF1XoBsQEIAp34jfP-fGJFPfFYaMpDEZ3gwH59rNw6qyMZHk
+k-4irklvVcWk36lC3twNvc0DueRCVrws1bkuhOLCXdxHJx-YG-1xM8EJfRmzh79WPlPkbAdyPmFF
+Ah44V0GjAnInPOFZA6MHP9rNx9B9qECHRfmvzU13vJCcgTsrmOr-CEiWfRsnzPjsICxpq9OaVT_D
+zn6rNaroGm1OiZNCrCgvRkCUHPOOCw3j9G1GeaImoZNYtozbz9u4sj13PU-MxIIAa64b1bMMMjpz
+Upc8lVPI4FnJKg6axMmEGn5zJ6JUq9mtOVyPj__2GEuDgpx5H4AwodXXVjFsVgR8UJwI_BvS2JVp
+JoQk0J1RqXmAXVamlsMAfzmmbARXgmrBfnuhveZnh9ymFVU-YZeujdANniXAwBGI7c6hG_BXkH7i
+Eyf4Fn41_SV78PskP6qgqJahr9r3bqdjNbKBztIKCOEVrE_w3IM5r02l-iStk_NBRkj6cq_7VCpG
+afxZ2CtZMwuZMiypO_wOgbdpCSKNzsL-NH2b4b08OlKiWb263gz634KJmV5WEfCl-6eH-JUFbWOS
+JwQfActLNT2ZQPl2MyZQNBzJEWoJRgS6k7tPRO-zqeUtYYHGHVMCxMuMHGQcoilNNHEFeBCG_fBh
+yAKb9g9F86Cbx9voMLiyTX2T3rwVHiSJFOzfNxGmfN5JWOthIun_c5hEY1tLQ15BomzkDwk7BAj7
+VbRCrVD45B6xrmSTMBSWYmLyr6mnQxQqeh9cMbD-0ZAncE3roxRnRvPKjFFa208ykYUp2V83r_PJ
+fV5I9ZPKSjk9DwFyrjkcQQEYDhdK6IFqcd6nEthjYVkmunu2fsX0bIOm9GGdIbKGqBnpdgBO5hyT
+rBr9HSlZrHcGdti1R823ckDF0Ekcl6kioDr5NLIpLtg9zUEDRm3QrbX2mv5Zs8W0pYnOqglxy3lz
+bJZTN7oR7VasHUtjmp0RT9nLZkUs5TZ6MHhlIq3ZsQ6w_Q9Rv1-ofxfwfCC4EBrWKbWAGCf6By4K
+Ew8321-2YnodhmsK5BrT4zQ1DZlmUvK8BmYjZe7wTljKjgYcsLTBfX4eMhJ7MIW1kpnl8AbiBfXh
+QzN56Mki51Q8PSQWHm0W9tnQ0z6wKdck6zBJ8JyNzewZahFKueDTn-9DOqIDfr3YHvQLLzeXyJ8e
+h4AgjW-hvlLzRGtkCknjLIgXVa3rMTycseAwbW-mgdCqqkw3SdEG8feAcyntmvE8j2jbtSDStQMB
+9JdvyNLuQdNG4pxpusgvVso0-8NQF0YVa9VFwg9U6IPSx5p8FcW68OAHt_fEgT4ZtiH7o9aur4o9
+oYqUh2lALCY-__9QLq1KkNjMKs33Jz9E8LbRerG9PLclkTrxCjYAeUWBjCwSI7OB7xkuaYDSjkjj
+a46NLpdBN1GNcsFFcZ79GFAK0_DsyxGLX8Tq6q0Bvhs8whD8wlSxpTGxYkyqNX-vcb7SDN_0WkCE
+XSdZWkqTHXcYbOvoCOb_e6SFAztuMenuHWY0utX0gBfx_X5lPDFyoYXErxFQHiA7t27keshXNa6R
+ukQRRS8kMjre1U74sc-fRNXkXpl57rG4rgxaEX0eBeowa53KAsVvUAoSac2aC_nfzXrDvoyf9Xi3
+JpEZNhUDLpFCEycV4I7jGQ9wo9qNaosvlsr6kbLDNdb_1xrGVgjT3xEvRNJNPqslSAu-yD-UFhC3
+AmCdYUnugw_eEFqXCHTARcRkdPPvl2XsmEKY2IqEeO5tz4DyXQFaL-5hEVh6lYEU1EOWHk3UGIXe
+Vc5_Ttp82qNLmlJPbZvgmNTJzYTHDQ_27KBcp7IVVZgPDjVKdWqQvZ18KhxvfF3Idgy82LBZniFV
+IbtxllXiPRxoPQriSXMnXjh3XkvSDI2pFxXfEvLRn1tvcFOwPNCz3QfPIzYg8uYXN5bRt3ZOrR_g
+ZhIlrc7HO0VbNbeqEVPKMZ-cjkqGj4VAuDKoQc0eQ6X_wCoAGO78nPpLeIvZPx1X3z5YoqNA
\ No newline at end of file
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/mr_clusters/san-francisco.json b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/mr_clusters/san-francisco.json
new file mode 100644 (file)
index 0000000..9e732d2
--- /dev/null
@@ -0,0 +1,6 @@
+{
+  "dcaeLocationName": "san-francisco",
+  "fqdn": "message-router",
+  "topicProtocol": "http",
+  "topicPort": "3904"
+}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PM_MAPPER.json b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PM_MAPPER.json
new file mode 100644 (file)
index 0000000..d2910b8
--- /dev/null
@@ -0,0 +1,14 @@
+{
+ "topicName": "PM_MAPPER",
+ "topicDescription": "The PM Mapper will be publishing perf3gpp VES events to this topic",
+ "owner": "pm-mapper",
+ "txenabled": false,
+ "clients": [{
+   "dcaeLocationName": "san-francisco",
+   "clientIdentity": "dcae@dcae.onap.org",
+   "action": [
+     "pub",
+     "view"
+   ]
+ }]
+}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PNF_READY.json b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PNF_READY.json
new file mode 100644 (file)
index 0000000..8f4cf8b
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "topicName": "PNF_READY",
+  "topicDescription": "This topic will be used to publish the PNF_READY events generated by the PNF REgistration Handler service in the DCAE platform.",
+  "owner": "PNFRegistrationHandler",
+  "txenabled": false,
+  "clients": [
+    {
+      "dcaeLocationName": "san-francisco",
+      "clientRole": "org.onap.dmaap.mr.PNF_READY.pub",
+      "action": [
+        "pub",
+        "view"
+      ]
+
+    }
+  ]
+}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PNF_REGISTRATION.json b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/PNF_REGISTRATION.json
new file mode 100644 (file)
index 0000000..f0dd2c7
--- /dev/null
@@ -0,0 +1,17 @@
+{
+  "topicName": "PNF_REGISTRATION",
+  "topicDescription": "the VES collector will be publishing pnfRegistration events in this topic",
+  "owner": "VEScollector",
+  "txenabled": false,
+  "clients": [
+    {
+      "dcaeLocationName": "san-francisco",
+      "clientRole": "org.onap.dmaap.mr.PNF_REGISTRATION.sub",
+      "action": [
+        "sub",
+        "view"
+      ]
+
+    }
+  ]
+}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/README b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/README
new file mode 100644 (file)
index 0000000..fbb88b9
--- /dev/null
@@ -0,0 +1,3 @@
+#
+# Intent of this directory is for it to contain a file for each topic that needs to be provisioned in MR.
+# So, app teams can add files to this directory as needed without impacting each other's code.
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/mirrormakeragent.json b/ric-aux/80-Auxiliary-Functions/helm/message-router/resources/topics/mirrormakeragent.json
new file mode 100644 (file)
index 0000000..7ae77cd
--- /dev/null
@@ -0,0 +1,42 @@
+{
+  "topicName": "mirrormakeragent",
+  "topicDescription": "the topic used to provision the MM agent whitelist",
+ "replicationCase": "REPLICATION_NONE",
+  "owner": "dmaap",
+  "txenabled": false,
+  "partitionCount": "1",
+  "clients": [
+    {
+      "dcaeLocationName": "san-francisco",
+      "clientIdentity": "dmaap-bc-mm-prov@dmaap-bc-mm-prov.onap.org",
+      "action": [
+        "pub", 
+        "sub",
+               "view"
+      ]
+    },
+       {
+      "dcaeLocationName": "san-francisco",
+      "clientIdentity": "dmaap-bc-topic-mgr@dmaap-bc-topic-mgr.onap.org",
+      "action": [
+        "pub", 
+        "sub",
+               "view"
+      ]
+    },
+       {
+      "dcaeLocationName": "san-francisco",
+      "clientIdentity": "demo@people.osaaf.org",
+      "action": [
+        "pub", 
+        "sub",
+               "view"
+      ]
+    }
+       
+  ]
+}
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/templates/configmap.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..e2e0da5
--- /dev/null
@@ -0,0 +1,67 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
+#
+# 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.fullname" . }}-msgrtrapi-prop-configmap
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/MsgRtrApi.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-cadi-prop-configmap
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/dmaap/cadi.properties").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-dbc-mrclusters
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/mr_clusters/*.json").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-dbc-topics
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/topics/*.json").AsConfig . | indent 2 }}
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/templates/secrets.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/templates/secrets.yaml
new file mode 100644 (file)
index 0000000..023b5a1
--- /dev/null
@@ -0,0 +1,28 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
+#
+# 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: Secret
+metadata:
+  name: {{ include "common.fullname" . }}-secret
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ (.Files.Glob "resources/config/dmaap/mykey").AsSecrets | indent 2 }}
+type: Opaque
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/templates/service.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/templates/service.yaml
new file mode 100644 (file)
index 0000000..dfd90b2
--- /dev/null
@@ -0,0 +1,55 @@
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright © 2018 AT&T
+#
+# 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" .  }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+  annotations:
+    msb.onap.org/service-info: '[
+      {
+          "serviceName": "{{ include "common.servicename" . }}",
+          "version": "v1",
+          "url": "/",
+          "protocol": "REST",
+          "port": "{{.Values.service.internalPort}}",
+          "visualRange":"1"
+      }
+      ]'
+
+spec:
+  type: {{ .Values.service.type }}
+  ports:
+    {{if eq .Values.service.type "NodePort" -}}
+    - port: {{ .Values.service.externalPort }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+      name: {{ .Values.service.portName }}-{{ .Values.service.externalPort }}
+    - port: {{ .Values.service.externalPort2 }}
+      nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort2 }}
+      name: {{ .Values.service.portName }}-{{ .Values.service.externalPort2 }}
+    {{- else -}}
+    - port: {{ .Values.service.externalPort }}
+      targetPort: {{ .Values.service.internalPort }}
+      name: {{ .Values.service.portName }}
+    {{- end}}
+  selector:
+    app: {{ include "common.name" . }}
+    release: {{ .Release.Name }}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/templates/statefulset.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/templates/statefulset.yaml
new file mode 100644 (file)
index 0000000..33f422a
--- /dev/null
@@ -0,0 +1,89 @@
+################################################################################
+#   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/v1beta1
+kind: StatefulSet
+metadata:
+  name: {{ include "common.fullname" . }}
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+spec:
+  replicas: {{ .Values.replicaCount }}
+  template:
+    metadata:
+      labels:
+        app: {{ include "common.name" . }}
+        release: {{ .Release.Name }}
+    spec:
+      containers:
+        - name: {{ include "common.name" . }}
+          image: "{{ .Values.onapRepository }}/{{ .Values.image }}"
+          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+          ports:
+          - containerPort: {{ .Values.service.externalPort }}
+          - containerPort: {{ .Values.service.externalPort2 }}
+          {{- if eq .Values.liveness.enabled true }}
+          livenessProbe:
+            tcpSocket:
+              port: {{ .Values.service.externalPort }}
+            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.liveness.periodSeconds }}
+          {{ end -}}
+          readinessProbe:
+            tcpSocket:
+              port: {{ .Values.service.externalPort }}
+            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+            periodSeconds: {{ .Values.readiness.periodSeconds }}
+          env:
+          - name: enableCadi
+            value: "true"
+          volumeMounts:
+          - mountPath: /etc/localtime
+            name: localtime
+            readOnly: true
+          - mountPath: /appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
+            subPath: MsgRtrApi.properties
+            name: appprops
+          - mountPath: /appl/dmaapMR1/etc/cadi.properties
+            subPath: cadi.properties
+            name: cadi
+          - mountPath: /appl/dmaapMR1/etc/keyfile
+            subPath: mykey
+            name: mykey
+          resources:
+{{ include "common.resources" . | indent 12 }}
+      volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: appprops
+          configMap:
+            name: {{ include "common.fullname" . }}-msgrtrapi-prop-configmap
+        - name: cadi
+          configMap:
+            name: {{ include "common.fullname" . }}-cadi-prop-configmap
+        - name: mykey
+          secret:
+            secretName: {{ include "common.fullname" . }}-secret
+      imagePullSecrets:
+      - name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/ric-aux/80-Auxiliary-Functions/helm/message-router/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/message-router/values.yaml
new file mode 100644 (file)
index 0000000..5ffcdaa
--- /dev/null
@@ -0,0 +1,100 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+
+#################################################################
+# Global configuration defaults.
+#################################################################
+global:
+  nodePortPrefix: 302
+  readinessRepository: oomk8s
+  readinessImage: readiness-check:2.0.0
+  loggingRepository: docker.elastic.co
+  loggingImage: beats/filebeat:5.5.0
+  clientImage: onap/dmaap/dbc-client:1.0.8-STAGING-latest
+
+#################################################################
+# Application configuration defaults.
+#################################################################
+# application image
+onapRepository: nexus3.onap.org:10001
+image: onap/dmaap/dmaap-mr:1.1.13
+pullPolicy: Always
+
+kafka:
+  name: message-router-kafka
+  port: 9092
+zookeeper:
+  name: message-router-zookeeper
+  port: 2181
+
+# flag to enable debugging - application support required
+debugEnabled: false
+
+# application configuration
+config: {}
+
+# default number of instances
+replicaCount: 1
+
+nodeSelector: {}
+
+affinity: {}
+
+# probe configuration parameters
+liveness:
+  initialDelaySeconds: 70
+  periodSeconds: 10
+  # necessary to disable liveness probe when setting breakpoints
+  # in debugger so K8s doesn't restart unresponsive container
+  enabled: true
+
+readiness:
+  initialDelaySeconds: 70
+  periodSeconds: 10
+
+service:
+  type: NodePort
+  name: message-router
+  portName: message-router
+  externalPort: 3904
+  nodePort: 27
+  externalPort2: 3905
+  nodePort2: 26
+
+ingress:
+  enabled: false
+
+# Resource Limit flavor -By Default using small
+flavor: small
+# Segregation for Different environment (Small and Large)
+resources:
+  small:
+    limits:
+      cpu: 2000m
+      memory: 4Gi
+    requests:
+      cpu: 100m
+      memory: 1Gi
+  large:
+    limits:
+      cpu: 4000m
+      memory: 8Gi
+    requests:
+      cpu: 200m
+      memory: 2Gi
+  unlimited: {}
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/.helmignore b/ric-aux/80-Auxiliary-Functions/helm/ves/.helmignore
new file mode 100644 (file)
index 0000000..50af031
--- /dev/null
@@ -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/ric-aux/80-Auxiliary-Functions/helm/ves/Chart.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/Chart.yaml
new file mode 100644 (file)
index 0000000..7658453
--- /dev/null
@@ -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.                                             #
+################################################################################
+
+apiVersion: v1
+appVersion: "1.0"
+description: A Helm chart for Kubernetes
+name: ves
+version: 1.1.0
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/_helpers.tpl b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/_helpers.tpl
new file mode 100644 (file)
index 0000000..ff29c31
--- /dev/null
@@ -0,0 +1,50 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+{{/* vim: set filetype=mustache: */}}
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "vescollector.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 "vescollector.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 "vescollector.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/configmap.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/configmap.yaml
new file mode 100644 (file)
index 0000000..e0680e6
--- /dev/null
@@ -0,0 +1,36 @@
+################################################################################
+#   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: dmaap-configmap
+data:
+  DMaapConfig.json: |
+    {
+      "channels": [
+        {
+          "name": "ves-measurement",
+          "cambria.topic": "unauthenticated.SEC_MEASUREMENT_OUTPUT",
+          "class": "HpCambriaOutputStream",
+          "stripHpId": "true",
+          "type": "out",
+          "cambria.hosts": "message-router:3904"
+        }
+      ]
+    }
\ No newline at end of file
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-deployment.yaml
new file mode 100644 (file)
index 0000000..e730cf6
--- /dev/null
@@ -0,0 +1,109 @@
+################################################################################\r
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+#   Copyright (c) 2019 Nokia.                                                  #\r
+#                                                                              #\r
+#   Licensed under the Apache License, Version 2.0 (the "License");            #\r
+#   you may not use this file except in compliance with the License.           #\r
+#   You may obtain a copy of the License at                                    #\r
+#                                                                              #\r
+#       http://www.apache.org/licenses/LICENSE-2.0                             #\r
+#                                                                              #\r
+#   Unless required by applicable law or agreed to in writing, software        #\r
+#   distributed under the License is distributed on an "AS IS" BASIS,          #\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+#   See the License for the specific language governing permissions and        #\r
+#   limitations under the License.                                             #\r
+################################################################################\r
+\r
+\r
+\r
+kind: Deployment\r
+apiVersion: extensions/v1beta1\r
+metadata:\r
+  name: {{ include "vescollector.fullname" . }}\r
+  generation: 1\r
+  labels:\r
+    app: dcae-ves-collector\r
+    cfydeployment: ves\r
+    cfynode: ves\r
+    cfynodeinstance: ves_uj48fg\r
+    k8sdeployment: dep-dcae-ves-collector\r
+  annotations:\r
+    deployment.kubernetes.io/revision: '1'\r
+spec:\r
+  replicas: {{ .Values.ves.replicaCount }}\r
+  selector:\r
+    matchLabels:\r
+      app: dcae-ves-collector\r
+      cfydeployment: ves\r
+      cfynode: ves\r
+      cfynodeinstance: ves_uj48fg\r
+      k8sdeployment: dep-dcae-ves-collector\r
+  template:\r
+    metadata:\r
+      labels:\r
+        app: dcae-ves-collector\r
+        cfydeployment: ves\r
+        cfynode: ves\r
+        cfynodeinstance: ves_uj48fg\r
+        k8sdeployment: dep-dcae-ves-collector\r
+    spec:\r
+      volumes:\r
+      - name: component-log\r
+        emptyDir: {}\r
+      - name: dmaap-config-file\r
+        configMap:\r
+          name: dmaap-configmap\r
+      containers:\r
+      - name: {{ include "common.namespace" . }}-{{include "common.name" . }}\r
+        image: {{ .Values.ves.onapRepository }}/{{ .Values.ves.image.name }}:{{ .Values.ves.image.tag }}\r
+        ports:\r
+        - containerPort: 8080\r
+          protocol: TCP\r
+        - containerPort: 8443\r
+          protocol: TCP\r
+        env:\r
+        - name: CONSUL_HOST\r
+          value: consul-server.onap\r
+        - name: CONFIG_BINDING_SERVICE\r
+          value: config-binding-service\r
+        - name: POD_IP\r
+          valueFrom:\r
+            fieldRef:\r
+              apiVersion: v1\r
+              fieldPath: status.podIP\r
+        resources: {}\r
+        volumeMounts:\r
+        - name: component-log\r
+          mountPath: "/opt/app/VESCollector/logs/ecomp"\r
+        - name: dmaap-config-file\r
+          mountPath: "/opt/app/VESCollector/etc/DmaapConfig.json"\r
+          subPath: DMaapConfig.json\r
+        readinessProbe:\r
+          httpGet:\r
+            path: "/healthcheck"\r
+            port: 8080\r
+            scheme: HTTP\r
+          initialDelaySeconds: 5\r
+          timeoutSeconds: 1\r
+          periodSeconds: 15\r
+          successThreshold: 1\r
+          failureThreshold: 1\r
+        terminationMessagePath: "/dev/termination-log"\r
+        terminationMessagePolicy: File\r
+        imagePullPolicy: IfNotPresent\r
+      restartPolicy: Always\r
+      terminationGracePeriodSeconds: 30\r
+      dnsPolicy: ClusterFirst\r
+      securityContext: {}\r
+      imagePullSecrets:\r
+      - name: onap-docker-registry-key\r
+      hostname: dcae-ves-collector\r
+      schedulerName: default-scheduler\r
+  strategy:\r
+    type: RollingUpdate\r
+    rollingUpdate:\r
+      maxUnavailable: 1\r
+      maxSurge: 1\r
+  revisionHistoryLimit: 10\r
+  progressDeadlineSeconds: 600\r
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/templates/ves-service.yaml
new file mode 100644 (file)
index 0000000..718cd41
--- /dev/null
@@ -0,0 +1,47 @@
+################################################################################\r
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+#   Copyright (c) 2019 Nokia.                                                  #\r
+#                                                                              #\r
+#   Licensed under the Apache License, Version 2.0 (the "License");            #\r
+#   you may not use this file except in compliance with the License.           #\r
+#   You may obtain a copy of the License at                                    #\r
+#                                                                              #\r
+#       http://www.apache.org/licenses/LICENSE-2.0                             #\r
+#                                                                              #\r
+#   Unless required by applicable law or agreed to in writing, software        #\r
+#   distributed under the License is distributed on an "AS IS" BASIS,          #\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+#   See the License for the specific language governing permissions and        #\r
+#   limitations under the License.                                             #\r
+################################################################################\r
+\r
+\r
+kind: Service\r
+apiVersion: v1\r
+metadata:\r
+  name: xdcae-ves-collector\r
+  labels:\r
+    app: dcae-ves-collector\r
+    cfydeployment: ves\r
+    cfynode: ves\r
+    cfynodeinstance: ves_uj48fg\r
+    k8sdeployment: dep-dcae-ves-collector\r
+spec:\r
+  ports:\r
+  - name: xport-t-8080\r
+    protocol: TCP\r
+    port: 8080\r
+    targetPort: 8080\r
+    nodePort: 30235\r
+  - name: xport-t-8443\r
+    protocol: TCP\r
+    port: 8443\r
+    targetPort: 8443\r
+    nodePort: 30417\r
+  selector:\r
+    app: dcae-ves-collector\r
+  type: NodePort\r
+  sessionAffinity: None\r
+  externalTrafficPolicy: Cluster\r
+status:\r
+  loadBalancer: {}\r
diff --git a/ric-aux/80-Auxiliary-Functions/helm/ves/values.yaml b/ric-aux/80-Auxiliary-Functions/helm/ves/values.yaml
new file mode 100644 (file)
index 0000000..b193e0b
--- /dev/null
@@ -0,0 +1,31 @@
+################################################################################
+#   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.                                             #
+################################################################################
+
+
+# Default values for ves.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+ves:
+  onapRepository: "nexus3.onap.org:10001"
+  imagePullPolicy: IfNotPresent
+
+  image:
+    name: onap/org.onap.dcaegen2.collectors.ves.vescollector
+    tag: 1.4.4
+
+  replicaCount: 1
\ No newline at end of file