From 1a3a3557a080ba7ee7d1022d9a3dd0e165779ab2 Mon Sep 17 00:00:00 2001 From: vagrant Date: Sat, 10 Mar 2018 23:56:32 +0000 Subject: Update from using hbase to using cassandra Also update resources and traversal to remove chef MK: Addressing the -1 statefulset comment Issue-ID: AAI-33 Change-Id: Ieee819703764fdda727f17d4e9be43084886828c Signed-off-by: Kajur, Harish vk250x@att.com Signed-off-by: Mandeep Khinda --- kubernetes/aai/charts/aai-cassandra/.helmignore | 21 ++ kubernetes/aai/charts/aai-cassandra/Chart.yaml | 4 + .../charts/aai-cassandra/templates/service.yaml | 27 ++ .../aai-cassandra/templates/statefulset.yaml | 115 +++++++ .../charts/aai-cassandra/templates/volumes.yaml | 25 ++ kubernetes/aai/charts/aai-cassandra/values.yaml | 106 ++++++ .../resources/config/dynamic/conf/champ-beans.xml | 15 +- .../aai/charts/aai-champ/templates/deployment.yaml | 15 + .../aai-resources/resources/config/aai_keystore | Bin 0 -> 3811 bytes .../resources/config/aaiconfig.properties | 119 +++++++ .../resources/config/application.properties | 72 ++++ .../resources/config/janusgraph-cached.properties | 50 +++ .../config/janusgraph-realtime.properties | 45 +++ .../resources/config/localhost-access-logback.xml | 62 ++++ .../aai-resources/resources/config/log/logback.xml | 345 ------------------- .../aai-resources/resources/config/logback.xml | 352 ++++++++++++++++++++ .../resources/config/realm.properties | 12 + .../charts/aai-resources/templates/configmap.yaml | 61 +++- .../charts/aai-resources/templates/deployment.yaml | 89 +++-- kubernetes/aai/charts/aai-resources/values.yaml | 11 +- .../aai-traversal/resources/config/aai_keystore | Bin 0 -> 3811 bytes .../resources/config/aaiconfig.properties | 113 +++++++ .../resources/config/application.properties | 72 ++++ .../resources/config/janusgraph-cached.properties | 50 +++ .../config/janusgraph-realtime.properties | 45 +++ .../resources/config/localhost-access-logback.xml | 62 ++++ .../aai-traversal/resources/config/log/logback.xml | 345 ------------------- .../aai-traversal/resources/config/logback.xml | 365 +++++++++++++++++++++ .../resources/config/realm.properties | 12 + .../charts/aai-traversal/templates/configmap.yaml | 59 +++- .../charts/aai-traversal/templates/deployment.yaml | 88 +++-- .../aai/charts/aai-traversal/templates/job.yaml | 139 ++++++++ kubernetes/aai/charts/aai-traversal/values.yaml | 8 +- kubernetes/aai/templates/configmap.yaml | 19 +- kubernetes/aai/values.yaml | 2 + 35 files changed, 2137 insertions(+), 788 deletions(-) create mode 100644 kubernetes/aai/charts/aai-cassandra/.helmignore create mode 100644 kubernetes/aai/charts/aai-cassandra/Chart.yaml create mode 100644 kubernetes/aai/charts/aai-cassandra/templates/service.yaml create mode 100644 kubernetes/aai/charts/aai-cassandra/templates/statefulset.yaml create mode 100644 kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml create mode 100644 kubernetes/aai/charts/aai-cassandra/values.yaml create mode 100644 kubernetes/aai/charts/aai-resources/resources/config/aai_keystore create mode 100644 kubernetes/aai/charts/aai-resources/resources/config/aaiconfig.properties create mode 100644 kubernetes/aai/charts/aai-resources/resources/config/application.properties create mode 100644 kubernetes/aai/charts/aai-resources/resources/config/janusgraph-cached.properties create mode 100644 kubernetes/aai/charts/aai-resources/resources/config/janusgraph-realtime.properties create mode 100644 kubernetes/aai/charts/aai-resources/resources/config/localhost-access-logback.xml delete mode 100644 kubernetes/aai/charts/aai-resources/resources/config/log/logback.xml create mode 100644 kubernetes/aai/charts/aai-resources/resources/config/logback.xml create mode 100644 kubernetes/aai/charts/aai-resources/resources/config/realm.properties create mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/aai_keystore create mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/aaiconfig.properties create mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/application.properties create mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/janusgraph-cached.properties create mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/janusgraph-realtime.properties create mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/localhost-access-logback.xml delete mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/log/logback.xml create mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/logback.xml create mode 100644 kubernetes/aai/charts/aai-traversal/resources/config/realm.properties create mode 100644 kubernetes/aai/charts/aai-traversal/templates/job.yaml diff --git a/kubernetes/aai/charts/aai-cassandra/.helmignore b/kubernetes/aai/charts/aai-cassandra/.helmignore new file mode 100644 index 0000000000..f0c1319444 --- /dev/null +++ b/kubernetes/aai/charts/aai-cassandra/.helmignore @@ -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/kubernetes/aai/charts/aai-cassandra/Chart.yaml b/kubernetes/aai/charts/aai-cassandra/Chart.yaml new file mode 100644 index 0000000000..17694cbfff --- /dev/null +++ b/kubernetes/aai/charts/aai-cassandra/Chart.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +description: ONAP AAI Cassandra +name: aai-cassandra +version: 2.0.0 diff --git a/kubernetes/aai/charts/aai-cassandra/templates/service.yaml b/kubernetes/aai/charts/aai-cassandra/templates/service.yaml new file mode 100644 index 0000000000..a4557fe187 --- /dev/null +++ b/kubernetes/aai/charts/aai-cassandra/templates/service.yaml @@ -0,0 +1,27 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "common.fullname" . }} + namespace: {{ include "common.namespace" . }} + labels: + app: {{ template "common.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +spec: + clusterIP: None + type: {{ .Values.service.type }} + ports: + - name: cql + port: {{ default 9042 .Values.config.ports.cql }} + targetPort: {{ default 9042 .Values.config.ports.cql }} + - name: thrift + port: {{ default 9160 .Values.config.ports.thrift }} + targetPort: {{ default 9160 .Values.config.ports.thrift }} + {{- if .Values.config.ports.agent }} + - name: agent + port: {{ .Values.config.ports.agent }} + targetPort: {{ .Values.config.ports.agent }} + {{- end }} + selector: + app: {{ template "common.fullname" . }} diff --git a/kubernetes/aai/charts/aai-cassandra/templates/statefulset.yaml b/kubernetes/aai/charts/aai-cassandra/templates/statefulset.yaml new file mode 100644 index 0000000000..aa3482d293 --- /dev/null +++ b/kubernetes/aai/charts/aai-cassandra/templates/statefulset.yaml @@ -0,0 +1,115 @@ +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: {{ include "common.fullname" . }} + replicas: {{ .Values.replicaCount }} + podManagementPolicy: {{ .Values.podManagementPolicy }} + updateStrategy: + type: {{ .Values.updateStrategy.type }} + template: + metadata: + labels: + app: {{ include "common.name" . }} + release: {{ .Release.Name }} + name: {{ include "common.name" . }} + spec: + containers: + - name: {{ include "common.name" . }} + image: {{ .Values.image }} + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + ports: + - containerPort: {{ .Values.service.internalPort }} + - containerPort: {{ .Values.service.internalPort2 }} + - containerPort: {{ .Values.service.internalPort3 }} + - containerPort: {{ .Values.service.internalPort4 }} + {{- if eq .Values.liveness.enabled true }} + livenessProbe: + exec: + command: + - /bin/bash + - -c + - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }' + initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }} + periodSeconds: {{ .Values.liveness.periodSeconds }} + {{ end -}} + readinessProbe: + exec: + command: + - /bin/bash + - -c + - nodetool status | grep $POD_IP | awk '$1!="UN" { exit 1; }' + initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }} + timeoutSeconds: {{ .Values.liveness.periodSeconds }} + lifecycle: + preStop: + exec: + command: ["/bin/sh", "-c", "PID=$(pidof java) && kill $PID && while ps -p $PID > /dev/null; do sleep 1; done"] + env: + {{- $seed_size := default 1 .Values.replicaCount | int -}} + {{- $global := . }} + - name: MAX_HEAP_SIZE + value: {{ .Values.config.heap.max }} + - name: HEAP_NEWSIZE + value: {{ .Values.config.heap.min }} + - name: CASSANDRA_SEEDS + value: "{{- range $i, $e := until $seed_size }}{{ template "common.fullname" $global }}-{{ $i }},{{- end }}" + - name: JVM_OPTS + value: {{ .Values.config.jvmOpts | quote }} + - name: CASSANDRA_CLUSTER_NAME + value: {{ .Values.config.clusterName | quote }} + - name: CASSANDRA_DC + value: {{ .Values.config.dataCenter | quote }} + - name: CASSANDRA_RACK + value: {{ .Values.config.rackName | quote }} + - name: CASSANDRA_AUTO_BOOTSTRAP + value: {{ .Values.config.autoBootstrap | quote }} + - name: POD_IP + valueFrom: + fieldRef: + fieldPath: status.podIP + volumeMounts: + - name: cassandra-data + mountPath: /var/lib/cassandra/data + resources: +{{ toYaml .Values.resources | indent 10 }} + {{- if .Values.nodeSelector }} + nodeSelector: +{{ toYaml .Values.nodeSelector | indent 8 }} + {{- end -}} + {{- if .Values.affinity }} + affinity: +{{ toYaml .Values.affinity | indent 8 }} + {{- end }} + volumes: + - name: localtime + hostPath: + path: /etc/localtime + {{- if not .Values.persistence.enabled }} + - name: cassandra-data + emptyDir: {} + {{- else }} + volumeClaimTemplates: + - metadata: + name: cassandra-data + labels: + app: {{ template "common.fullname" . }} + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + annotations: + volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass }} + spec: + accessModes: + - {{ .Values.persistence.accessMode | quote }} + resources: + requests: + storage: {{ .Values.persistence.size | quote }} + {{- end }} diff --git a/kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml b/kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml new file mode 100644 index 0000000000..0e1a3dfc26 --- /dev/null +++ b/kubernetes/aai/charts/aai-cassandra/templates/volumes.yaml @@ -0,0 +1,25 @@ +#{{ if .Values.persistence.enabled }} +{{- $root := . -}} +{{ range $i, $e := until (atoi (quote $root.Values.replicaCount) | default 3) }} +--- +apiVersion: v1 +kind: PersistentVolume +metadata: + name: {{ $root.Values.service.name }}-{{ $i }} + namespace: {{ $root.Release.Namespace }} + labels: + type: {{ $root.Values.persistence.storageType }} + 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 }} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-cassandra/values.yaml b/kubernetes/aai/charts/aai-cassandra/values.yaml new file mode 100644 index 0000000000..884bc396a8 --- /dev/null +++ b/kubernetes/aai/charts/aai-cassandra/values.yaml @@ -0,0 +1,106 @@ +# Default values for cassandra. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. +global: # global defaults + nodePortPrefix: 302 + repositorySecret: eyJuZXh1czMub25hcC5vcmc6MTAwMDEiOnsidXNlcm5hbWUiOiJkb2NrZXIiLCJwYXNzd29yZCI6ImRvY2tlciIsImVtYWlsIjoiQCIsImF1dGgiOiJaRzlqYTJWeU9tUnZZMnRsY2c9PSJ9fQ== + + +# application image +dockerhubRepository: registry.hub.docker.com +image: cassandra:2.1 +pullPolicy: Always + +# application configuration +config: + heap: + max: 512M + min: 100M + jvmOpts: -Dcassandra.consistent.rangemovement=false + clusterName: aai-cluster + dataCenter: Pod lab + rackName: Rack1 + autoBootstrap: true + ports: + cql: 9042 + thrift: 9160 + # If a JVM Agent is in place + # agent: 61621 + +# default number of instances +replicaCount: 3 + +nodeSelector: {} + +affinity: {} + +# 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 + +service: + type: ClusterIP + name: aai-cassandra + internalPort: 7000 + internalPort2: 7001 + internalPort3: 7199 + internalPort4: 9042 + +podManagementPolicy: OrderedReady +updateStrategy: + type: OnDelete + +ingress: + enabled: false + +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: + ## 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: ReadWriteOnce + size: 2Gi + mountPath: /dockerdata-nfs + mountSubPath: aai/cassandra + storageType: local + storageClass: "" + + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # + # Example: + # Configure resource requests and limits + # ref: http://kubernetes.io/docs/user-guide/compute-resources/ + # Minimum memory for development is 2 CPU cores and 4GB memory + # Minimum memory for production is 4 CPU cores and 8GB memory +#resources: +# limits: +# cpu: 2 +# memory: 4Gi +# requests: +# cpu: 2 +# memory: 4Gi diff --git a/kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml b/kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml index f97ac16864..6a66811e8c 100644 --- a/kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml +++ b/kubernetes/aai/charts/aai-champ/resources/config/dynamic/conf/champ-beans.xml @@ -22,12 +22,17 @@ xsi:schemaLocation=" - - + + + + + + - - - + {{- $seed_size := default 1 .Values.global.cassandra.replicas | int -}} + {{- $global := . }} + + diff --git a/kubernetes/aai/charts/aai-champ/templates/deployment.yaml b/kubernetes/aai/charts/aai-champ/templates/deployment.yaml index ccb90213d9..7176d09aeb 100644 --- a/kubernetes/aai/charts/aai-champ/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-champ/templates/deployment.yaml @@ -30,6 +30,21 @@ spec: app: {{ include "common.name" . }} release: {{ .Release.Name }} spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - aai-resources + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness containers: - name: {{ include "common.name" . }} image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" diff --git a/kubernetes/aai/charts/aai-resources/resources/config/aai_keystore b/kubernetes/aai/charts/aai-resources/resources/config/aai_keystore new file mode 100644 index 0000000000..1ddef0c9bd Binary files /dev/null and b/kubernetes/aai/charts/aai-resources/resources/config/aai_keystore differ diff --git a/kubernetes/aai/charts/aai-resources/resources/config/aaiconfig.properties b/kubernetes/aai/charts/aai-resources/resources/config/aaiconfig.properties new file mode 100644 index 0000000000..0258fc2066 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/resources/config/aaiconfig.properties @@ -0,0 +1,119 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.{{ include "common.namespace" . }}:8443/aai/ +aai.server.url=https://aai.{{ include "common.namespace" . }}:8443/aai/v11/ +aai.global.callback.url=https://aai.{{ include "common.namespace" . }}:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for crud enabled flag +aai.crud.timeoutenabled=true + +#timeout app specific -1 to bypass for that app id, a whole number to override the timeout with that value (in ms) +aai.crud.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAIRctFeed,-1|NewvceCreator,-1|IANewvceCreator,-1|AAI-CSIOVALS,-1 + +#default timeout limit added for crud if not overridden (in ms) +aai.crud.timeoutlimit=100000 +#limit set for bulk consumer APIS +aai.bulkconsumer.payloadlimit=30 + +#uncomment and use header X-OverrideLimit with the value to override the bulk api limit +#aai.bulkconsumer.payloadoverride=E6F04B93462CB5B0EDF41C05A9DDF5C3FE59748F +aai.bulkconsumer.payloadoverride=false diff --git a/kubernetes/aai/charts/aai-resources/resources/config/application.properties b/kubernetes/aai/charts/aai-resources/resources/config/application.properties new file mode 100644 index 0000000000..a65c04e4f0 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/resources/config/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-resources +info.build.name=resources +info.build.description=Resources Microservice +info.build.version=1.2.0 + +spring.application.name=aai-resources +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace={{ include "common.namespace" . }} + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-resources/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8447 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=dmaap.{{ include "common.namespace" . }}:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/kubernetes/aai/charts/aai-resources/resources/config/janusgraph-cached.properties b/kubernetes/aai/charts/aai-resources/resources/config/janusgraph-cached.properties new file mode 100644 index 0000000000..dd5c3eed66 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/resources/config/janusgraph-cached.properties @@ -0,0 +1,50 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +query.smart-limit=false + +{{- $seed_size := default 1 .Values.global.cassandra.replicas | int -}} +{{- $global := . }} + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=cassandra +storage.hostname={{- range $i, $e := until $seed_size }}{{ $global.Release.Name }}-aai-cassandra-{{ $i }},{{- end }} + +storage.cassandra.keyspace=aaigraph + +storage.cassandra.read-consistency-level=LOCAL_QUORUM +storage.cassandra.write-consistency-level=LOCAL_QUORUM +storage.cassandra.replication-factor=3 +storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy +#storage.cassandra.replication-strategy-options=MTA1cass,3 + +#schema.default=none +storage.lock.wait-time=300 +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/kubernetes/aai/charts/aai-resources/resources/config/janusgraph-realtime.properties b/kubernetes/aai/charts/aai-resources/resources/config/janusgraph-realtime.properties new file mode 100644 index 0000000000..875a8a5977 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/resources/config/janusgraph-realtime.properties @@ -0,0 +1,45 @@ +# +# ============LICENSE_START======================================================= +# 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. +# + +query.fast-property=true +query.smart-limit=false + +{{- $seed_size := default 1 .Values.global.cassandra.replicas | int -}} +{{- $global := . }} + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=cassandra +storage.hostname={{- range $i, $e := until $seed_size }}{{ $global.Release.Name }}-aai-cassandra-{{ $i }},{{- end }} + +storage.cassandra.keyspace=aaigraph + +storage.cassandra.read-consistency-level=LOCAL_QUORUM +storage.cassandra.write-consistency-level=LOCAL_QUORUM +storage.cassandra.replication-factor=3 +storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy +#storage.cassandra.replication-strategy-options=MTA1cass,3 + +#schema.default=none +storage.lock.wait-time=300 +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/kubernetes/aai/charts/aai-resources/resources/config/localhost-access-logback.xml b/kubernetes/aai/charts/aai-resources/resources/config/localhost-access-logback.xml new file mode 100644 index 0000000000..a318796c57 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/resources/config/localhost-access-logback.xml @@ -0,0 +1,62 @@ + + + + + ${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log + + ${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + + + + %a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D + + + + + + \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-resources/resources/config/log/logback.xml b/kubernetes/aai/charts/aai-resources/resources/config/log/logback.xml deleted file mode 100644 index 6cfc293f46..0000000000 --- a/kubernetes/aai/charts/aai-resources/resources/config/log/logback.xml +++ /dev/null @@ -1,345 +0,0 @@ - - ${module.ajsc.namespace.name} - - - - - - - - - - - - - - - - - - - - ERROR - ACCEPT - DENY - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n - - - - ${restLogDirectory}/sane.log - - ${restLogDirectory}/sane.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - INFO - ACCEPT - DENY - - ${restLogDirectory}/${metricsLogName}.log - - ${restLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - DEBUG - ACCEPT - DENY - - ${restLogDirectory}/${debugLogName}.log - - ${restLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - WARN - - ${restLogDirectory}/${errorLogName}.log - - ${restLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - ${restLogDirectory}/${auditLogName}.log - - ${restLogDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - DEBUG - ACCEPT - DENY - - ${restLogDirectory}/translog.log - - ${restLogDirectory}/translog.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - WARN - - ${dmaapLogDirectory}/${errorLogName}.log - - ${dmaapLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - DEBUG - ACCEPT - DENY - - ${dmaapLogDirectory}/${debugLogName}.log - - ${dmaapLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - INFO - ACCEPT - DENY - - ${dmaapLogDirectory}/${metricsLogName}.log - - ${dmaapLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${perfLogsDirectory}/Audit.log - - ${perfLogsDirectory}/Audit.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${perfLogsDirectory}/Perform.log - - ${perfLogsDirectory}/Perform.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - 0 - - - - ${queueSize} - true - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kubernetes/aai/charts/aai-resources/resources/config/logback.xml b/kubernetes/aai/charts/aai-resources/resources/config/logback.xml new file mode 100644 index 0000000000..94eb9a9226 --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/resources/config/logback.xml @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + + + + + ${logDirectory}/rest/sane.log + + ${logDirectory}/rest/sane.log.%d{yyyy-MM-dd} + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + + 1000 + true + + + + + INFO + ACCEPT + DENY + + ${logDirectory}/rest/metrics.log + + ${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + + + + ${eelfMetricLogPattern} + + + + 1000 + true + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/rest/debug.log + + ${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + + + + ${eelfLogPattern} + + + + 1000 + true + + + + + WARN + + ${logDirectory}/rest/error.log + + ${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + + + + ${eelfErrorLogPattern} + + + + 1000 + true + + + + ${logDirectory}/rest/audit.log + + ${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + + + + ${eelfAuditLogPattern} + + + + 1000 + true + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/rest/translog.log + + ${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + + + + ${eelfTransLogPattern} + + + + 1000 + true + + + + + WARN + + ${logDirectory}/dmaapAAIEventConsumer/error.log + + ${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + + + + ${eelfLogPattern} + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/dmaapAAIEventConsumer/debug.log + + ${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + + + + ${eelfLogPattern} + + + + + INFO + ACCEPT + DENY + + ${logDirectory}/dmaapAAIEventConsumer/metrics.log + + ${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + + + + ${eelfMetricLogPattern} + + + + + WARN + + ${logDirectory}/external/external.log + + ${logDirectory}/external/external.log.%d{yyyy-MM-dd} + + + + ${eelfLogPattern} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + + + ${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + + 1 + 9 + + + 5MB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + ${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + + + ${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + + 1 + 9 + + + 5MB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-resources/resources/config/realm.properties b/kubernetes/aai/charts/aai-resources/resources/config/realm.properties new file mode 100644 index 0000000000..fb692cc3eb --- /dev/null +++ b/kubernetes/aai/charts/aai-resources/resources/config/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/kubernetes/aai/charts/aai-resources/templates/configmap.yaml b/kubernetes/aai/charts/aai-resources/templates/configmap.yaml index 97c720a6ab..5e371ea5bf 100644 --- a/kubernetes/aai/charts/aai-resources/templates/configmap.yaml +++ b/kubernetes/aai/charts/aai-resources/templates/configmap.yaml @@ -1,7 +1,64 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }} + name: {{ include "common.fullname" . }}-log namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-localhost-access-log-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/localhost-access-logback.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-db-real-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/janusgraph-realtime.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-db-cached-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/janusgraph-cached.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-aaiconfig-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/aaiconfig.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-springapp-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/application.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-realm-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }}-auth-secret + namespace: {{ include "common.namespace" . }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/aai_keystore").AsSecrets . | indent 2 }} diff --git a/kubernetes/aai/charts/aai-resources/templates/deployment.yaml b/kubernetes/aai/charts/aai-resources/templates/deployment.yaml index 6aef4475f7..6c65bce4cc 100644 --- a/kubernetes/aai/charts/aai-resources/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-resources/templates/deployment.yaml @@ -415,12 +415,13 @@ spec: } ]' spec: + hostname: aai-resources initContainers: - command: - /root/ready.py args: - --container-name - - aai-hbase + - aai-cassandra env: - name: NAMESPACE valueFrom: @@ -435,32 +436,37 @@ spec: image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - - name: CHEF_BRANCH - value: master - - name: AAI_CHEF_ENV - value: simpledemo - - name: AAI_CORE_VERSION - value: {{ .Values.config.aaicoreversion }} - - name: AAI_CHEF_LOC - value: /var/chef/aai-data/environments - - name: CHEF_GIT_URL - value: http://gerrit.onap.org/r/aai - - name: HBASE_STARTUP_ARTIFICIAL_DELAY - value: "60" + - name: LOCAL_USER_ID + value: {{ .Values.config.userId | quote }} + - name: LOCAL_GROUP_ID + value: {{ .Values.config.groupId | quote }} volumeMounts: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb - subPath: solo.rb - name: aai-chef-config - - mountPath: /var/chef/aai-data/environments/ - name: aai-data + - mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-realtime.properties + name: {{ include "common.fullname" . }}-db-real-conf + subPath: janusgraph-realtime.properties + - mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-cached.properties + name: {{ include "common.fullname" . }}-db-cached-conf + subPath: janusgraph-cached.properties + - mountPath: /opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties + name: {{ include "common.fullname" . }}-aaiconfig-conf + subPath: aaiconfig.properties - mountPath: /var/log/onap - name: aai-resources-logs - - mountPath: /opt/app/aai-resources/bundleconfig/etc/logback.xml - name: aai-resources-log-conf + name: {{ include "common.fullname" . }}-logs + - mountPath: /opt/app/aai-resources/resources/logback.xml + name: {{ include "common.fullname" . }}-log-conf subPath: logback.xml + - mountPath: /opt/app/aai-resources/resources/localhost-access-logback.xml + name: {{ include "common.fullname" . }}-localhost-access-log-conf + subPath: localhost-access-logback.xml + - mountPath: /opt/app/aai-resources/resources/application.properties + name: {{ include "common.fullname" . }}-springapp-conf + subPath: application.properties + - mountPath: /opt/app/aai-resources/resources/etc/auth/aai_keystore + name: {{ include "common.fullname" . }}-auth-sec + subPath: aai_keystore ports: - containerPort: {{ .Values.service.internalPort }} - containerPort: {{ .Values.service.internalPort2 }} @@ -498,30 +504,45 @@ spec: subPath: filebeat.yml name: filebeat-conf - mountPath: /var/log/onap - name: aai-resources-logs + name: {{ include "common.fullname" . }}-logs - mountPath: /usr/share/filebeat/data - name: aai-resources-filebeat + name: {{ include "common.fullname" . }}-filebeat volumes: - name: localtime hostPath: path: /etc/localtime - - name: aai-chef-config - configMap: - name: aai-chef-config - - name: aai-data - configMap: - name: aai-resources-environments - name: filebeat-conf configMap: name: aai-filebeat - - name: aai-resources-logs + - name: {{ include "common.fullname" . }}-logs emptyDir: {} - - name: aai-resources-filebeat + - name: {{ include "common.fullname" . }}-filebeat emptyDir: {} - - name: aai-resources-log-conf + - name: {{ include "common.fullname" . }}-log-conf + configMap: + name: {{ include "common.fullname" . }}-log + - name: {{ include "common.fullname" . }}-localhost-access-log-conf + configMap: + name: {{ include "common.fullname" . }}-localhost-access-log-configmap + - name: {{ include "common.fullname" . }}-db-real-conf + configMap: + name: {{ include "common.fullname" . }}-db-real-configmap + - name: {{ include "common.fullname" . }}-db-cached-conf + configMap: + name: {{ include "common.fullname" . }}-db-cached-configmap + - name: {{ include "common.fullname" . }}-aaiconfig-conf + configMap: + name: {{ include "common.fullname" . }}-aaiconfig-configmap + - name: {{ include "common.fullname" . }}-springapp-conf + configMap: + name: {{ include "common.fullname" . }}-springapp-configmap + - name: {{ include "common.fullname" . }}-realm-conf configMap: - name: {{ include "common.fullname" . }} - restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} + name: {{ include "common.fullname" . }}-realm-configmap + - name: {{ include "common.fullname" . }}-auth-sec + secret: + secretName: {{ include "common.fullname" . }}-auth-secret + restartPolicy: {{ .Values.restartPolicy }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-resources/values.yaml b/kubernetes/aai/charts/aai-resources/values.yaml index 3b41a399e3..b7c02876d4 100644 --- a/kubernetes/aai/charts/aai-resources/values.yaml +++ b/kubernetes/aai/charts/aai-resources/values.yaml @@ -10,17 +10,18 @@ global: # global defaults # application image repository: nexus3.onap.org:10001 -image: openecomp/aai-resources:v1.1.0 +image: onap/aai-resources:1.2-STAGING-latest pullPolicy: Always restartPolicy: Always -# application configuration -config: - aaicoreversion: 1.1.0-SNAPSHOT - # default number of instances replicaCount: 1 +# Configuration for the resources deployment +config: + userId: 1000 + groupId: 1000 + nodeSelector: {} affinity: {} diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/aai_keystore b/kubernetes/aai/charts/aai-traversal/resources/config/aai_keystore new file mode 100644 index 0000000000..1ddef0c9bd Binary files /dev/null and b/kubernetes/aai/charts/aai-traversal/resources/config/aai_keystore differ diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/aaiconfig.properties b/kubernetes/aai/charts/aai-traversal/resources/config/aaiconfig.properties new file mode 100644 index 0000000000..2452a1e85b --- /dev/null +++ b/kubernetes/aai/charts/aai-traversal/resources/config/aaiconfig.properties @@ -0,0 +1,113 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +#################################################################### +# REMEMBER TO THINK ABOUT ENVIRONMENTAL DIFFERENCES AND CHANGE THE +# TEMPLATE AND *ALL* DATAFILES +#################################################################### + +aai.config.checktime=1000 + +# this could come from siteconfig.pl? +aai.config.nodename=AutomaticallyOverwritten + + + +aai.auth.cspcookies_on=false +aai.dbmodel.filename=ex5.json + +aai.server.url.base=https://aai.{{ include "common.namespace" . }}:8443/aai/ +aai.server.url=https://aai.{{ include "common.namespace" . }}:8443/aai/v11/ +aai.global.callback.url=https://aai.{{ include "common.namespace" . }}:8443/aai/ + +aai.tools.enableBasicAuth=true +aai.tools.username=AAI +aai.tools.password=AAI + +aai.truststore.filename=aai_keystore +aai.truststore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 +aai.keystore.filename=aai_keystore +aai.keystore.passwd.x=OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0 + + +aai.notification.current.version=v11 +aai.notificationEvent.default.status=UNPROCESSED +aai.notificationEvent.default.eventType=AAI-EVENT +aai.notificationEvent.default.domain=dev +aai.notificationEvent.default.sourceName=aai +aai.notificationEvent.default.sequenceNumber=0 +aai.notificationEvent.default.severity=NORMAL +aai.notificationEvent.default.version=v11 +# This one lets us enable/disable resource-version checking on updates/deletes +aai.resourceversion.enableflag=true +aai.logging.maxStackTraceEntries=10 +aai.default.api.version=v11 + + + +# Used by Model-processing code +aai.model.delete.sleep.per.vtx.msec=500 +aai.model.query.resultset.maxcount=50 +aai.model.query.timeout.sec=90 + +# Used by Data Grooming +aai.grooming.default.max.file=150 +aai.grooming.default.sleep.minutes=7 + +aai.model.proc.max.levels=50 +aai.edgeTag.proc.max.levels=50 + +# for transaction log +aai.logging.hbase.interceptor=true +aai.logging.hbase.enabled=true +aai.logging.hbase.logrequest=true +aai.logging.hbase.logresponse=true + +# for gremlin server +aai.server.rebind=g +hbase.table.name=aailogging.dev +hbase.table.timestamp.format=YYYYMMdd-HH:mm:ss:SSS +hbase.zookeeper.quorum=localhost +hbase.zookeeper.property.clientPort=2181 +hbase.zookeeper.znode.parent=/hbase + +aai.logging.trace.enabled=true +aai.logging.trace.logrequest=false +aai.logging.trace.logresponse=false + +aai.transaction.logging=true +aai.transaction.logging.get=false +aai.transaction.logging.post=false + +#timeout for traversal enabled flag +aai.traversal.timeoutenabled=true + +#timeout app specific +aai.traversal.timeout.appspecific=JUNITTESTAPP1,1|JUNITTESTAPP2,-1|DCAE-CCS,-1|DCAES,-1|AAI-FILEGEN-GFPIP,-1 + +#default timeout limit added for traversal if not overridden (in ms) +aai.traversal.timeoutlimit=180000 diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/application.properties b/kubernetes/aai/charts/aai-traversal/resources/config/application.properties new file mode 100644 index 0000000000..14c59d23f7 --- /dev/null +++ b/kubernetes/aai/charts/aai-traversal/resources/config/application.properties @@ -0,0 +1,72 @@ +# The following info parameters are being referenced by ajsc6 +info.build.artifact=aai-traversal +info.build.name=traversal +info.build.description=Traversal Microservice +info.build.version=1.2.0 + +spring.application.name=aai-traversal +spring.jersey.type=filter + +server.contextPath=/ +spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration + +spring.profiles.active=production,dmaap +#The max number of active threads in this pool +server.tomcat.max-threads=200 +#The minimum number of threads always kept alive +server.tomcat.min-Spare-Threads=25 +#The number of milliseconds before an idle thread shutsdown, unless the number of active threads are less or equal to minSpareThreads +server.tomcat.max-idle-time=60000 + + +#Add this properties only if you want to change the URL, AJSC Framework interceptors will intercept +#com.att.ajsc.common.interceptors.PreInterceptor.url=/** +#com.att.ajsc.common.interceptors.PostInterceptor.url=/** + +#Servlet context parameters +server.context_parameters.p-name=value #context parameter with p-name as key and value as value. +kubernetes.namespace={{ include "common.namespace" . }} + +# If you get an application startup failure that the port is already taken +# If thats not it, please check if the key-store file path makes sense +server.local.startpath=aai-traversal/src/main/resources/ +server.basic.auth.location=${server.local.startpath}etc/auth/realm.properties + +server.port=8446 +server.ssl.enabled-protocols=TLSv1.1,TLSv1.2 +server.ssl.key-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.key-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.trust-store=${server.local.startpath}etc/auth/aai_keystore +server.ssl.trust-store-password=password(OBF:1vn21ugu1saj1v9i1v941sar1ugw1vo0) +server.ssl.client-auth=want +server.ssl.key-store-type=JKS + +# JMS bind address host port +jms.bind.address=tcp://localhost:61647 +dmaap.ribbon.eureka.enabled=false +dmaap.ribbon.listOfServers=dmaap.{{ include "common.namespace" . }}:3904 +# Number of milliseconds to wait before making ping requests again +dmaap.ribbon.ServerListRefreshInterval=75000 +dmaap.ribbon.NFLoadBalancerPingInterval=75000 +dmaap.ribbon.NFLoadBalancerRuleClassName=com.netflix.loadbalancer.AvailabilityFilteringRule +dmaap.ribbon.NFLoadBalancerPingClassName=org.onap.aai.config.HttpPingImpl +dmaap.ribbon.EnableMarkingServerDownOnReachingFailureLimit=true +dmaap.ribbon.ServerDownFailureLimit=1 +# This needs to be verified but it seems that adding this property should automatically +# Make the dmaap client change the url from http to https depending on the server +dmaap.ribbon.securePorts=3905 + +# Custom Dmaap Specific Configuration +dmaap.ribbon.username= +dmaap.ribbon.password= +dmaap.ribbon.health.endpoint=/topics/AAI-EVENT +# Number of seconds to wait for the ping to work and might need to increase this if the pings are all failing +dmaap.ribbon.pingport.timeout=3 + +niws.loadbalancer.dmaap.filterCircuitTripped=true +niws.loadbalancer.dmaap.connectionFailureCountThreshold=3 +niws.loadbalancer.dmaap.circuitTripMaxTimeoutSeconds=180 +#dmaap.ribbon.retryableStatusCodes=404,503 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetriesNextServer=2 +#dmaap.ribbon.retryableStatusCodes.MaxAutoRetries=2 +#dmaap.ribbon.retryableStatusCodes.OkToRetryOnAllOperations=true diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/janusgraph-cached.properties b/kubernetes/aai/charts/aai-traversal/resources/config/janusgraph-cached.properties new file mode 100644 index 0000000000..dd5c3eed66 --- /dev/null +++ b/kubernetes/aai/charts/aai-traversal/resources/config/janusgraph-cached.properties @@ -0,0 +1,50 @@ +# +# ============LICENSE_START======================================================= +# org.onap.aai +# ================================================================================ +# 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. +# + +query.fast-property=true +query.smart-limit=false + +{{- $seed_size := default 1 .Values.global.cassandra.replicas | int -}} +{{- $global := . }} + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=cassandra +storage.hostname={{- range $i, $e := until $seed_size }}{{ $global.Release.Name }}-aai-cassandra-{{ $i }},{{- end }} + +storage.cassandra.keyspace=aaigraph + +storage.cassandra.read-consistency-level=LOCAL_QUORUM +storage.cassandra.write-consistency-level=LOCAL_QUORUM +storage.cassandra.replication-factor=3 +storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy +#storage.cassandra.replication-strategy-options=MTA1cass,3 + +#schema.default=none +storage.lock.wait-time=300 +#caching on +cache.db-cache = true +cache.db-cache-clean-wait = 20 +cache.db-cache-time = 180000 +cache.db-cache-size = 0.3 + +#load graphson file on startup +load.snapshot.file=false diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/janusgraph-realtime.properties b/kubernetes/aai/charts/aai-traversal/resources/config/janusgraph-realtime.properties new file mode 100644 index 0000000000..875a8a5977 --- /dev/null +++ b/kubernetes/aai/charts/aai-traversal/resources/config/janusgraph-realtime.properties @@ -0,0 +1,45 @@ +# +# ============LICENSE_START======================================================= +# 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. +# + +query.fast-property=true +query.smart-limit=false + +{{- $seed_size := default 1 .Values.global.cassandra.replicas | int -}} +{{- $global := . }} + +# the following parameters are not reloaded automatically and require a manual bounce +storage.backend=cassandra +storage.hostname={{- range $i, $e := until $seed_size }}{{ $global.Release.Name }}-aai-cassandra-{{ $i }},{{- end }} + +storage.cassandra.keyspace=aaigraph + +storage.cassandra.read-consistency-level=LOCAL_QUORUM +storage.cassandra.write-consistency-level=LOCAL_QUORUM +storage.cassandra.replication-factor=3 +storage.cassandra.replication-strategy-class=org.apache.cassandra.locator.SimpleStrategy +#storage.cassandra.replication-strategy-options=MTA1cass,3 + +#schema.default=none +storage.lock.wait-time=300 +# Setting db-cache to false ensure the fastest propagation of changes across servers +cache.db-cache = false + +#load graphson file on startup +load.snapshot.file=false diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/localhost-access-logback.xml b/kubernetes/aai/charts/aai-traversal/resources/config/localhost-access-logback.xml new file mode 100644 index 0000000000..a318796c57 --- /dev/null +++ b/kubernetes/aai/charts/aai-traversal/resources/config/localhost-access-logback.xml @@ -0,0 +1,62 @@ + + + + + ${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log + + ${AJSC_HOME}/logs/ajsc-jetty/localhost_access.log.%d{yyyy-MM-dd} + + + + %a %u %z [%t] "%m %U%q" %s %b %y %i{X-TransactionId} %i{X-FromAppId} %i{X-Forwarded-For} %i{X-AAI-SSL-Client-CN} %i{X-AAI-SSL-Client-OU} %i{X-AAI-SSL-Client-O} %i{X-AAI-SSL-Client-L} %i{X-AAI-SSL-Client-ST} %i{X-AAI-SSL-Client-C} %i{X-AAI-SSL-Client-NotBefore} %i{X-AAI-SSL-Client-NotAfter} %i{X-AAI-SSL-Client-DN} %D + + + + + + \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/log/logback.xml b/kubernetes/aai/charts/aai-traversal/resources/config/log/logback.xml deleted file mode 100644 index fb8d8a53bf..0000000000 --- a/kubernetes/aai/charts/aai-traversal/resources/config/log/logback.xml +++ /dev/null @@ -1,345 +0,0 @@ - - ${module.ajsc.namespace.name} - - - - - - - - - - - - - - - - - - - ERROR - ACCEPT - DENY - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n - - - - ${restLogDirectory}/sane.log - - ${restLogDirectory}/sane.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - INFO - ACCEPT - DENY - - ${restLogDirectory}/${metricsLogName}.log - - ${restLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - DEBUG - ACCEPT - DENY - - ${restLogDirectory}/${debugLogName}.log - - ${restLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - WARN - - ${restLogDirectory}/${errorLogName}.log - - ${restLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - ${restLogDirectory}/${auditLogName}.log - - ${restLogDirectory}/${auditLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - DEBUG - ACCEPT - DENY - - ${restLogDirectory}/translog.log - - ${restLogDirectory}/translog.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - - - - - WARN - - ${dmaapLogDirectory}/${errorLogName}.log - - ${dmaapLogDirectory}/${errorLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - DEBUG - ACCEPT - DENY - - ${dmaapLogDirectory}/${debugLogName}.log - - ${dmaapLogDirectory}/${debugLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - INFO - ACCEPT - DENY - - ${dmaapLogDirectory}/${metricsLogName}.log - - ${dmaapLogDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${perfLogsDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.log - - ${perfLogsDirectory}/Audit-${lrmRVer}-${lrmRO}-${Pid}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - - ${perfLogsDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.log - - ${perfLogsDirectory}/Perform-${lrmRVer}-${lrmRO}-${Pid}.%d{yyyy-MM-dd}.%i.log - - ${maxFileSize} - - ${maxHistory} - ${totalSizeCap} - - - ${pattern} - - - - ${queueSize} - true - 0 - - - - ${queueSize} - true - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/logback.xml b/kubernetes/aai/charts/aai-traversal/resources/config/logback.xml new file mode 100644 index 0000000000..2ed8f5c8f1 --- /dev/null +++ b/kubernetes/aai/charts/aai-traversal/resources/config/logback.xml @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + %clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx} + + + + + ${logDirectory}/rest/sane.log + + ${logDirectory}/rest/sane.log.%d{yyyy-MM-dd} + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + + 1000 + true + + + + + INFO + ACCEPT + DENY + + ${logDirectory}/rest/metrics.log + + ${logDirectory}/rest/metrics.log.%d{yyyy-MM-dd} + + + + ${eelfMetricLogPattern} + + + + 1000 + true + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/rest/debug.log + + ${logDirectory}/rest/debug.log.%d{yyyy-MM-dd} + + + + ${eelfLogPattern} + + + + 1000 + true + + + + + WARN + + ${logDirectory}/rest/error.log + + ${logDirectory}/rest/error.log.%d{yyyy-MM-dd} + + + + ${eelfErrorLogPattern} + + + + 1000 + true + + + + ${logDirectory}/rest/audit.log + + ${logDirectory}/rest/audit.log.%d{yyyy-MM-dd} + + + + ${eelfAuditLogPattern} + + + + 1000 + true + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/rest/translog.log + + ${logDirectory}/rest/translog.log.%d{yyyy-MM-dd} + + + + ${eelfTransLogPattern} + + + + 1000 + true + + + + + WARN + + ${logDirectory}/dmaapAAIEventConsumer/error.log + + ${logDirectory}/dmaapAAIEventConsumer/error.log.%d{yyyy-MM-dd} + + + + ${eelfLogPattern} + + + + + DEBUG + ACCEPT + DENY + + ${logDirectory}/dmaapAAIEventConsumer/debug.log + + ${logDirectory}/dmaapAAIEventConsumer/debug.log.%d{yyyy-MM-dd} + + + + ${eelfLogPattern} + + + + + INFO + ACCEPT + DENY + + ${logDirectory}/dmaapAAIEventConsumer/metrics.log + + ${logDirectory}/dmaapAAIEventConsumer/metrics.log.%d{yyyy-MM-dd} + + + + ${eelfMetricLogPattern} + + + + + WARN + + ${logDirectory}/external/external.log + + ${logDirectory}/external/external.log.%d{yyyy-MM-dd} + + + + ${eelfLogPattern} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.log + + + ${logDirectory}/perf-audit/Audit-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + + 1 + 9 + + + 5MB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + + ${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.log + + + ${logDirectory}/perf-audit/Perform-${lrmRVer}-${lrmRO}-${Pid}.%i.log.zip + + 1 + 9 + + + 5MB + + + "%d [%thread] %-5level %logger{1024} - %msg%n" + + + + ${logDirectory}/misc/misc.log + + ${logDirectory}/misc/misc.log.%d{yyyy-MM-dd} + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{1024} - %msg%n + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kubernetes/aai/charts/aai-traversal/resources/config/realm.properties b/kubernetes/aai/charts/aai-traversal/resources/config/realm.properties new file mode 100644 index 0000000000..fb692cc3eb --- /dev/null +++ b/kubernetes/aai/charts/aai-traversal/resources/config/realm.properties @@ -0,0 +1,12 @@ +# format : username: password[,rolename ...] +# default username/password: AAI/AAI, MSO/MSO, ModelLoader/ModelLoader... +AAI:OBF:1gfr1ev31gg7,admin +MSO:OBF:1jzx1lz31k01,admin +SDNC:OBF:1itr1i0l1i151isv,admin +DCAE:OBF:1g8u1f9d1f991g8w,admin +POLICY:OBF:1mk61i171ima1im41i0j1mko,admin +ASDC:OBF:1f991j0u1j001f9d,admin +VID:OBF:1jm91i0v1jl9,admin +APPC:OBF:1f991ksf1ksf1f9d,admin +ModelLoader:OBF:1qvu1v2h1sov1sar1wfw1j7j1wg21saj1sov1v1x1qxw,admin +AaiUI:OBF:1gfr1p571unz1p4j1gg7,admin diff --git a/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml b/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml index a7e9428a88..cc88444ae2 100644 --- a/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml +++ b/kubernetes/aai/charts/aai-traversal/templates/configmap.yaml @@ -4,4 +4,61 @@ metadata: name: {{ include "common.fullname" . }}-log namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-localhost-access-log-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/localhost-access-logback.xml").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-db-real-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/janusgraph-realtime.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-db-cached-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/janusgraph-cached.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-aaiconfig-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/aaiconfig.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-springapp-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/application.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-realm-configmap + namespace: {{ include "common.namespace" . }} +data: +{{ tpl (.Files.Glob "resources/config/realm.properties").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }}-auth-secret + namespace: {{ include "common.namespace" . }} +type: Opaque +data: +{{ tpl (.Files.Glob "resources/config/aai_keystore").AsSecrets . | indent 2 }} \ No newline at end of file diff --git a/kubernetes/aai/charts/aai-traversal/templates/deployment.yaml b/kubernetes/aai/charts/aai-traversal/templates/deployment.yaml index b4249aede1..bda80a0483 100644 --- a/kubernetes/aai/charts/aai-traversal/templates/deployment.yaml +++ b/kubernetes/aai/charts/aai-traversal/templates/deployment.yaml @@ -245,11 +245,14 @@ spec: } ]' spec: + hostname: aai-traversal initContainers: - command: - /root/ready.py args: - --container-name + - aai-cassandra + - --container-name - aai-resources env: - name: NAMESPACE @@ -265,32 +268,39 @@ spec: image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} env: - - name: CHEF_BRANCH - value: master - - name: AAI_CHEF_ENV - value: simpledemo - - name: AAI_CORE_VERSION - value: {{ .Values.config.aaicoreversion }} - - name: AAI_CHEF_LOC - value: /var/chef/aai-data/environments - - name: CHEF_GIT_URL - value: http://gerrit.onap.org/r/aai - - name: RESOURCES_HOSTNAME - value: aai-resources.{{ include "common.namespace" . }} + - name: DISABLE_UPDATE_QUERY + value: {{ .Values.config.disableUpdateQuery | quote }} + - name: LOCAL_USER_ID + value: {{ .Values.config.userId | quote }} + - name: LOCAL_GROUP_ID + value: {{ .Values.config.groupId | quote }} volumeMounts: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb - subPath: solo.rb - name: aai-chef-config - - mountPath: /var/chef/aai-data/environments/ - name: aai-data + - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties + name: {{ include "common.fullname" . }}-db-real-conf + subPath: janusgraph-realtime.properties + - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties + name: {{ include "common.fullname" . }}-db-cached-conf + subPath: janusgraph-cached.properties + - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties + name: {{ include "common.fullname" . }}-aaiconfig-conf + subPath: aaiconfig.properties - mountPath: /var/log/onap - name: aai-traversal-logs - - mountPath: /opt/app/aai-traversal/bundleconfig/etc/logback.xml - name: aai-traversal-log-conf + name: {{ include "common.fullname" . }}-logs + - mountPath: /opt/app/aai-traversal/resources/logback.xml + name: {{ include "common.fullname" . }}-log-conf subPath: logback.xml + - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml + name: {{ include "common.fullname" . }}-localhost-access-log-conf + subPath: localhost-access-logback.xml + - mountPath: /opt/app/aai-traversal/resources/application.properties + name: {{ include "common.fullname" . }}-springapp-conf + subPath: application.properties + - mountPath: /opt/app/aai-traversal/resources/etc/auth/aai_keystore + name: {{ include "common.fullname" . }}-auth-sec + subPath: aai_keystore ports: - containerPort: {{ .Values.service.internalPort }} - containerPort: {{ .Values.service.internalPort2 }} @@ -328,30 +338,44 @@ spec: subPath: filebeat.yml name: filebeat-conf - mountPath: /var/log/onap - name: aai-traversal-logs + name: {{ include "common.fullname" . }}-logs - mountPath: /usr/share/filebeat/data - name: aai-traversal-filebeat - + name: {{ include "common.fullname" . }}-filebeat volumes: - name: localtime hostPath: path: /etc/localtime - - name: aai-chef-config - configMap: - name: aai-chef-config - - name: aai-data - configMap: - name: aai-resources-environments - name: filebeat-conf configMap: name: aai-filebeat - - name: aai-traversal-logs + - name: {{ include "common.fullname" . }}-logs emptyDir: {} - - name: aai-traversal-filebeat + - name: {{ include "common.fullname" . }}-filebeat emptyDir: {} - - name: aai-traversal-log-conf + - name: {{ include "common.fullname" . }}-log-conf configMap: name: {{ include "common.fullname" . }}-log + - name: {{ include "common.fullname" . }}-localhost-access-log-conf + configMap: + name: {{ include "common.fullname" . }}-localhost-access-log-configmap + - name: {{ include "common.fullname" . }}-db-real-conf + configMap: + name: {{ include "common.fullname" . }}-db-real-configmap + - name: {{ include "common.fullname" . }}-db-cached-conf + configMap: + name: {{ include "common.fullname" . }}-db-cached-configmap + - name: {{ include "common.fullname" . }}-aaiconfig-conf + configMap: + name: {{ include "common.fullname" . }}-aaiconfig-configmap + - name: {{ include "common.fullname" . }}-springapp-conf + configMap: + name: {{ include "common.fullname" . }}-springapp-configmap + - name: {{ include "common.fullname" . }}-realm-conf + configMap: + name: {{ include "common.fullname" . }}-realm-configmap + - name: {{ include "common.fullname" . }}-auth-sec + secret: + secretName: {{ include "common.fullname" . }}-auth-secret restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-traversal/templates/job.yaml b/kubernetes/aai/charts/aai-traversal/templates/job.yaml new file mode 100644 index 0000000000..c15c05398f --- /dev/null +++ b/kubernetes/aai/charts/aai-traversal/templates/job.yaml @@ -0,0 +1,139 @@ +# Copyright © 2017-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: batch/v1 +kind: Job +metadata: + name: {{ include "common.fullname" . }}-update-query-data + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + template: + metadata: + labels: + app: {{ include "common.name" . }}-job + release: {{ .Release.Name }} + name: {{ include "common.name" . }} + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - aai + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + name: {{ include "common.name" . }}-readiness + containers: + - name: {{ include "common.name" . }}-job + image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" + imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} + command: + - bash + - "-c" + - | + set -x + mkdir -p /opt/aai/logroot/AAI-GQ/misc + bash -x /opt/app/aai-traversal/docker-entrypoint.sh install/updateQueryData.sh + env: + - name: LOCAL_USER_ID + value: "1000" + - name: LOCAL_GROUP_ID + value: "1000" + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties + name: {{ include "common.fullname" . }}-db-real-conf + subPath: janusgraph-realtime.properties + - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties + name: {{ include "common.fullname" . }}-db-cached-conf + subPath: janusgraph-cached.properties + - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties + name: {{ include "common.fullname" . }}-aaiconfig-conf + subPath: aaiconfig.properties + - mountPath: /var/log/onap + name: {{ include "common.fullname" . }}-logs + - mountPath: /opt/app/aai-traversal/resources/logback.xml + name: {{ include "common.fullname" . }}-log-conf + subPath: logback.xml + - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml + name: {{ include "common.fullname" . }}-localhost-access-log-conf + subPath: localhost-access-logback.xml + - mountPath: /opt/app/aai-traversal/resources/application.properties + name: {{ include "common.fullname" . }}-springapp-conf + subPath: application.properties + - mountPath: /opt/app/aai-traversal/resources/etc/auth/aai_keystore + name: {{ include "common.fullname" . }}-auth-sec + subPath: aai_keystore + # disable liveness probe when breakpoints set in debugger + # so K8s doesn't restart unresponsive container + volumeMounts: + - mountPath: /usr/share/filebeat/filebeat.yml + subPath: filebeat.yml + name: filebeat-conf + - mountPath: /opt/aai/logroot/AAI-GQ + name: {{ include "common.fullname" . }}-logs + - mountPath: /usr/share/filebeat/data + name: {{ include "common.fullname" . }}-filebeat + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: filebeat-conf + configMap: + name: aai-filebeat + - name: {{ include "common.fullname" . }}-logs + hostPath: + path: {{ .Values.persistence.mountPath }}/{{ include "common.namespace" . }}/{{ .Values.persistence.mountSubPath }}-update-query + - name: {{ include "common.fullname" . }}-filebeat + emptyDir: {} + - name: {{ include "common.fullname" . }}-log-conf + configMap: + name: {{ include "common.fullname" . }}-log + - name: {{ include "common.fullname" . }}-localhost-access-log-conf + configMap: + name: {{ include "common.fullname" . }}-localhost-access-log-configmap + - name: {{ include "common.fullname" . }}-db-real-conf + configMap: + name: {{ include "common.fullname" . }}-db-real-configmap + - name: {{ include "common.fullname" . }}-db-cached-conf + configMap: + name: {{ include "common.fullname" . }}-db-cached-configmap + - name: {{ include "common.fullname" . }}-aaiconfig-conf + configMap: + name: {{ include "common.fullname" . }}-aaiconfig-configmap + - name: {{ include "common.fullname" . }}-springapp-conf + configMap: + name: {{ include "common.fullname" . }}-springapp-configmap + - name: {{ include "common.fullname" . }}-realm-conf + configMap: + name: {{ include "common.fullname" . }}-realm-configmap + - name: {{ include "common.fullname" . }}-auth-sec + secret: + secretName: {{ include "common.fullname" . }}-auth-secret + restartPolicy: OnFailure + imagePullSecrets: + - name: "{{ include "common.namespace" . }}-docker-registry-key" diff --git a/kubernetes/aai/charts/aai-traversal/values.yaml b/kubernetes/aai/charts/aai-traversal/values.yaml index b1c8fedae8..d3d686d9f1 100644 --- a/kubernetes/aai/charts/aai-traversal/values.yaml +++ b/kubernetes/aai/charts/aai-traversal/values.yaml @@ -10,14 +10,20 @@ global: # global defaults # application image repository: nexus3.onap.org:10001 -image: openecomp/aai-traversal:v1.1.0 +image: onap/aai-traversal:1.2-STAGING-latest pullPolicy: Always restartPolicy: Always # application configuration config: aaicoreversion: 1.1.0-SNAPSHOT + userId: 1000 + groupId: 1000 + disableUpdateQuery: true +persistence: + mountPath: /dockerdata-nfs + mountSubPath: aai/aai-traversal # default number of instances replicaCount: 1 diff --git a/kubernetes/aai/templates/configmap.yaml b/kubernetes/aai/templates/configmap.yaml index 78235bcd4f..592e4129d1 100644 --- a/kubernetes/aai/templates/configmap.yaml +++ b/kubernetes/aai/templates/configmap.yaml @@ -14,22 +14,5 @@ metadata: namespace: {{ include "common.namespace" . }} data: {{ tpl (.Files.Glob "resources/config/haproxy/*").AsConfig . | indent 2 }} ---- -# this is a shared resource for subcharts -apiVersion: v1 -kind: ConfigMap -metadata: - name: aai-chef-config - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/aai-data/chef-config/dev/.knife/solo.rb").AsConfig . | indent 2 }} ---- -# this is a shared resource for subcharts -apiVersion: v1 -kind: ConfigMap -metadata: - name: aai-resources-environments - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/aai-data/environments/*").AsConfig . | indent 2 }} + diff --git a/kubernetes/aai/values.yaml b/kubernetes/aai/values.yaml index 8f35c62f5e..5d08268e88 100644 --- a/kubernetes/aai/values.yaml +++ b/kubernetes/aai/values.yaml @@ -26,6 +26,8 @@ global: # global defaults loggingRepository: docker.elastic.co loggingImage: beats/filebeat:5.5.0 restartPolicy: Always + cassandra: + replicas: 3 # application image dockerhubRepository: registry.hub.docker.com -- cgit 1.2.3-korg