From 135d891e43beddfe19048bb250d6450c7f7747b8 Mon Sep 17 00:00:00 2001 From: mayankg2703 Date: Tue, 6 Feb 2018 10:28:00 +0000 Subject: config seg aai model loader Change-Id: I868acb11ba195a9415d54d2a9352c120a8b76e08 Issue-ID: OOM-662 Signed-off-by: mayankg2703 --- .../model-loader/appconfig/auth/aai-os-cert.p12 | Bin 0 -> 4357 bytes .../model-loader/appconfig/model-loader.properties | 23 +++++++++++++++++++++ .../modelloader-deployment-configmap.yaml | 18 ++++++++++++++++ .../aai/templates/modelloader-deployment.yaml | 23 ++++++++++++++------- .../model-loader/appconfig/auth/aai-os-cert.p12 | Bin 4357 -> 0 bytes .../model-loader/appconfig/model-loader.properties | 23 --------------------- 6 files changed, 56 insertions(+), 31 deletions(-) create mode 100644 kubernetes/aai/resources/config/model-loader/appconfig/auth/aai-os-cert.p12 create mode 100644 kubernetes/aai/resources/config/model-loader/appconfig/model-loader.properties create mode 100644 kubernetes/aai/templates/modelloader-deployment-configmap.yaml delete mode 100644 kubernetes/config/docker/init/src/config/aai/model-loader/appconfig/auth/aai-os-cert.p12 delete mode 100644 kubernetes/config/docker/init/src/config/aai/model-loader/appconfig/model-loader.properties (limited to 'kubernetes') diff --git a/kubernetes/aai/resources/config/model-loader/appconfig/auth/aai-os-cert.p12 b/kubernetes/aai/resources/config/model-loader/appconfig/auth/aai-os-cert.p12 new file mode 100644 index 0000000000..ee57120fa0 Binary files /dev/null and b/kubernetes/aai/resources/config/model-loader/appconfig/auth/aai-os-cert.p12 differ diff --git a/kubernetes/aai/resources/config/model-loader/appconfig/model-loader.properties b/kubernetes/aai/resources/config/model-loader/appconfig/model-loader.properties new file mode 100644 index 0000000000..58b80d8d98 --- /dev/null +++ b/kubernetes/aai/resources/config/model-loader/appconfig/model-loader.properties @@ -0,0 +1,23 @@ +# Model Loader Distribution Client Configuration +ml.distribution.ACTIVE_SERVER_TLS_AUTH=false +ml.distribution.ASDC_ADDRESS=sdc-be.onap-sdc:8443 +ml.distribution.CONSUMER_GROUP=aai-ml-group +ml.distribution.CONSUMER_ID=aai-ml +ml.distribution.ENVIRONMENT_NAME=AUTO +ml.distribution.KEYSTORE_PASSWORD= +ml.distribution.KEYSTORE_FILE=asdc-client.jks +ml.distribution.PASSWORD=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp +ml.distribution.POLLING_INTERVAL=30 +ml.distribution.POLLING_TIMEOUT=20 +ml.distribution.USER=aai +ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG + +# Model Loader AAI REST Client Configuration +ml.aai.BASE_URL=https://aai-service.onap-aai:8443 +ml.aai.MODEL_URL=/aai/v10/service-design-and-creation/models/model/ +ml.aai.NAMED_QUERY_URL=/aai/v10/service-design-and-creation/named-queries/named-query/ +ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images +ml.aai.KEYSTORE_FILE=aai-os-cert.p12 +ml.aai.KEYSTORE_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o +ml.aai.AUTH_USER=ModelLoader +ml.aai.AUTH_PASSWORD=OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw diff --git a/kubernetes/aai/templates/modelloader-deployment-configmap.yaml b/kubernetes/aai/templates/modelloader-deployment-configmap.yaml new file mode 100644 index 0000000000..7f37bd605b --- /dev/null +++ b/kubernetes/aai/templates/modelloader-deployment-configmap.yaml @@ -0,0 +1,18 @@ +#{{ if not .Values.disableAaiModelLoaderService }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: model-loader-prop-configmap + namespace: {{ .Values.nsPrefix }}-aai +data: +{{ tpl (.Files.Glob "resources/config/model-loader/appconfig/model-loader.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: model-loader-secret + namespace: {{ .Values.nsPrefix }}-aai +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/model-loader/appconfig/auth/*").AsSecrets . | indent 2 }} +#{{ end }} diff --git a/kubernetes/aai/templates/modelloader-deployment.yaml b/kubernetes/aai/templates/modelloader-deployment.yaml index 7c2fddb7cf..c81305817c 100644 --- a/kubernetes/aai/templates/modelloader-deployment.yaml +++ b/kubernetes/aai/templates/modelloader-deployment.yaml @@ -25,8 +25,11 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /opt/app/model-loader/config/ - name: aai-model-loader-config + - mountPath: /opt/app/model-loader/config/model-loader.properties + subPath: model-loader.properties + name: aai-model-loader-prop-config + - mountPath: /opt/app/model-loader/config/auth/ + name: aai-model-loader-auth-config - mountPath: /var/log/onap name: aai-model-loader-logs - mountPath: /opt/app/model-loader/bundleconfig/etc/logback.xml @@ -40,6 +43,7 @@ spec: imagePullPolicy: {{ .Values.pullPolicy }} volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml name: filebeat-conf - mountPath: /var/log/onap name: aai-model-loader-logs @@ -49,12 +53,15 @@ spec: - name: localtime hostPath: path: /etc/localtime - - name: aai-model-loader-config - hostPath: - path: "/dockerdata-nfs/{{ .Values.nsPrefix }}/aai/model-loader/appconfig/" + - name: aai-model-loader-prop-config + configMap: + name: model-loader-prop-configmap + - name: aai-model-loader-auth-config + secret: + secretName: model-loader-secret - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: aai-filebeat-configmap - name: aai-model-loader-logs emptyDir: {} - name: aai-model-loader-filebeat @@ -73,4 +80,4 @@ metadata: namespace: {{ .Values.nsPrefix }}-aai data: {{ (.Files.Glob "resources/model-loader/conf/logback.xml").AsConfig | indent 2 }} -#{{ end }} \ No newline at end of file +#{{ end }} diff --git a/kubernetes/config/docker/init/src/config/aai/model-loader/appconfig/auth/aai-os-cert.p12 b/kubernetes/config/docker/init/src/config/aai/model-loader/appconfig/auth/aai-os-cert.p12 deleted file mode 100644 index ee57120fa0..0000000000 Binary files a/kubernetes/config/docker/init/src/config/aai/model-loader/appconfig/auth/aai-os-cert.p12 and /dev/null differ diff --git a/kubernetes/config/docker/init/src/config/aai/model-loader/appconfig/model-loader.properties b/kubernetes/config/docker/init/src/config/aai/model-loader/appconfig/model-loader.properties deleted file mode 100644 index 58b80d8d98..0000000000 --- a/kubernetes/config/docker/init/src/config/aai/model-loader/appconfig/model-loader.properties +++ /dev/null @@ -1,23 +0,0 @@ -# Model Loader Distribution Client Configuration -ml.distribution.ACTIVE_SERVER_TLS_AUTH=false -ml.distribution.ASDC_ADDRESS=sdc-be.onap-sdc:8443 -ml.distribution.CONSUMER_GROUP=aai-ml-group -ml.distribution.CONSUMER_ID=aai-ml -ml.distribution.ENVIRONMENT_NAME=AUTO -ml.distribution.KEYSTORE_PASSWORD= -ml.distribution.KEYSTORE_FILE=asdc-client.jks -ml.distribution.PASSWORD=OBF:1ks51l8d1o3i1pcc1r2r1e211r391kls1pyj1z7u1njf1lx51go21hnj1y0k1mli1sop1k8o1j651vu91mxw1vun1mze1vv11j8x1k5i1sp11mjc1y161hlr1gm41m111nkj1z781pw31kku1r4p1e391r571pbm1o741l4x1ksp -ml.distribution.POLLING_INTERVAL=30 -ml.distribution.POLLING_TIMEOUT=20 -ml.distribution.USER=aai -ml.distribution.ARTIFACT_TYPES=MODEL_INVENTORY_PROFILE,MODEL_QUERY_SPEC,VNF_CATALOG - -# Model Loader AAI REST Client Configuration -ml.aai.BASE_URL=https://aai-service.onap-aai:8443 -ml.aai.MODEL_URL=/aai/v10/service-design-and-creation/models/model/ -ml.aai.NAMED_QUERY_URL=/aai/v10/service-design-and-creation/named-queries/named-query/ -ml.aai.VNF_IMAGE_URL=/aai/v8/service-design-and-creation/vnf-images -ml.aai.KEYSTORE_FILE=aai-os-cert.p12 -ml.aai.KEYSTORE_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o -ml.aai.AUTH_USER=ModelLoader -ml.aai.AUTH_PASSWORD=OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw -- cgit 1.2.3-korg