Adding UI to K8s deployment (FINERACT-1419)
This commit is contained in:
committed by
Petri Tuomola
parent
eade76ab25
commit
b53fae870e
+9
-2
@@ -38,10 +38,15 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
target: fineract
|
target: fineract
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", 'sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";' ]
|
||||||
|
timeout: 10s
|
||||||
|
retries: 10
|
||||||
ports:
|
ports:
|
||||||
- 8443:8443
|
- 8443:8443
|
||||||
depends_on:
|
depends_on:
|
||||||
- fineractmysql
|
fineractmysql:
|
||||||
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- DRIVERCLASS_NAME=org.drizzle.jdbc.DrizzleDriver
|
- DRIVERCLASS_NAME=org.drizzle.jdbc.DrizzleDriver
|
||||||
- PROTOCOL=jdbc
|
- PROTOCOL=jdbc
|
||||||
@@ -64,7 +69,9 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 9090:80
|
- 9090:80
|
||||||
|
depends_on:
|
||||||
|
fineract-server:
|
||||||
|
condition: service_healthy
|
||||||
|
|
||||||
# https://issues.apache.org/jira/browse/FINERACT-762
|
# https://issues.apache.org/jira/browse/FINERACT-762
|
||||||
# To use an altnerative JDBC driver (which is faster, but not allowed to be default in Apache distribution)
|
# To use an altnerative JDBC driver (which is faster, but not allowed to be default in Apache distribution)
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you 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: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: fineract-mifoscommunity
|
||||||
|
name: fineract-mifoscommunity
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 80
|
||||||
|
targetPort: 80
|
||||||
|
selector:
|
||||||
|
app: fineract-mifoscommunity
|
||||||
|
tier: frontend
|
||||||
|
type: LoadBalancer
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: fineract-mifoscommunity
|
||||||
|
labels:
|
||||||
|
app: fineract-mifoscommunity
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: fineract-mifoscommunity
|
||||||
|
tier: frontend
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: fineract-mifoscommunity
|
||||||
|
tier: frontend
|
||||||
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: init-myservice
|
||||||
|
image: busybox:1.28
|
||||||
|
command: ['sh', '-c', 'echo -e "Checking for the availability of Fineract server deployment"; while ! nc -z "fineract-server" 8443; do sleep 1; printf "-"; done; echo -e " >> Fineract server has started";']
|
||||||
|
containers:
|
||||||
|
- name: fineract-mifoscommunity
|
||||||
|
image: openmf/community-app:latest
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpu: "1000m"
|
||||||
|
memory: "1Gi"
|
||||||
|
requests:
|
||||||
|
cpu: "200m"
|
||||||
|
memory: "0.5Gi"
|
||||||
|
livenessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /#
|
||||||
|
port: 9090
|
||||||
|
initialDelaySeconds: 90
|
||||||
|
periodSeconds: 1
|
||||||
|
readinessProbe:
|
||||||
|
httpGet:
|
||||||
|
path: /#
|
||||||
|
port: 9090
|
||||||
|
initialDelaySeconds: 90
|
||||||
|
periodSeconds: 1
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: fineract-mifoscommunity
|
||||||
@@ -22,3 +22,4 @@ kubectl delete secret fineract-tenants-db-secret
|
|||||||
kubectl delete -f fineractmysql-configmap.yml
|
kubectl delete -f fineractmysql-configmap.yml
|
||||||
kubectl delete -f fineractmysql-deployment.yml
|
kubectl delete -f fineractmysql-deployment.yml
|
||||||
kubectl delete -f fineract-server-deployment.yml
|
kubectl delete -f fineract-server-deployment.yml
|
||||||
|
kubectl delete -f fineract-mifoscommunity-deployment.yml
|
||||||
|
|||||||
@@ -52,4 +52,19 @@ while [[ ${fineract_server_status} -ne 'Running' ]]; do
|
|||||||
fineract_server_status=$(kubectl get pods ${fineract_server_pod} --no-headers -o custom-columns=":status.phase")
|
fineract_server_status=$(kubectl get pods ${fineract_server_pod} --no-headers -o custom-columns=":status.phase")
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "Fineract server is up and running"
|
echo "Fineract server is up and running"
|
||||||
|
|
||||||
|
echo "Starting Mifos Community UI..."
|
||||||
|
kubectl apply -f fineract-mifoscommunity-deployment.yml
|
||||||
|
|
||||||
|
fineract_mifoscommunity_pod=""
|
||||||
|
while [[ ${#fineract_mifoscommunity_pod} -eq 0 ]]; do
|
||||||
|
fineract_mifoscommunity_pod=$(kubectl get pods -l tier=backend --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}')
|
||||||
|
done
|
||||||
|
|
||||||
|
fineract_mifoscommunity_status=$(kubectl get pods ${fineract_mifoscommunity_pod} --no-headers -o custom-columns=":status.phase")
|
||||||
|
while [[ ${fineract_mifoscommunity_status} -ne 'Running' ]]; do
|
||||||
|
sleep 1
|
||||||
|
fineract_mifoscommunity_status=$(kubectl get pods ${fineract_mifoscommunity_pod} --no-headers -o custom-columns=":status.phase")
|
||||||
|
done
|
||||||
|
echo "Mifos Community UI is up and running"
|
||||||
|
|||||||
Reference in New Issue
Block a user