added filebeat to all components
[oom.git] / kubernetes / portal / templates / portal-apps-deployment.yaml
index 23a6459..13cf570 100755 (executable)
@@ -2,7 +2,7 @@ apiVersion: extensions/v1beta1
 kind: Deployment
 metadata:
   name: portalapps
-  namespace: {{ .Values.NS }}
+  namespace: "{{ .Values.nsPrefix }}-portal"
 spec:
   selector:
     matchLabels:
@@ -64,32 +64,41 @@ spec:
               command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"]
         name: portalapps
         volumeMounts:
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/fusion/conf/fusion.properties
+        - mountPath: /etc/localtime
+          name: localtime
+          readOnly: true
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/fusion/conf/fusion.properties"
           name: portal-fusion-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/classes/openid-connect.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/classes/openid-connect.properties"
           name: portal-openid-connect-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/conf/system.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/conf/system.properties"
           name: portal-system-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPPORTAL/WEB-INF/classes/portal.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/classes/portal.properties"
           name: portal-portal-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/fusion/conf/fusion.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPPORTAL/WEB-INF/classes/logback.xml"
+          name: portal-logback
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPDBCAPP/WEB-INF/fusion/conf/fusion.properties"
           name: dbcapp-fusion-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/conf/system.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPDBCAPP/WEB-INF/conf/system.properties"
           name: dbcapp-system-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/classes/portal.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPDBCAPP/WEB-INF/classes/portal.properties"
           name: dbcapp-portal-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties"
           name: dbcapp-dbcapp-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPSDKAPP/WEB-INF/conf/system.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPSDKAPP/WEB-INF/conf/system.properties"
           name: sdkapp-system-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPSDKAPP/WEB-INF/classes/portal.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPSDKAPP/WEB-INF/classes/portal.properties"
           name: sdkapp-portal-properties
-        - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPSDKAPP/WEB-INF/fusion/conf/fusion.properties
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/ECOMPSDKAPP/WEB-INF/fusion/conf/fusion.properties"
           name: sdkapp-fusion-properties
         - mountPath: /portal_root/
           name: portal-root
-        - mountPath: /opt/apache-tomcat-8.0.37/logs
+        - mountPath: "{{ .Values.onapPortal.webappsDir }}/logs"
           name: portal-logs
+        - mountPath: /var/log/onap
+          name: portal-logs2
+        - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPSDKAPP/WEB-INF/classes/logback.xml
+          name: portal-logback-be
         ports:
         - containerPort: 8005
         - containerPort: 8009
@@ -99,48 +108,74 @@ spec:
             port: 8080
           initialDelaySeconds: 5
           periodSeconds: 10
+      - image: {{ .Values.image.filebeat }}
+        imagePullPolicy: {{ .Values.pullPolicy }}
+        name: filebeat-onap
+        volumeMounts:
+        - mountPath: /usr/share/filebeat/filebeat.yml
+          name: filebeat-conf
+        - mountPath: /var/log/onap
+          name: portal-logs2
+        - mountPath: /usr/share/filebeat/data
+          name: portal-data-filebeat
       volumes:
+        - name: localtime
+          hostPath:
+            path: /etc/localtime
+        - name: filebeat-conf
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+        - name: portal-logs2
+          emptyDir: {}
+        - name: portal-data-filebeat
+          emptyDir: {}
+        - name: portal-logback-be
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/portal/portal-be/logback.xml
         - name: portal-fusion-properties
           hostPath:
-            path:  /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/fusion.properties
+            path:  /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/fusion.properties
         - name: portal-openid-connect-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/openid-connect.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/openid-connect.properties
         - name: portal-system-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/system.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/system.properties
         - name: portal-portal-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/portal.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/portal.properties
+        - name: portal-logback
+          hostPath:
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/logback.xml
         - name: dbcapp-fusion-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPDBCAPP/fusion.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/fusion.properties
         - name: dbcapp-system-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPDBCAPP/system.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/system.properties
         - name: dbcapp-portal-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPDBCAPP/portal.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/portal.properties
         - name: dbcapp-dbcapp-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPDBCAPP/dbcapp.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPDBCAPP/dbcapp.properties
         - name: sdkapp-system-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPSDKAPP/system.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/system.properties
         - name: sdkapp-portal-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPSDKAPP/portal.properties
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/portal.properties
         - name: sdkapp-fusion-properties
           hostPath:
-            path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPSDKAPP/fusion.properties            
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/portal-fe/webapps/etc/ECOMPSDKAPP/fusion.properties
         - name: portal-mariadb-onboarding-sql
           hostPath:
-            path: /dockerdata-nfs/onap/portal/mariadb/oom_updates.sql
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/mariadb/oom_updates.sql
         - name: portal-root
           hostPath:
-            path: /dockerdata-nfs/onap/portal
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal
         - name: portal-logs
           hostPath:
-            path: /dockerdata-nfs/onap/portal/logs
+            path: /dockerdata-nfs/{{ .Values.nsPrefix }}/portal/logs
       imagePullSecrets:
-      - name: onap-docker-registry-key
+      - name: "{{ .Values.nsPrefix }}-docker-registry-key"