summaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/portal/templates')
-rw-r--r--kubernetes/portal/templates/all-services.yaml75
-rwxr-xr-xkubernetes/portal/templates/portal-apps-deployment.yaml146
-rwxr-xr-xkubernetes/portal/templates/portal-mariadb-deployment.yaml41
-rw-r--r--kubernetes/portal/templates/portal-vnc-dep.yaml133
-rw-r--r--kubernetes/portal/templates/portal-widgets-deployment.yaml59
5 files changed, 454 insertions, 0 deletions
diff --git a/kubernetes/portal/templates/all-services.yaml b/kubernetes/portal/templates/all-services.yaml
new file mode 100644
index 0000000000..488fb8045c
--- /dev/null
+++ b/kubernetes/portal/templates/all-services.yaml
@@ -0,0 +1,75 @@
+apiVersion: v1
+kind: Service
+metadata:
+ name: portaldb
+ namespace: {{ .Values.NS }}
+ labels:
+ app: portaldb
+spec:
+ ports:
+ - name: portaldb
+ port: 3306
+ selector:
+ app: portaldb
+ clusterIP: None
+---
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: portalapps
+ name: portalapps
+ namespace: {{ .Values.NS }}
+spec:
+ ports:
+ - name: portal-1
+ nodePort: 30213
+ port: 8006
+ targetPort: 8005
+ - name: portal-2
+ nodePort: 30214
+ port: 8010
+ targetPort: 8009
+ - name: portal-3
+ nodePort: 30215
+ port: 8989
+ targetPort: 8080
+ selector:
+ app: portalapps
+ type: NodePort
+---
+apiVersion: v1
+kind: Service
+metadata:
+ labels:
+ app: vnc-portal
+ name: vnc-portal
+ namespace: {{ .Values.NS }}
+spec:
+ ports:
+ - name: tcp-1
+ port: 6080
+ targetPort: 80
+ nodePort: 30211
+ - name: tcp-2
+ port: 5900
+ targetPort: 5900
+ nodePort: 30212
+ selector:
+ app: vnc-portal
+ type: NodePort
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: portalwidgets
+ namespace: {{ .Values.NS }}
+ labels:
+ app: portalwidgets
+spec:
+ ports:
+ - name: portalwidgets
+ port: 8082
+ selector:
+ app: portalwidgets
+ clusterIP: None
diff --git a/kubernetes/portal/templates/portal-apps-deployment.yaml b/kubernetes/portal/templates/portal-apps-deployment.yaml
new file mode 100755
index 0000000000..23a645910a
--- /dev/null
+++ b/kubernetes/portal/templates/portal-apps-deployment.yaml
@@ -0,0 +1,146 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: portalapps
+ namespace: {{ .Values.NS }}
+spec:
+ selector:
+ matchLabels:
+ app: portalapps
+ template:
+ metadata:
+ labels:
+ app: portalapps
+ name: portalapps
+ annotations:
+ pod.beta.kubernetes.io/init-containers: '[
+ {
+ "args": [
+ "--container-name",
+ "portaldb"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "apiVersion": "v1",
+ "fieldPath": "metadata.namespace"
+ }
+ }
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "portalapps-readiness"
+ },
+ {
+ "command": ["/bin/bash", "-c", "if [ ! -e /portal_root/boot.txt ]; then mysql -u root -ppassword -h portaldb < /portal-mysql/oom_updates.sql; fi"],
+ "volumeMounts": [
+ {
+ "mountPath": "/portal-mysql/oom_updates.sql",
+ "name": "portal-mariadb-onboarding-sql"
+ },
+ {
+ "mountPath": "/portal_root/",
+ "name": "portal-root"
+ }
+ ],
+ "image": "{{ .Values.image.mariadbClient }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "provision-portaldb-users"
+ }
+ ]'
+ spec:
+ containers:
+ - image: {{ .Values.image.portalapps }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ lifecycle:
+ postStart:
+ exec:
+ 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
+ name: portal-fusion-properties
+ - mountPath: /opt/apache-tomcat-8.0.37/webapps/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
+ name: portal-system-properties
+ - mountPath: /opt/apache-tomcat-8.0.37/webapps/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
+ name: dbcapp-fusion-properties
+ - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/conf/system.properties
+ name: dbcapp-system-properties
+ - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/classes/portal.properties
+ name: dbcapp-portal-properties
+ - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPDBCAPP/WEB-INF/dbcapp/dbcapp.properties
+ name: dbcapp-dbcapp-properties
+ - mountPath: /opt/apache-tomcat-8.0.37/webapps/ECOMPSDKAPP/WEB-INF/conf/system.properties
+ name: sdkapp-system-properties
+ - mountPath: /opt/apache-tomcat-8.0.37/webapps/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
+ name: sdkapp-fusion-properties
+ - mountPath: /portal_root/
+ name: portal-root
+ - mountPath: /opt/apache-tomcat-8.0.37/logs
+ name: portal-logs
+ ports:
+ - containerPort: 8005
+ - containerPort: 8009
+ - containerPort: 8080
+ readinessProbe:
+ tcpSocket:
+ port: 8080
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ volumes:
+ - name: portal-fusion-properties
+ hostPath:
+ path: /dockerdata-nfs/onap/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
+ - name: portal-system-properties
+ hostPath:
+ path: /dockerdata-nfs/onap/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
+ - name: dbcapp-fusion-properties
+ hostPath:
+ path: /dockerdata-nfs/onap/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
+ - name: dbcapp-portal-properties
+ hostPath:
+ path: /dockerdata-nfs/onap/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
+ - name: sdkapp-system-properties
+ hostPath:
+ path: /dockerdata-nfs/onap/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
+ - name: sdkapp-fusion-properties
+ hostPath:
+ path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPSDKAPP/fusion.properties
+ - name: portal-mariadb-onboarding-sql
+ hostPath:
+ path: /dockerdata-nfs/onap/portal/mariadb/oom_updates.sql
+ - name: portal-root
+ hostPath:
+ path: /dockerdata-nfs/onap/portal
+ - name: portal-logs
+ hostPath:
+ path: /dockerdata-nfs/onap/portal/logs
+ imagePullSecrets:
+ - name: onap-docker-registry-key
diff --git a/kubernetes/portal/templates/portal-mariadb-deployment.yaml b/kubernetes/portal/templates/portal-mariadb-deployment.yaml
new file mode 100755
index 0000000000..cf8bbd68e0
--- /dev/null
+++ b/kubernetes/portal/templates/portal-mariadb-deployment.yaml
@@ -0,0 +1,41 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: portaldb
+ namespace: {{ .Values.NS }}
+spec:
+ selector:
+ matchLabels:
+ app: portaldb
+ template:
+ metadata:
+ labels:
+ app: portaldb
+ name: portaldb
+ spec:
+ containers:
+ - image: {{ .Values.image.portaldb}}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: "portaldb"
+ env:
+ - name: MYSQL_HOST
+ value: portaldb.onap-portal
+ - name: MYSQL_ROOT_PASSWORD
+ value: password
+ volumeMounts:
+ - mountPath: /var/lib/mysql
+ name: portal-mariadb-data
+ ports:
+ - containerPort: 3306
+ name: portaldb
+ readinessProbe:
+ tcpSocket:
+ port: 3306
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ volumes:
+ - name: portal-mariadb-data
+ hostPath:
+ path: /dockerdata-nfs/onap/portal/mariadb/data
+ imagePullSecrets:
+ - name: onap-docker-registry-key
diff --git a/kubernetes/portal/templates/portal-vnc-dep.yaml b/kubernetes/portal/templates/portal-vnc-dep.yaml
new file mode 100644
index 0000000000..e4a8574458
--- /dev/null
+++ b/kubernetes/portal/templates/portal-vnc-dep.yaml
@@ -0,0 +1,133 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ labels:
+ app: vnc-portal
+ name: vnc-portal
+ namespace: {{ .Values.NS }}
+spec:
+ selector:
+ matchLabels:
+ app: vnc-portal
+ template:
+ metadata:
+ labels:
+ app: vnc-portal
+ name: vnc-portal
+ annotations:
+ pod.beta.kubernetes.io/init-containers: '[
+ {
+ "args": [
+ "--container-name",
+ "portalapps"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "apiVersion": "v1",
+ "fieldPath": "metadata.namespace"
+ }
+ }
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-portal-readiness"
+ },
+ {
+ "args": [
+ "--container-name",
+ "pap"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "value": "onap-policy"
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-pap-readiness"
+ },
+ {
+ "args": [
+ "--container-name",
+ "sdc-fe"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "value": "onap-sdc"
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-sdc-readiness"
+ },
+ {
+ "args": [
+ "--container-name",
+ "vid-server"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "value": "onap-vid"
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-vid-readiness"
+ },
+ {
+ "command": ["/bin/sh","-c"],
+ "args": ["echo `host sdc-be.onap-sdc | awk ''{print$4}''` sdc.api.be.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host portalapps.onap-portal | awk ''{print$4}''` portal.api.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host pap.onap-policy | awk ''{print$4}''` policy.api.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host sdc-fe.onap-sdc | awk ''{print$4}''` sdc.ui.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host vid-server.onap-vid | awk ''{print$4}''` vid.api.simpledemo.openecomp.org >> /ubuntu-init/hosts; echo `host sparky-fe.onap-aai | awk ''{print$4}''` aai.api.simpledemo.openecomp.org >> /ubuntu-init/hosts"],
+ "image": "{{ .Values.image.ubuntuInit }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "vnc-init-hosts",
+ "volumeMounts": [
+ {
+ "name": "ubuntu-init",
+ "mountPath": "/ubuntu-init/"
+ }
+ ]
+ }
+ ]'
+ spec:
+ containers:
+ - image: {{ .Values.image.ubuntuDesktop }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ lifecycle:
+ postStart:
+ exec:
+ command: ["/bin/sh", "-c", "cat /ubuntu-init/hosts >> /etc/hosts"]
+ env:
+ - name: VNC_PASSWORD
+ value: password
+ imagePullPolicy: IfNotPresent
+ name: vnc-portal
+ volumeMounts:
+ - mountPath: /ubuntu-init/
+ name: ubuntu-init
+ securityContext:
+ privileged: true
+ securityContext: {}
+ volumes:
+ - name: ubuntu-init
+ emptyDir: {}
+ imagePullSecrets:
+ - name: onap-docker-registry-key
diff --git a/kubernetes/portal/templates/portal-widgets-deployment.yaml b/kubernetes/portal/templates/portal-widgets-deployment.yaml
new file mode 100644
index 0000000000..0aea75648c
--- /dev/null
+++ b/kubernetes/portal/templates/portal-widgets-deployment.yaml
@@ -0,0 +1,59 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: portalwidgets
+ namespace: {{ .Values.NS }}
+spec:
+ selector:
+ matchLabels:
+ app: portalwidgets
+ template:
+ metadata:
+ labels:
+ app: portalwidgets
+ name: portalwidgets
+ annotations:
+ pod.beta.kubernetes.io/init-containers: '[
+ {
+ "args": [
+ "--container-name",
+ "portaldb"
+ ],
+ "command": [
+ "/root/ready.py"
+ ],
+ "env": [
+ {
+ "name": "NAMESPACE",
+ "valueFrom": {
+ "fieldRef": {
+ "apiVersion": "v1",
+ "fieldPath": "metadata.namespace"
+ }
+ }
+ }
+ ],
+ "image": "{{ .Values.image.readiness }}",
+ "imagePullPolicy": "{{ .Values.pullPolicy }}",
+ "name": "portalapps-readiness"
+ }
+ ]'
+ spec:
+ containers:
+ - image: {{ .Values.image.portalwms }}
+ imagePullPolicy: {{ .Values.pullPolicy }}
+ name: portalwidgets
+ volumeMounts:
+ - mountPath: /application.properties
+ name: portalwidgets-application-properties
+ ports:
+ - containerPort: 8082
+ readinessProbe:
+ tcpSocket:
+ port: 8082
+ initialDelaySeconds: 5
+ periodSeconds: 10
+ volumes:
+ - name: portalwidgets-application-properties
+ hostPath:
+ path: /dockerdata-nfs/onap/portal/portal-fe/webapps/etc/ECOMPWIDGETMS/application.properties