From c20dfd0d6b2ce32ff9bbc8eade3b2cdc9dbff581 Mon Sep 17 00:00:00 2001 From: michaere Date: Mon, 1 Oct 2018 11:45:50 +0100 Subject: [PATCH] Update data-router to use HTTPS DMaaP Updates to camel route and beans xml to use HTTPS DMaaP, and also add filebeat sidecar Issue-ID: AAI-1562 Change-Id: I26e30ba01b0552d7e26c99f9039927accacdcb58 Signed-off-by: michaere --- .../resources/config/auth/tomcat_keystore | Bin 2214 -> 3429 bytes .../resources/config/log/logback.xml | 193 +++++++++++++++++++++ .../resources/dynamic/conf/entity-event-policy.xml | 8 +- .../aai-data-router/templates/configmap.yaml | 26 +++ .../aai-data-router/templates/deployment.yaml | 32 +++- kubernetes/aai/charts/aai-data-router/values.yaml | 12 +- 6 files changed, 263 insertions(+), 8 deletions(-) create mode 100644 kubernetes/aai/charts/aai-data-router/resources/config/log/logback.xml diff --git a/kubernetes/aai/charts/aai-data-router/resources/config/auth/tomcat_keystore b/kubernetes/aai/charts/aai-data-router/resources/config/auth/tomcat_keystore index 9eec841aa2c1243b5ca3e22b0b116e5bca2afd49..de5325b4aa36f2ca212b8ed149d6a3943e9b1ba2 100644 GIT binary patch delta 1238 zcmZ1`_*AO?-`jt085kIt;8;2(H!-n5H@8SZBQvigwJ0|=B{Q)kH90ZfP?LdyG4=b& zJWmGJ2t88+O9lp(Zi6P4c7rD7`~}QRj7&_7Tn4;soLX%jZQpqr8M#>*4BQR54LI4D zLs{5_nL>jNc@4Nh94;Ofe?P|nL%wZWWo&Q-L-c%K8QVeR&IWelwlITRIZepVyM2T>0dMR zmklo@JmteHS4CKO{JQz)i^+{G4zY7r?mGI$2>&UAUo>{D(%Df@-eADpy#<{ephTAWGvnuWO0p{+qdF}W*W zXtH0>Kcqj&X!`WGKbR9IGykvjbyzYt<7y~h-FpLd^^KJqvs0Hzx2+I%^SD?oYSuLW z=FRBMQDPyJ9@rReJ*UMVwru&|iZeStg>I?8#mmIZ$iTR`i7~;Ti7^Hozp}zCOa=@F zf^3`#Z61tmKb#mDSy-5v*bW#NBZPQa)WlT$3sUofgMAd-Q}a@bfGI0QAvm?DEVW3% zIkl)HGc7Y2C}toF40l;R7BLo)n2lA>a(V7`t@JtZw#@tSq=1k0T8j)qK=R5gz6Rb6 zB2rhviwe9hr>}hd@J^E9ruGZ}-mh9{utd*52O~n!k{@!?Y+__G-~*Y;&&c>6GqQ2iLzzql$sqNDEHMUAO?ijORP_qEUAwdF;-AILvvwSd^V)g-?=Q*Oc4wZoE?Ro8wCc6bVXt+Y+{CJE zW|z!T(+(~^wQQ@Z>CFhnQw#Qdvlp~D!u`TJzWnbY{kJPNPF#`IQ>#%Fu4egsNAeBF zGtZh!k4-F#RNwxIQDfnQTlGzer~WMXXcXvY8@crJpV^OkMr#Y~eO)23#>isoCc zboAGy=NCdsuPRh-uyySefAsOvM4wA>F4sP-;!)N3KC9y8gLRRLFWr{$ITWX)1xU4&)sw-E`h#)1|{A0QnWWYybcN delta 43 ycmaDVwM>xb-`jt085kItfS7UfX_ht)k#hZ}6aT+&66d=)e^1+SmaYBL>Y@OCw-KEH diff --git a/kubernetes/aai/charts/aai-data-router/resources/config/log/logback.xml b/kubernetes/aai/charts/aai-data-router/resources/config/log/logback.xml new file mode 100644 index 0000000000..d7ff0143a1 --- /dev/null +++ b/kubernetes/aai/charts/aai-data-router/resources/config/log/logback.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${errorLogPattern} + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + + INFO + + 256 + + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${auditMetricPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + + ${auditMetricPattern} + + + + + 256 + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + 256 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/entity-event-policy.xml b/kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/entity-event-policy.xml index acfe0a5933..60e71ecfb0 100644 --- a/kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/entity-event-policy.xml +++ b/kubernetes/aai/charts/aai-data-router/resources/dynamic/conf/entity-event-policy.xml @@ -34,9 +34,9 @@ - - - + + + @@ -44,6 +44,8 @@ + + diff --git a/kubernetes/aai/charts/aai-data-router/templates/configmap.yaml b/kubernetes/aai/charts/aai-data-router/templates/configmap.yaml index 6cfc3bef7a..23d3dbbcb9 100644 --- a/kubernetes/aai/charts/aai-data-router/templates/configmap.yaml +++ b/kubernetes/aai/charts/aai-data-router/templates/configmap.yaml @@ -38,3 +38,29 @@ metadata: data: {{ tpl (.Files.Glob "resources/dynamic/routes/entity-event.route").AsConfig . | indent 2 }} {{ tpl (.Files.Glob "resources/dynamic/conf/entity-event-policy.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-log-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/log/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-filebeat-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/log/filebeat/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml b/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml index 8ab2d3383a..83542dabe5 100644 --- a/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-data-router/templates/deployment.yaml @@ -94,7 +94,10 @@ spec: - mountPath: /opt/app/data-router/dynamic/conf/entity-event-policy.xml subPath: entity-event-policy.xml name: {{ include "common.fullname" . }}-dynamic-policy - - mountPath: /logs/ + - mountPath: /opt/app/data-router/bundleconfig/etc/logback.xml + name: {{ include "common.fullname" . }}-logback-config + subPath: logback.xml + - mountPath: /var/log/onap name: {{ include "common.fullname" . }}-logs ports: - containerPort: {{ .Values.service.internalPort }} @@ -112,10 +115,28 @@ spec: periodSeconds: {{ .Values.readiness.periodSeconds }} resources: {{ include "common.resources" . | indent 12 }} + + # side car containers + - name: filebeat-onap + image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + volumeMounts: + - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml + name: filebeat-conf + - mountPath: /var/log/onap + name: {{ include "common.fullname" . }}-logs + - mountPath: /usr/share/filebeat/data + name: aai-filebeat volumes: - name: localtime hostPath: path: /etc/localtime + - name: filebeat-conf + configMap: + name: aai-filebeat + - name: aai-filebeat + emptyDir: {} - name: {{ include "common.fullname" . }}-auth secret: secretName: {{ include "common.fullname" . }} @@ -134,8 +155,13 @@ spec: configMap: name: {{ include "common.fullname" . }}-dynamic - name: {{ include "common.fullname" . }}-logs - hostPath: - path: {{ .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }} + emptyDir: {} + - name: {{ include "common.fullname" . }}-logback-config + configMap: + name: {{ include "common.fullname" . }}-log-configmap + items: + - key: logback.xml + path: logback.xml restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-data-router/values.yaml b/kubernetes/aai/charts/aai-data-router/values.yaml index ba4258257a..c1fa49f3f0 100644 --- a/kubernetes/aai/charts/aai-data-router/values.yaml +++ b/kubernetes/aai/charts/aai-data-router/values.yaml @@ -17,7 +17,7 @@ # Declare variables to be passed into your templates. global: # global defaults nodePortPrefix: 302 - + loggingImage: beats/filebeat:5.5.0 # application image repository: nexus3.onap.org:10001 @@ -97,4 +97,12 @@ resources: requests: cpu: 4 memory: 8Gi - unlimited: {} \ No newline at end of file + unlimited: {} + +# Entity Event route configuration +event: + port: + dmaap: 3905 + protocol: https + consumer: + topic: AAI-EVENT -- 2.16.6