From b4b0948858975bcb7f47803b06c1a6f2a7bea416 Mon Sep 17 00:00:00 2001 From: Jimmy Forsyth Date: Tue, 1 May 2018 16:03:43 -0400 Subject: Update babel and ml to work properly in oom Issue-ID: AAI-1110 Change-Id: Ibc51b36bb96c969a61aa54b31abf7c99f0e62fe6 Signed-off-by: Jimmy Forsyth --- .../resources/config/auth/auth_policy.json | 6 +- .../resources/config/auth/tomcat_keystore | Bin 17136 -> 2214 bytes .../resources/config/babel-auth.properties | 2 +- .../charts/aai-babel/resources/config/logback.xml | 179 ++++++++++++ .../aai/charts/aai-babel/templates/deployment.yaml | 5 + kubernetes/aai/charts/aai-babel/values.yaml | 4 +- .../resources/config/log/logback.xml | 311 ++++++++++----------- .../resources/config/model-loader.properties | 2 +- .../aai-modelloader/templates/deployment.yaml | 7 +- 9 files changed, 345 insertions(+), 171 deletions(-) create mode 100644 kubernetes/aai/charts/aai-babel/resources/config/logback.xml (limited to 'kubernetes/aai/charts') diff --git a/kubernetes/aai/charts/aai-babel/resources/config/auth/auth_policy.json b/kubernetes/aai/charts/aai-babel/resources/config/auth/auth_policy.json index 5340a6ac75..e7c6459f65 100644 --- a/kubernetes/aai/charts/aai-babel/resources/config/auth/auth_policy.json +++ b/kubernetes/aai/charts/aai-babel/resources/config/auth/auth_policy.json @@ -8,7 +8,7 @@ } ], "users": [ - {"username": "CN=someone.onap.org, OU=someone, O=\"ONAP ORG\", L=NA, ST=NA, C=NA"} + {"username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA"} ] }, { @@ -18,7 +18,7 @@ "methods": [{"name": "POST"}] }], "users": [ - {"username": "CN=someone.onap.org, OU=someone, O=\"ONAP ORG\", L=NA, ST=NA, C=NA"} + {"username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA"} ] }, { @@ -30,7 +30,7 @@ } ], "users": [ - {"username": "CN=someone.onap.org, OU=someone, O=\"ONAP ORG\", L=NA, ST=NA, C=NA"} + {"username": "CN=ONAP, OU=ONAP, O=ONAP, L=Ottawa, ST=Ontario, C=CA"} ] }, { diff --git a/kubernetes/aai/charts/aai-babel/resources/config/auth/tomcat_keystore b/kubernetes/aai/charts/aai-babel/resources/config/auth/tomcat_keystore index cbec390428..9eec841aa2 100644 Binary files a/kubernetes/aai/charts/aai-babel/resources/config/auth/tomcat_keystore and b/kubernetes/aai/charts/aai-babel/resources/config/auth/tomcat_keystore differ diff --git a/kubernetes/aai/charts/aai-babel/resources/config/babel-auth.properties b/kubernetes/aai/charts/aai-babel/resources/config/babel-auth.properties index 8bf21b0b95..e7dfda081f 100644 --- a/kubernetes/aai/charts/aai-babel/resources/config/babel-auth.properties +++ b/kubernetes/aai/charts/aai-babel/resources/config/babel-auth.properties @@ -1,2 +1,2 @@ auth.policy.file=/auth/auth_policy.json -auth.authentication.disable=false +auth.authentication.disable=true diff --git a/kubernetes/aai/charts/aai-babel/resources/config/logback.xml b/kubernetes/aai/charts/aai-babel/resources/config/logback.xml new file mode 100644 index 0000000000..63b8faf09a --- /dev/null +++ b/kubernetes/aai/charts/aai-babel/resources/config/logback.xml @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + ${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 + + + ${auditLogPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${metricsLogPattern} + + + + + 256 + + + + + + ${logDirectory}/${debugLogName}.log + + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + + + + + e.level.toInt() < INFO.toInt() + + + DENY + NEUTRAL + + 256 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-babel/templates/deployment.yaml b/kubernetes/aai/charts/aai-babel/templates/deployment.yaml index 6b1312bbdc..15cd163edb 100644 --- a/kubernetes/aai/charts/aai-babel/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-babel/templates/deployment.yaml @@ -77,6 +77,9 @@ spec: name: {{ include "common.fullname" . }}-secrets - mountPath: /logs name: {{ include "common.fullname" . }}-logs + - mountPath: /opt/app/babel/config/logback.xml + name: {{ include "common.fullname" . }}-config + subPath: logback.xml resources: {{ toYaml .Values.resources | indent 12 }} {{- if .Values.nodeSelector }} @@ -99,6 +102,8 @@ spec: path: artifact-generator.properties - key: babel-auth.properties path: babel-auth.properties + - key: logback.xml + path: logback.xml - name: {{ include "common.fullname" . }}-secrets secret: secretName: {{ include "common.fullname" . }}-babel-secrets diff --git a/kubernetes/aai/charts/aai-babel/values.yaml b/kubernetes/aai/charts/aai-babel/values.yaml index 43f895267a..ef872a04a2 100644 --- a/kubernetes/aai/charts/aai-babel/values.yaml +++ b/kubernetes/aai/charts/aai-babel/values.yaml @@ -28,8 +28,8 @@ image: onap/babel:1.2-STAGING-latest # application configuration config: - keyStorePassword: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o - keyManagerPassword: OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o + keyStorePassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 + keyManagerPassword: OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 # default number of instances replicaCount: 1 diff --git a/kubernetes/aai/charts/aai-modelloader/resources/config/log/logback.xml b/kubernetes/aai/charts/aai-modelloader/resources/config/log/logback.xml index d512d3b91c..fcfac840b1 100644 --- a/kubernetes/aai/charts/aai-modelloader/resources/config/log/logback.xml +++ b/kubernetes/aai/charts/aai-modelloader/resources/config/log/logback.xml @@ -1,161 +1,152 @@ - - - - - - - - - - - - - - - - - - - - - ${pattern} - - - - - - - - ${logDirectory}/${generalLogName}.log - - ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - - INFO - - ${queueSize} - - - - ${logDirectory}/${auditLogName}.log - - ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - - - - ${logDirectory}/${metricsLogName}.log - - ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - - - - ${logDirectory}/${debugLogName}.log - - ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + ${defaultPattern} + + + + + + + + + + + ${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 + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-modelloader/resources/config/model-loader.properties b/kubernetes/aai/charts/aai-modelloader/resources/config/model-loader.properties index e9b24b667c..38c25480c0 100644 --- a/kubernetes/aai/charts/aai-modelloader/resources/config/model-loader.properties +++ b/kubernetes/aai/charts/aai-modelloader/resources/config/model-loader.properties @@ -24,7 +24,7 @@ ml.aai.AUTH_USER=ModelLoader ml.aai.AUTH_PASSWORD=OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw # Model Loader Babel REST Client Configuration\r -ml.babel.BASE_URL=https://aai-babel.{{.Release.Namespace}}:9516 +ml.babel.BASE_URL=https://babel.{{.Release.Namespace}}:9516 ml.babel.GENERATE_ARTIFACTS_URL=/services/babel-service/v1/app/generateArtifacts ml.babel.KEYSTORE_FILE=babel-client-cert.p12 ml.babel.KEYSTORE_PASSWORD=OBF:1y0q1uvc1uum1uvg1pil1pjl1uuq1uvk1uuu1y10 diff --git a/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml b/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml index 38ebe7689f..4bfa67de41 100644 --- a/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-modelloader/templates/deployment.yaml @@ -50,9 +50,9 @@ spec: name: {{ include "common.fullname" . }}-prop-config - mountPath: /opt/app/model-loader/config/auth/ name: {{ include "common.fullname" . }}-auth-config - - mountPath: /var/log/onap + - mountPath: /logs name: {{ include "common.fullname" . }}-logs - - mountPath: /opt/app/model-loader/bundleconfig/etc/logback.xml + - mountPath: /opt/app/model-loader/logback.xml name: {{ include "common.fullname" . }}-log-conf subPath: logback.xml ports: @@ -67,11 +67,10 @@ spec: - mountPath: /usr/share/filebeat/filebeat.yml subPath: filebeat.yml name: filebeat-conf - - mountPath: /var/log/onap + - mountPath: /logs name: {{ include "common.fullname" . }}-logs - mountPath: /usr/share/filebeat/data name: aai-filebeat - volumes: - name: localtime hostPath: -- cgit 1.2.3-korg