Merge "config seg mso deployment"
authorAlexis de Talhouët <alexis.de_talhouet@bell.ca>
Wed, 24 Jan 2018 18:33:59 +0000 (18:33 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 24 Jan 2018 18:33:59 +0000 (18:33 +0000)
43 files changed:
kubernetes/appc/resources/config/conf/aaiclient.properties [moved from kubernetes/config/docker/init/src/config/appc/conf/aaiclient.properties with 100% similarity]
kubernetes/appc/resources/config/conf/appc.properties [moved from kubernetes/config/docker/init/src/config/appc/conf/appc.properties with 100% similarity]
kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml [new file with mode: 0644]
kubernetes/appc/resources/config/log/org.ops4j.pax.logging.cfg [moved from kubernetes/config/docker/init/src/config/log/appc/org.ops4j.pax.logging.cfg with 100% similarity]
kubernetes/appc/templates/appc-conf-configmap.yaml [new file with mode: 0644]
kubernetes/appc/templates/appc-deployment.yaml
kubernetes/appc/templates/appc-log-configmap.yaml [new file with mode: 0644]
kubernetes/clamp/resources/config/mariadb/conf.d/conf1/my.cnf [moved from kubernetes/config/docker/init/src/config/clamp/mariadb/conf.d/conf1/my.cnf with 100% similarity]
kubernetes/clamp/resources/config/mariadb/docker-entrypoint-initdb.d/bulkload/clds-create-db-objects.sql [moved from kubernetes/config/docker/init/src/config/clamp/mariadb/docker-entrypoint-initdb.d/bulkload/clds-create-db-objects.sql with 100% similarity]
kubernetes/clamp/resources/config/mariadb/docker-entrypoint-initdb.d/bulkload/clds-stored-procedures.sql [moved from kubernetes/config/docker/init/src/config/clamp/mariadb/docker-entrypoint-initdb.d/bulkload/clds-stored-procedures.sql with 100% similarity]
kubernetes/clamp/resources/config/mariadb/docker-entrypoint-initdb.d/drop/clds-drop-db-objects.sql [moved from kubernetes/config/docker/init/src/config/clamp/mariadb/docker-entrypoint-initdb.d/drop/clds-drop-db-objects.sql with 100% similarity]
kubernetes/clamp/resources/config/mariadb/docker-entrypoint-initdb.d/load-sql-files-tests-automation.sh [moved from kubernetes/config/docker/init/src/config/clamp/mariadb/docker-entrypoint-initdb.d/load-sql-files-tests-automation.sh with 100% similarity]
kubernetes/clamp/templates/clamp-mariadb-configmap.yaml [new file with mode: 0644]
kubernetes/clamp/templates/clamp-mariadb-deployment.yaml
kubernetes/log/templates/elasticsearch-deployment.yaml
kubernetes/log/values.yaml
kubernetes/mso/templates/db-deployment-configmap.yaml [new file with mode: 0644]
kubernetes/mso/templates/db-deployment.yaml
kubernetes/portal/resources/config/log/filebeat/filebeat.yml [new file with mode: 0644]
kubernetes/portal/resources/config/log/portal/onapportal/logback.xml [moved from kubernetes/config/docker/init/src/config/log/portal/onapportal/logback.xml with 100% similarity]
kubernetes/portal/resources/config/log/portal/onapportalsdk/logback.xml [moved from kubernetes/config/docker/init/src/config/log/portal/onapportalsdk/logback.xml with 100% similarity]
kubernetes/portal/resources/config/mariadb/oom_updates.sql [moved from kubernetes/config/docker/init/src/config/portal/mariadb/oom_updates.sql with 100% similarity]
kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties [moved from kubernetes/config/docker/init/src/config/portal/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties with 100% similarity]
kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties [moved from kubernetes/config/docker/init/src/config/portal/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties with 100% similarity]
kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/portal.properties [moved from kubernetes/config/docker/init/src/config/portal/portal-fe/webapps/etc/ONAPPORTAL/portal.properties with 100% similarity]
kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTAL/system.properties [moved from kubernetes/config/docker/init/src/config/portal/portal-fe/webapps/etc/ONAPPORTAL/system.properties with 100% similarity]
kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties [moved from kubernetes/config/docker/init/src/config/portal/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties with 100% similarity]
kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties [moved from kubernetes/config/docker/init/src/config/portal/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties with 100% similarity]
kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties [moved from kubernetes/config/docker/init/src/config/portal/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties with 100% similarity]
kubernetes/portal/resources/config/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties [moved from kubernetes/config/docker/init/src/config/portal/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties with 100% similarity]
kubernetes/portal/templates/portal-apps-configmap.yaml [new file with mode: 0644]
kubernetes/portal/templates/portal-apps-deployment.yaml
kubernetes/portal/templates/portal-logs-configmap.yaml [new file with mode: 0644]
kubernetes/portal/templates/portal-widgets-deployment.yaml
kubernetes/portal/values.yaml
kubernetes/sdnc/resources/config/conf/aaiclient.properties [moved from kubernetes/config/docker/init/src/config/sdnc/conf/aaiclient.properties with 100% similarity]
kubernetes/sdnc/resources/config/conf/admportal.json [moved from kubernetes/config/docker/init/src/config/sdnc/conf/admportal.json with 100% similarity]
kubernetes/sdnc/resources/config/log/filebeat/log4j/filebeat.yml [new file with mode: 0644]
kubernetes/sdnc/resources/config/log/org.ops4j.pax.logging.cfg [moved from kubernetes/config/docker/init/src/config/log/sdnc/org.ops4j.pax.logging.cfg with 100% similarity]
kubernetes/sdnc/templates/sdnc-conf-configmap.yaml [new file with mode: 0644]
kubernetes/sdnc/templates/sdnc-log-configmap.yaml [new file with mode: 0644]
kubernetes/sdnc/templates/sdnc-statefulset.yaml
kubernetes/sdnc/templates/web-deployment.yaml

diff --git a/kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml b/kubernetes/appc/resources/config/log/filebeat/log4j/filebeat.yml
new file mode 100644 (file)
index 0000000..79c9a08
--- /dev/null
@@ -0,0 +1,49 @@
+filebeat.prospectors:
+#it is mandatory, in our case it's log
+- input_type: log
+  #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
+  paths:
+    - /var/log/onap/*/*/*/*.log
+    - /var/log/onap/*/*/*.log
+    - /var/log/onap/*/*.log
+
+  # The below commented properties are for time-based rolling policy. But as the log4j 1.2x does not support time-based rolling these properties are not set
+  #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
+  #ignore_older: 48h
+  # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit
+  #clean_inactive: 96h
+
+  #Multiline properties for log4j xml log events
+  multiline.pattern: '</log4j:event>'
+  multiline.negate: true
+  multiline.match: before
+  #multiline.max_lines: 500
+  #multiline.timeout: 5s
+
+# Name of the registry file. If a relative path is used, it is considered relative to the
+# data path. Else full qualified file name.
+#filebeat.registry_file: ${path.data}/registry
+
+
+output.logstash:
+  #List of logstash server ip addresses with port number.
+  #But, in our case, this will be the loadbalancer IP address.
+  #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
+  hosts: ["logstash.onap-log:5044"]
+  #If enable will do load balancing among availabe Logstash, automatically.
+  loadbalance: true
+
+  #The list of root certificates for server verifications.
+  #If certificate_authorities is empty or not set, the trusted
+  #certificate authorities of the host system are used.
+  #ssl.certificate_authorities: $ssl.certificate_authorities
+
+  #The path to the certificate for SSL client authentication. If the certificate is not specified,
+  #client authentication is not available.
+  #ssl.certificate: $ssl.certificate
+
+  #The client certificate key used for client authentication.
+  #ssl.key: $ssl.key
+
+  #The passphrase used to decrypt an encrypted key stored in the configured key file
+  #ssl.key_passphrase: $ssl.key_passphrase
diff --git a/kubernetes/appc/templates/appc-conf-configmap.yaml b/kubernetes/appc/templates/appc-conf-configmap.yaml
new file mode 100644 (file)
index 0000000..0e418d1
--- /dev/null
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableAppcAppc }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: appc-conf-configmap
+  namespace: {{ .Values.nsPrefix }}-appc
+data:
+{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }}
+#{{ end }}
index f4593b0..8caf286 100644 (file)
@@ -49,15 +49,19 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: /opt/openecomp/appc/data/properties/appc.properties
-          name: appc-properties
+          name: appc-conf
+          subPath: appc.properties
         - mountPath: /opt/openecomp/appc/data/properties/aaiclient.properties
-          name: appc-aaiclient-properties
+          name: appc-conf
+          subPath: aaiclient.properties
         - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
-          name: sdnc-aaiclient-properties
+          name: appc-conf
+          subPath: aaiclient.properties
         - mountPath: /var/log/onap
           name: appc-logs
         - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
           name: appc-log-config
+          subPath: org.ops4j.pax.logging.cfg
         ports:
         - containerPort: 8181
         - containerPort: 1830
@@ -72,6 +76,7 @@ spec:
         volumeMounts:
         - mountPath: /usr/share/filebeat/filebeat.yml
           name: filebeat-conf
+          subPath: filebeat.yml
         - mountPath: /var/log/onap
           name: appc-logs
         - mountPath: /usr/share/filebeat/data
@@ -81,24 +86,18 @@ spec:
           hostPath:
             path: /etc/localtime
         - name: filebeat-conf
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
+          configMap:
+            name: appc-filebeat-configmap
         - name: appc-log-config
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/appc/org.ops4j.pax.logging.cfg
+          configMap:
+            name: appc-logging-cfg-configmap
         - name: appc-logs
           emptyDir: {}
         - name: appc-data-filebeat
           emptyDir: {}
-        - name: appc-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/appc/conf/appc.properties
-        - name: appc-aaiclient-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/appc/conf/aaiclient.properties
-        - name: sdnc-aaiclient-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
+        - name: appc-conf
+          configMap:
+            name: appc-conf-configmap
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
diff --git a/kubernetes/appc/templates/appc-log-configmap.yaml b/kubernetes/appc/templates/appc-log-configmap.yaml
new file mode 100644 (file)
index 0000000..323f852
--- /dev/null
@@ -0,0 +1,17 @@
+#{{ if not .Values.disableAppcAppc }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: appc-filebeat-configmap
+  namespace: {{ .Values.nsPrefix }}-appc
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: appc-logging-cfg-configmap
+  namespace: {{ .Values.nsPrefix }}-appc
+data:
+{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/clamp/templates/clamp-mariadb-configmap.yaml b/kubernetes/clamp/templates/clamp-mariadb-configmap.yaml
new file mode 100644 (file)
index 0000000..1fdc155
--- /dev/null
@@ -0,0 +1,33 @@
+#{{ if not .Values.disableClampClampMariadb }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: clamp-entrypoint-initdb-configmap
+  namespace: {{ .Values.nsPrefix }}-clamp
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: clamp-entrypoint-drop-configmap
+  namespace: {{ .Values.nsPrefix }}-clamp
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/drop/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: clamp-entrypoint-bulkload-configmap
+  namespace: {{ .Values.nsPrefix }}-clamp
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/bulkload/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: clamp-mariadb-conf-configmap
+  namespace: {{ .Values.nsPrefix }}-clamp
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/conf.d/conf1/*").AsConfig . | indent 2 }}
+#{{ end }}
index 46a6433..0566e50 100644 (file)
@@ -25,9 +25,14 @@ spec:
           - name: MYSQL_ROOT_PASSWORD
             value: {{ .Values.mysqlPassword }}
         volumeMounts:
-        - mountPath: /docker-entrypoint-initdb.d
+        - mountPath: /docker-entrypoint-initdb.d/load-sql-files-tests-automation.sh
           name: docker-entrypoint-initdb
-        - mountPath: /etc/mysql/conf.d
+          subPath: load-sql-files-tests-automation.sh
+        - mountPath: /docker-entrypoint-initdb.d/drop/
+          name: docker-entrypoint-clds-drop
+        - mountPath: /docker-entrypoint-initdb.d/bulkload/
+          name: docker-entrypoint-bulkload
+        - mountPath: /etc/mysql/conf.d/conf1/
           name:  clamp-mariadb-conf
         - mountPath: /var/lib/mysql
           name: clamp-mariadb-data
@@ -38,14 +43,20 @@ spec:
           periodSeconds: 10
       volumes:
         - name: docker-entrypoint-initdb
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/clamp/mariadb/docker-entrypoint-initdb.d
+          configMap:
+            name: clamp-entrypoint-initdb-configmap
+        - name: docker-entrypoint-clds-drop
+          configMap:
+            name: clamp-entrypoint-drop-configmap
+        - name: docker-entrypoint-bulkload
+          configMap:
+            name: clamp-entrypoint-bulkload-configmap
         - name: clamp-mariadb-conf
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/clamp/mariadb/conf.d
+          configMap:
+            name: clamp-mariadb-conf-configmap
         - name: clamp-mariadb-data
           persistentVolumeClaim:
             claimName: clamp-db
       imagePullSecrets:
       - name: {{ .Values.nsPrefix }}-docker-registry-key
-#{{ end }}
\ No newline at end of file
+#{{ end }}
index 74ab921..bbf7260 100644 (file)
@@ -18,9 +18,14 @@ spec:
     spec:
       initContainers:
       - command:
-        - sysctl
-        - -w
-        - vm.max_map_count=262144
+        - /bin/sh
+        - -c
+        - |
+          sysctl -w vm.max_map_count=262144
+          mkdir -p /logroot/elasticsearch/logs
+          mkdir -p /logroot/elasticsearch/data
+          chmod -R 777 /logroot/elasticsearch
+          chown -R root:root /logroot
         env:
         - name: NAMESPACE
           valueFrom:
@@ -32,6 +37,9 @@ spec:
         image: {{ .Values.image.es_bb }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: init-sysctl
+        volumeMounts:
+        - name: elasticsearch-logs
+          mountPath: /logroot/
       containers:
       - name: elasticsearch
         image: {{ .Values.image.elasticsearch}}
@@ -59,7 +67,7 @@ spec:
             claimName: elasticsearch-db
         - name: elasticsearch-logs
           hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/elasticsearch/logs
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/
         - name: elasticsearch-conf
           configMap:
             name: elasticsearch-configmap
index 0441830..3ee3529 100644 (file)
@@ -1,5 +1,5 @@
 nsPrefix: onap
-pullPolicy: Always 
+pullPolicy: Always
 nodePortPrefix: 302
 image:
   readiness: oomk8s/readiness-check:1.0.0
@@ -7,4 +7,3 @@ image:
   kibana: docker.elastic.co/kibana/kibana:5.5.0
   elasticsearch: docker.elastic.co/elasticsearch/elasticsearch:5.5.0
   es_bb: busybox
-
diff --git a/kubernetes/mso/templates/db-deployment-configmap.yaml b/kubernetes/mso/templates/db-deployment-configmap.yaml
new file mode 100644 (file)
index 0000000..ac3c3bf
--- /dev/null
@@ -0,0 +1,65 @@
+#{{ if not .Values.disableMsoMariadb }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mso-confd-configmap
+  namespace: {{ .Values.nsPrefix }}-mso
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/conf.d/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mso-docker-entry-initd-configmap
+  namespace: {{ .Values.nsPrefix }}-mso
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mso-automated-tests-configmap
+  namespace: {{ .Values.nsPrefix }}-mso
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mso-bulkload-default-configmap
+  namespace: {{ .Values.nsPrefix }}-mso
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mso-demo-dns-configmap
+  namespace: {{ .Values.nsPrefix }}-mso
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mso-demo-vfw-configmap
+  namespace: {{ .Values.nsPrefix }}-mso
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mso-scripts-camunda-configmap
+  namespace: {{ .Values.nsPrefix }}-mso
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: mso-main-schemas-configmap
+  namespace: {{ .Values.nsPrefix }}-mso
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/*").AsConfig . | indent 2 }}
+#{{ end }}
index 820d7e2..e6f09c5 100644 (file)
@@ -29,8 +29,24 @@ spec:
           readOnly: true
         - mountPath: /etc/mysql/conf.d
           name: mso-mariadb-conf
-        - mountPath: /docker-entrypoint-initdb.d
+        - mountPath: /docker-entrypoint-initdb.d/02-load-additional-changes.sh
           name: mso-mariadb-docker-entrypoint-initdb
+          subPath: 02-load-additional-changes.sh
+        - mountPath: /docker-entrypoint-initdb.d/01-load-default-sql-files.sh
+          name: mso-mariadb-docker-entrypoint-initdb
+          subPath: 01-load-default-sql-files.sh
+        - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests
+          name: mso-mariadb-docker-entrypoint-automated-tests
+        - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default
+          name: mso-mariadb-docker-entrypoint-bulkload-default
+        - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns
+          name: mso-mariadb-docker-entrypoint-demo-dns
+        - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw
+          name: mso-mariadb-docker-entrypoint-demo-vfw
+        - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/camunda
+          name: mso-mariadb-docker-entrypoint-camunda
+        - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/main-schemas
+          name: mso-mariadb-docker-entrypoint-main-schemas
         - mountPath: /var/lib/mysql
           name: mso-mariadb-data
         ports:
@@ -42,18 +58,36 @@ spec:
           initialDelaySeconds: 5
           periodSeconds: 10
       volumes:
-        - name: localtime
-          hostPath:
-            path: /etc/localtime
         - name: mso-mariadb-conf
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/conf.d
+          configMap:
+            name: mso-confd-configmap
         - name: mso-mariadb-docker-entrypoint-initdb
+          configMap:
+            name: mso-docker-entry-initd-configmap
+        - name: mso-mariadb-docker-entrypoint-automated-tests
+          configMap:
+            name: mso-automated-tests-configmap
+        - name: mso-mariadb-docker-entrypoint-bulkload-default
+          configMap:
+            name: mso-bulkload-default-configmap
+        - name: mso-mariadb-docker-entrypoint-demo-dns
+          configMap:
+            name: mso-demo-dns-configmap
+        - name: mso-mariadb-docker-entrypoint-demo-vfw
+          configMap:
+            name: mso-demo-vfw-configmap
+        - name: mso-mariadb-docker-entrypoint-camunda
+          configMap:
+            name: mso-scripts-camunda-configmap
+        - name: mso-mariadb-docker-entrypoint-main-schemas
+          configMap:
+            name: mso-main-schemas-configmap
+        - name: localtime
           hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/docker-entrypoint-initdb.d
+            path: /etc/localtime
         - name: mso-mariadb-data
           persistentVolumeClaim:
             claimName: mso-db
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }}
\ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/portal/resources/config/log/filebeat/filebeat.yml b/kubernetes/portal/resources/config/log/filebeat/filebeat.yml
new file mode 100644 (file)
index 0000000..f316b86
--- /dev/null
@@ -0,0 +1,41 @@
+filebeat.prospectors:
+#it is mandatory, in our case it's log
+- input_type: log
+  #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
+  paths:
+    - /var/log/onap/*/*/*/*.log
+    - /var/log/onap/*/*/*.log
+    - /var/log/onap/*/*.log
+  #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
+  ignore_older: 48h
+  # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit
+  clean_inactive: 96h
+
+
+# Name of the registry file. If a relative path is used, it is considered relative to the
+# data path. Else full qualified file name.
+#filebeat.registry_file: ${path.data}/registry
+
+
+output.logstash:
+  #List of logstash server ip addresses with port number.
+  #But, in our case, this will be the loadbalancer IP address.
+  #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
+  hosts: ["logstash.onap-log:5044"]
+  #If enable will do load balancing among availabe Logstash, automatically.
+  loadbalance: true
+
+  #The list of root certificates for server verifications.
+  #If certificate_authorities is empty or not set, the trusted
+  #certificate authorities of the host system are used.
+  #ssl.certificate_authorities: $ssl.certificate_authorities
+
+  #The path to the certificate for SSL client authentication. If the certificate is not specified,
+  #client authentication is not available.
+  #ssl.certificate: $ssl.certificate
+
+  #The client certificate key used for client authentication.
+  #ssl.key: $ssl.key
+
+  #The passphrase used to decrypt an encrypted key stored in the configured key file
+  #ssl.key_passphrase: $ssl.key_passphrase
diff --git a/kubernetes/portal/templates/portal-apps-configmap.yaml b/kubernetes/portal/templates/portal-apps-configmap.yaml
new file mode 100644 (file)
index 0000000..044e0d8
--- /dev/null
@@ -0,0 +1,35 @@
+#{{ if not .Values.disablePortalPortalapps }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal-onap-portal-sdk-configmap
+  namespace: {{ .Values.nsPrefix }}-portal
+data:
+{{ tpl (.Files.Glob "resources/config/portal-fe/webapps/etc/ONAPPORTALSDK/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal-onap-portal-configmap
+  namespace: {{ .Values.nsPrefix }}-portal
+data:
+{{ tpl (.Files.Glob "resources/config/portal-fe/webapps/etc/ONAPPORTAL/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal-mariadb-configmap
+  namespace: {{ .Values.nsPrefix }}-portal
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/oom_updates.sql").AsConfig . | indent 2 }}
+#{{ end }}
+---
+#{{ if not .Values.disablePortalPortalwidgets }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal-onapwidgetms-configmap
+  namespace: {{ .Values.nsPrefix }}-portal
+data:
+{{ tpl (.Files.Glob "resources/config/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties").AsConfig . | indent 2 }}
+#{{ end }}
index 761441a..b45cec4 100755 (executable)
@@ -33,11 +33,19 @@ spec:
         volumeMounts:
         - mountPath: /portal-mysql/oom_updates.sql
           name: portal-mariadb-onboarding-sql
+          subPath: oom_updates.sql
         - mountPath: /portal_root/
           name: portal-root
         image: {{ .Values.image.mariadbClient }}
         imagePullPolicy: {{ .Values.pullPolicy }}
         name: provision-portaldb-users
+      - command: ["/bin/bash", "-c", "mkdir -p /ubuntu-init/ && chmod -R 777 /ubuntu-init/"]
+        volumeMounts:
+        - name: portal-logs
+          mountPath: /ubuntu-init/
+        image: {{ .Values.image.ubuntuInit }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: portal-app-logs-init
       containers:
       - image: {{ .Values.image.portalapps }}
         imagePullPolicy: {{ .Values.pullPolicy }}
@@ -51,23 +59,32 @@ spec:
           name: localtime
           readOnly: true
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties"
-          name: portal-fusion-properties
+          name: onap-portal-properties
+          subPath: fusion.properties
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/openid-connect.properties"
-          name: portal-openid-connect-properties
+          name: onap-portal-properties
+          subPath: openid-connect.properties
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/conf/system.properties"
-          name: portal-system-properties
+          name: onap-portal-properties
+          subPath: system.properties
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/portal.properties"
-          name: portal-portal-properties
+          name: onap-portal-properties
+          subPath: portal.properties
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTAL/WEB-INF/classes/logback.xml"
           name: portal-logback
+          subPath: logback.xml
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/conf/system.properties"
-          name: sdkapp-system-properties
+          name: portal-sdkapp-properties
+          subPath: system.properties
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
-          name: sdkapp-portal-properties
+          name: portal-sdkapp-properties
+          subPath: portal.properties
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
-          name: sdkapp-fusion-properties
+          name: portal-sdkapp-properties
+          subPath: fusion.properties
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
           name: sdkapp-logback
+          subPath: logback.xml
         - mountPath: /portal_root/
           name: portal-root
         - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs"
@@ -89,6 +106,7 @@ spec:
         volumeMounts:
         - mountPath: /usr/share/filebeat/filebeat.yml
           name: filebeat-conf
+          subPath: filebeat.yml
         - mountPath: /var/log/onap
           name: portal-logs2
         - mountPath: /usr/share/filebeat/data
@@ -98,42 +116,29 @@ spec:
           hostPath:
             path: /etc/localtime
         - name: filebeat-conf
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+          configMap:
+            name: portal-filebeat-configmap
         - name: portal-logs2
           emptyDir: {}
         - name: portal-data-filebeat
           emptyDir: {}
-        - name: portal-fusion-properties
-          hostPath:
-            path:  /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/fusion.properties
-        - name: portal-openid-connect-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/openid-connect.properties
-        - name: portal-system-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/system.properties
-        - name: portal-portal-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTAL/portal.properties
+        - name: onap-portal-properties
+          configMap:
+            defaultMode: 0755
+            name: portal-onap-portal-configmap
+        - name: portal-sdkapp-properties
+          configMap:
+            defaultMode: 0755
+            name: portal-onap-portal-sdk-configmap
         - name: portal-logback
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/onapportal/logback.xml
-        - name: sdkapp-system-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/system.properties
-        - name: sdkapp-portal-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/portal.properties
-        - name: sdkapp-fusion-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPPORTALSDK/fusion.properties
+          configMap:
+            name: portal-onapportal-log-configmap
         - name: sdkapp-logback
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/onapportalsdk/logback.xml
+          configMap:
+            name: portal-onapportalsdk-log-configmap
         - name: portal-mariadb-onboarding-sql
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/mariadb/oom_updates.sql
+          configMap:
+            name: portal-mariadb-configmap
         - name: portal-root
           hostPath:
             path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal
diff --git a/kubernetes/portal/templates/portal-logs-configmap.yaml b/kubernetes/portal/templates/portal-logs-configmap.yaml
new file mode 100644 (file)
index 0000000..c5735ba
--- /dev/null
@@ -0,0 +1,26 @@
+#{{ if not .Values.disablePortalPortalapps }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal-filebeat-configmap
+  namespace: {{ .Values.nsPrefix }}-portal
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/filebeat.yml").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal-onapportal-log-configmap
+  namespace: {{ .Values.nsPrefix }}-portal
+data:
+{{ tpl (.Files.Glob "resources/config/log/portal/onapportal/logback.xml").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: portal-onapportalsdk-log-configmap
+  namespace: {{ .Values.nsPrefix }}-portal
+data:
+{{ tpl (.Files.Glob "resources/config/log/portal/onapportalsdk/logback.xml").AsConfig . | indent 2 }}
+#{{ end }}
+
index 6004193..0dd9202 100644 (file)
@@ -31,7 +31,7 @@ spec:
         name: portalapps-readiness
       containers:
       - image: {{ .Values.image.portalwms }}
-        imagePullPolicy: {{ .Values.pullPolicy }} 
+        imagePullPolicy: {{ .Values.pullPolicy }}
         name: portalwidgets
         volumeMounts:
         - mountPath: /etc/localtime
@@ -39,6 +39,7 @@ spec:
           readOnly: true
         - mountPath: /application.properties
           name: portalwidgets-application-properties
+          subPath: application.properties
         ports:
         - containerPort: 8082
         readinessProbe:
@@ -51,8 +52,8 @@ spec:
           hostPath:
             path: /etc/localtime
         - name: portalwidgets-application-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ONAPWIDGETMS/application.properties
+          configMap:
+            name: portal-onapwidgetms-configmap
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
index 6e2e83d..34f5cc4 100644 (file)
@@ -9,5 +9,6 @@ image:
   portalwms: nexus3.onap.org:10001/onap/portal-wms:v1.3.0
   ubuntuDesktop: dorowu/ubuntu-desktop-lxde-vnc
   filebeat: docker.elastic.co/beats/filebeat:5.5.0
+  ubuntuInit: oomk8s/ubuntu-init:1.0.0
 onapPortal:
   webappsDir: "/opt/apache-tomcat-8.0.37/webapps"
diff --git a/kubernetes/sdnc/resources/config/log/filebeat/log4j/filebeat.yml b/kubernetes/sdnc/resources/config/log/filebeat/log4j/filebeat.yml
new file mode 100644 (file)
index 0000000..79c9a08
--- /dev/null
@@ -0,0 +1,49 @@
+filebeat.prospectors:
+#it is mandatory, in our case it's log
+- input_type: log
+  #This is the canolical path as mentioned in logback.xml, *.* means it will monitor all files in the directory.
+  paths:
+    - /var/log/onap/*/*/*/*.log
+    - /var/log/onap/*/*/*.log
+    - /var/log/onap/*/*.log
+
+  # The below commented properties are for time-based rolling policy. But as the log4j 1.2x does not support time-based rolling these properties are not set
+  #Files older than this should be ignored.In our case it will be 48 hours i.e. 2 days. It is a helping flag for clean_inactive
+  #ignore_older: 48h
+  # Remove the registry entry for a file that is more than the specified time. In our case it will be 96 hours, i.e. 4 days. It will help to keep registry records with in limit
+  #clean_inactive: 96h
+
+  #Multiline properties for log4j xml log events
+  multiline.pattern: '</log4j:event>'
+  multiline.negate: true
+  multiline.match: before
+  #multiline.max_lines: 500
+  #multiline.timeout: 5s
+
+# Name of the registry file. If a relative path is used, it is considered relative to the
+# data path. Else full qualified file name.
+#filebeat.registry_file: ${path.data}/registry
+
+
+output.logstash:
+  #List of logstash server ip addresses with port number.
+  #But, in our case, this will be the loadbalancer IP address.
+  #For the below property to work the loadbalancer or logstash should expose 5044 port to listen the filebeat events or port in the property should be changed appropriately.
+  hosts: ["logstash.onap-log:5044"]
+  #If enable will do load balancing among availabe Logstash, automatically.
+  loadbalance: true
+
+  #The list of root certificates for server verifications.
+  #If certificate_authorities is empty or not set, the trusted
+  #certificate authorities of the host system are used.
+  #ssl.certificate_authorities: $ssl.certificate_authorities
+
+  #The path to the certificate for SSL client authentication. If the certificate is not specified,
+  #client authentication is not available.
+  #ssl.certificate: $ssl.certificate
+
+  #The client certificate key used for client authentication.
+  #ssl.key: $ssl.key
+
+  #The passphrase used to decrypt an encrypted key stored in the configured key file
+  #ssl.key_passphrase: $ssl.key_passphrase
diff --git a/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml b/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml
new file mode 100644 (file)
index 0000000..e7cde3b
--- /dev/null
@@ -0,0 +1,9 @@
+#{{ if not .Values.disableSdncSdnc }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: sdnc-conf-configmap
+  namespace: {{ .Values.nsPrefix }}-sdnc
+data:
+{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }}
+#{{ end }}
diff --git a/kubernetes/sdnc/templates/sdnc-log-configmap.yaml b/kubernetes/sdnc/templates/sdnc-log-configmap.yaml
new file mode 100644 (file)
index 0000000..d13daac
--- /dev/null
@@ -0,0 +1,17 @@
+#{{ if not .Values.disableSdncSdnc }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: sdnc-log-configmap
+  namespace: {{ .Values.nsPrefix }}-sdnc
+data:
+{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: sdnc-logging-cfg-configmap
+  namespace: {{ .Values.nsPrefix }}-sdnc
+data:
+{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
+#{{ end }}
index 3ba37af..02950ba 100644 (file)
@@ -56,14 +56,17 @@ spec:
         - mountPath: /etc/localtime
           name: localtime
           readOnly: true
-        - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
-          name: sdnc-aaiclient-properties
         - mountPath: /opt/onap/sdnc/data/properties/admportal.json
-          name: sdnc-admportal-json
+          name: sdnc-conf
+          subPath: admportal.json
+        - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
+          name: sdnc-conf
+          subPath: aaiclient.properties
         - mountPath: /var/log/onap
           name: sdnc-logs
         - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
-          name: sdnc-log-config
+          name: sdnc-logging-cfg-config
+          subPath: org.ops4j.pax.logging.cfg
         ports:
         - containerPort: 8181
         - containerPort: 8101
@@ -80,6 +83,7 @@ spec:
         volumeMounts:
         - mountPath: /usr/share/filebeat/filebeat.yml
           name: filebeat-conf
+          subPath: filebeat.yml
         - mountPath: /var/log/onap
           name: sdnc-logs
         - mountPath: /usr/share/filebeat/data
@@ -89,21 +93,25 @@ spec:
           hostPath:
             path: /etc/localtime
         - name: filebeat-conf
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml
-        - name: sdnc-log-config
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdnc/org.ops4j.pax.logging.cfg
+          configMap:
+            name: sdnc-log-configmap
+        - name: sdnc-logging-cfg-config
+          configMap:
+            name: sdnc-logging-cfg-configmap
         - name: sdnc-logs
           emptyDir: {}
         - name: sdnc-data-filebeat
           emptyDir: {}
-        - name: sdnc-aaiclient-properties
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
-        - name: sdnc-admportal-json
-          hostPath:
-            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/admportal.json
+        - name: sdnc-conf
+          configMap:
+            name: sdnc-conf-configmap
+            items:
+            - key: admportal.json
+              path: admportal.json
+              mode: 0755
+            - key: aaiclient.properties
+              path: aaiclient.properties
+              mode: 0755
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}
index fcd82a4..7e8b59c 100644 (file)
@@ -50,10 +50,8 @@ spec:
         - name: localtime
           mountPath: /etc/localtime
           readOnly: true
-        - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties
-          name: sdnc-aaiclient-properties
-        - mountPath: /opt/onap/sdnc/data/properties/admportal.json
-          name: sdnc-admportal-json
+        - mountPath: /opt/onap/sdnc/data/properties/
+          name: sdnc-conf
         readinessProbe:
           tcpSocket:
             port: 8843
@@ -64,12 +62,9 @@ spec:
       - name: localtime
         hostPath:
           path: /etc/localtime
-      - name: sdnc-aaiclient-properties
-        hostPath:
-          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties
-      - name: sdnc-admportal-json
-        hostPath:
-          path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/admportal.json
+      - name: sdnc-conf
+        configMap:
+          name: sdnc-conf-configmap
       imagePullSecrets:
       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
 #{{ end }}