Mandeep Khinda | d6ea987 | 2017-06-24 11:49:37 -0400 | [diff] [blame] | 1 | apiVersion: extensions/v1beta1 |
| 2 | kind: Deployment |
| 3 | metadata: |
| 4 | name: portalapps |
| 5 | spec: |
| 6 | selector: |
| 7 | matchLabels: |
| 8 | app: portalapps |
| 9 | template: |
| 10 | metadata: |
| 11 | labels: |
| 12 | app: portalapps |
| 13 | name: portalapps |
| 14 | annotations: |
| 15 | pod.beta.kubernetes.io/init-containers: '[ |
| 16 | { |
| 17 | "args": [ |
| 18 | "--container-name", |
| 19 | "portaldb" |
| 20 | ], |
| 21 | "command": [ |
| 22 | "/root/ready.py" |
| 23 | ], |
| 24 | "env": [ |
| 25 | { |
| 26 | "name": "NAMESPACE", |
| 27 | "valueFrom": { |
| 28 | "fieldRef": { |
| 29 | "apiVersion": "v1", |
| 30 | "fieldPath": "metadata.namespace" |
| 31 | } |
| 32 | } |
| 33 | } |
| 34 | ], |
| 35 | "image": "oomk8s/readiness-check:1.0.0", |
| 36 | "imagePullPolicy": "Always", |
| 37 | "name": "portalapps-readiness" |
| 38 | }, |
| 39 | { |
| 40 | "command": ["/bin/bash", "-c", "if [ ! -e /portal_root/boot.txt ]; then mysql -u root -ppassword -h portaldb < /portal-mysql/Apps_Users_OnBoarding_Script.sql; fi"], |
| 41 | "volumeMounts": [ |
| 42 | { |
| 43 | "mountPath": "/portal-mysql/Apps_Users_OnBoarding_Script.sql", |
| 44 | "name": "portal-mariadb-onboarding-sql" |
| 45 | }, |
| 46 | { |
| 47 | "mountPath": "/portal_root/", |
| 48 | "name": "portal-root" |
| 49 | } |
| 50 | ], |
| 51 | "image": "oomk8s/mariadb-client-init:1.0.0", |
| 52 | "imagePullPolicy": "Always", |
| 53 | "name": "provision-portaldb-users" |
| 54 | } |
| 55 | ]' |
| 56 | spec: |
| 57 | containers: |
| 58 | - image: nexus3.onap.org:10001/openecomp/portalapps:1.0-STAGING-latest |
| 59 | lifecycle: |
| 60 | postStart: |
| 61 | exec: |
| 62 | command: ["/bin/sh", "-c", "echo yes > /portal_root/boot.txt"] |
| 63 | name: portalapps |
| 64 | volumeMounts: |
| 65 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPPORTALAPP/WEB-INF/fusion/conf/fusion.properties |
| 66 | name: portal-fusion-properties |
| 67 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPPORTALAPP/WEB-INF/classes/openid-connect.properties |
| 68 | name: portal-openid-connect-properties |
| 69 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPPORTALAPP/WEB-INF/conf/system.properties |
| 70 | name: portal-system-properties |
| 71 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPPORTALAPP/WEB-INF/classes/portal.properties |
| 72 | name: portal-portal-properties |
| 73 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPDBCAPP/WEB-INF/fusion/fusion.properties |
| 74 | name: dbcapp-fusion-properties |
| 75 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPDBCAPP/WEB-INF/conf/system.properties |
| 76 | name: dbcapp-system-properties |
| 77 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPDBCAPP/WEB-INF/classes/portal.properties |
| 78 | name: dbcapp-portal-properties |
| 79 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties |
| 80 | name: dbcapp-dbcapp-properties |
| 81 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPSDKAPP/WEB-INF/conf/system.properties |
| 82 | name: sdkapp-system-properties |
| 83 | - mountPath: /PROJECT/APPS/ECOMPPORTAL/ECOMPSDKAPP/WEB-INF/classes/portal.properties |
| 84 | name: sdkapp-portal-properties |
| 85 | - mountPath: /portal_root/ |
| 86 | name: portal-root |
| 87 | ports: |
| 88 | - containerPort: 8005 |
| 89 | - containerPort: 8009 |
| 90 | - containerPort: 8080 |
| 91 | readinessProbe: |
| 92 | tcpSocket: |
| 93 | port: 8080 |
| 94 | initialDelaySeconds: 5 |
| 95 | periodSeconds: 10 |
| 96 | volumes: |
| 97 | - name: portal-fusion-properties |
| 98 | hostPath: |
| 99 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/fusion.properties |
| 100 | - name: portal-openid-connect-properties |
| 101 | hostPath: |
| 102 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/openid-connect.properties |
| 103 | - name: portal-system-properties |
| 104 | hostPath: |
| 105 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/system.properties |
| 106 | - name: portal-portal-properties |
| 107 | hostPath: |
| 108 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPPORTALAPP/portal.properties |
| 109 | - name: dbcapp-fusion-properties |
| 110 | hostPath: |
| 111 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPDBCAPP/fusion.properties |
| 112 | - name: dbcapp-system-properties |
| 113 | hostPath: |
| 114 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPDBCAPP/system.properties |
| 115 | - name: dbcapp-portal-properties |
| 116 | hostPath: |
| 117 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPDBCAPP/portal.properties |
| 118 | - name: dbcapp-dbcapp-properties |
| 119 | hostPath: |
| 120 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPDBCAPP/dbcapp.properties |
| 121 | - name: sdkapp-system-properties |
| 122 | hostPath: |
| 123 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPSDKAPP/system.properties |
| 124 | - name: sdkapp-portal-properties |
| 125 | hostPath: |
| 126 | path: /dockerdata-nfs/onapdemo/portal/portal-fe/webapps/etc/ECOMPSDKAPP/portal.properties |
| 127 | - name: portal-mariadb-onboarding-sql |
| 128 | hostPath: |
| 129 | path: /dockerdata-nfs/onapdemo/portal/mariadb/Apps_Users_OnBoarding_Script.sql |
| 130 | - name: portal-root |
| 131 | hostPath: |
| 132 | path: /dockerdata-nfs/onapdemo/portal |