summaryrefslogtreecommitdiffstats
path: root/kubernetes/aai
diff options
context:
space:
mode:
authorAlexis de Talhouët <alexis.de_talhouet@bell.ca>2018-02-06 17:20:22 +0000
committerGerrit Code Review <gerrit@onap.org>2018-02-06 17:20:22 +0000
commitd1f7eb62115aa027e194486e496bf2257c490543 (patch)
tree06fae3e38b9447b1ba43edcda065ecf3b765f194 /kubernetes/aai
parent64778b2d08d7ccf4141a8beba5f2782f7c551f3f (diff)
parent135d891e43beddfe19048bb250d6450c7f7747b8 (diff)
Merge "config seg aai model loader"
Diffstat (limited to 'kubernetes/aai')
-rw-r--r--kubernetes/aai/resources/config/model-loader/appconfig/auth/aai-os-cert.p12bin0 -> 4357 bytes
-rw-r--r--kubernetes/aai/resources/config/model-loader/appconfig/model-loader.properties23
-rw-r--r--kubernetes/aai/templates/modelloader-deployment-configmap.yaml18
-rw-r--r--kubernetes/aai/templates/modelloader-deployment.yaml23
4 files changed, 56 insertions, 8 deletions
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
--- /dev/null
+++ b/kubernetes/aai/resources/config/model-loader/appconfig/auth/aai-os-cert.p12
Binary files 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 }}
ight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# Copyright © 2017 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.
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: {{ include "common.fullname" . }}
  namespace: {{ include "common.namespace" . }}
  labels:
    app: {{ include "common.name" . }}
    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
    release: {{ include "common.release" . }}
    heritage: {{ .Release.Service }}
spec:
  replicas: {{ .Values.replicaCount }}
  template:
    metadata:
      labels:
        app: {{ include "common.name" . }}
        release: {{ include "common.release" . }}
    spec:
      hostname: {{ .Values.global.dmaapDrProvName }}
      initContainers:
        - name: {{ include "common.name" . }}-readiness
          image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          command:
          - /root/ready.py
          args:
          - --container-name
          - {{ .Values.config.dmaapDrDb.mariadbContName }}
          env:
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.namespace
        {{- if .Values.global.aafEnabled }}
        - name: {{ include "common.name" . }}-aaf-readiness
          image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          command:
          - /root/ready.py
          args:
          - --container-name
          - aaf-locate
          env:
          - name: NAMESPACE
            valueFrom:
              fieldRef:
                apiVersion: v1
                fieldPath: metadata.namespace
        - name: {{ include "common.name" . }}-dr-prov-aaf-config
          image: "{{ include "common.repository" . }}/{{ .Values.global.aafAgentImage }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          command: ["bash","-c","exec /opt/app/aaf_config/bin/agent.sh"]
          volumeMounts:
          - mountPath: {{ .Values.persistence.aafCredsPath }}
            name: {{ include "common.fullname" . }}-aaf-config-vol
          env:
            - name: APP_FQI
              value: "{{ .Values.aafConfig.fqi }}"
            - name: aaf_locate_url
              value: "https://aaf-locate.{{ .Release.Namespace }}:8095"
            - name: aaf_locator_container
              value: "{{ .Values.global.aafLocatorContainer }}"
            - name: aaf_locator_container_ns
              value: "{{ .Release.Namespace }}"
            - name: aaf_locator_fqdn
              value: "{{ .Values.aafConfig.fqdn }}"
            - name: aaf_locator_public_fqdn
              value: "{{.Values.aafConfig.publicFqdn}}"
            - name: aaf_locator_app_ns
              value: "{{ .Values.global.aafAppNs }}"
            - name: DEPLOY_FQI
              value: "{{ .Values.aafConfig.aafDeployFqi }}"
            - name: DEPLOY_PASSWORD
              value: "{{ .Values.aafConfig.aafDeployPass }}"
            - name: cadi_longitude
              value: "{{ .Values.aafConfig.cadiLongitude }}"
            - name: cadi_latitude
              value: "{{ .Values.aafConfig.cadiLatitude }}"
        - name: {{ include "common.name" . }}-permission-fixer
          image: "{{ .Values.global.busyBoxRepository }}/{{ .Values.global.busyBoxImage }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          volumeMounts:
          - mountPath: {{ .Values.persistence.aafCredsPath }}
            name: {{ include "common.fullname" . }}-aaf-config-vol
          command: ["chown","-Rf","1000:1001", "/opt/app/"]
        {{ end }}
      containers:
        - name: {{ include "common.name" . }}
          image: "{{ include "common.repository" . }}/{{ .Values.image }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          ports:
          - containerPort: {{ .Values.config.dmaapDrProv.internalPort }}
          {{- if eq .Values.liveness.enabled true }}
          livenessProbe:
            tcpSocket:
              port: {{ .Values.config.dmaapDrProv.internalPort }}
            initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
            periodSeconds: {{ .Values.liveness.periodSeconds }}
          {{ end -}}
          readinessProbe:
            tcpSocket:
              port: {{ .Values.config.dmaapDrProv.internalPort }}
            initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
            periodSeconds: {{ .Values.readiness.periodSeconds }}
          volumeMounts:
          {{- if .Values.global.aafEnabled }}
          - mountPath: {{ .Values.persistence.aafCredsPath }}
            name: {{ include "common.fullname" . }}-aaf-config-vol
          {{- end }}
          - mountPath: /etc/localtime
            name: localtime
            readOnly: false
          - mountPath: /opt/app/datartr/etc/provserver.properties
            name: {{ include "common.fullname" . }}-config
            subPath: provserver.properties
          - mountPath: /opt/app/datartr/etc/logback.xml
            name: {{ include "common.fullname" . }}-log-conf
            subPath: logback.xml
          - mountPath: {{ .Values.global.loggingDirectory }}
            name: {{ include "common.fullname" . }}-logs
          resources:
{{ include "common.resources" . }}
        {{- if .Values.nodeSelector }}
        nodeSelector:
{{ toYaml .Values.nodeSelector | indent 10 }}
        {{- end -}}
        {{- if .Values.affinity }}
        affinity:
{{ toYaml .Values.affinity | indent 10 }}
        {{- end -}}
      # Filebeat sidecar container
        - name: {{ include "common.name" . }}-filebeat-onap
          image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          volumeMounts:
          - name: {{ include "common.fullname" . }}-filebeat-conf
            mountPath: /usr/share/filebeat/filebeat.yml
            subPath: filebeat.yml
          - name: {{ include "common.fullname" . }}-data-filebeat
            mountPath: /usr/share/filebeat/data
          - name: {{ include "common.fullname" . }}-logs
            mountPath: /var/log/onap/datarouter-prov
      volumes:
      - name: localtime
        hostPath:
          path: /etc/localtime
      - name: {{ include "common.fullname" . }}-config
        configMap:
          name: {{ include "common.fullname" . }}-configmap
          items:
          - key: provserver.properties
            path: provserver.properties
      - name: {{ include "common.fullname" . }}-log-conf
        configMap:
          name: {{ include "common.fullname" . }}-log
      - name: {{ include "common.fullname" . }}-filebeat-conf
        configMap:
          name: {{ include "common.fullname" . }}-dmaap-dr-prov-filebeat-configmap
      - name: {{ include "common.fullname" . }}-data-filebeat
        emptyDir: {}
      - name:  {{ include "common.fullname" . }}-logs
        emptyDir: {}
      {{- if .Values.global.aafEnabled }}
      - name: {{ include "common.fullname" . }}-aaf-config-vol
        {{- if .Values.persistence.enabled }}
        persistentVolumeClaim:
          claimName: {{ include "common.fullname" . }}-aaf-props
        {{- else }}
        emptyDir: {}
        {{- end }}
      {{- end }}
      imagePullSecrets:
      - name: "{{ include "common.namespace" . }}-docker-registry-key"