FINERACT-1457: Change Kubernetes set-up to use MariaDB
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
5efbd04173
commit
ccff5d8ad2
@@ -21,15 +21,15 @@ apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
labels:
|
||||
app: fineract-mifoscommunity
|
||||
name: fineract-mifoscommunity
|
||||
app: mifos-community
|
||||
name: mifos-community
|
||||
spec:
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
port: 9090
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: fineract-mifoscommunity
|
||||
app: mifos-community
|
||||
tier: frontend
|
||||
type: LoadBalancer
|
||||
|
||||
@@ -38,20 +38,20 @@ spec:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: fineract-mifoscommunity
|
||||
name: mifos-community
|
||||
labels:
|
||||
app: fineract-mifoscommunity
|
||||
app: mifos-community
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: fineract-mifoscommunity
|
||||
app: mifos-community
|
||||
tier: frontend
|
||||
strategy:
|
||||
type: Recreate
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: fineract-mifoscommunity
|
||||
app: mifos-community
|
||||
tier: frontend
|
||||
spec:
|
||||
initContainers:
|
||||
@@ -59,7 +59,7 @@ spec:
|
||||
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
|
||||
- name: mifos-community
|
||||
image: openmf/community-app:latest
|
||||
resources:
|
||||
limits:
|
||||
@@ -70,16 +70,16 @@ spec:
|
||||
memory: "0.5Gi"
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /#
|
||||
port: 9090
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 1
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /#
|
||||
port: 9090
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 90
|
||||
periodSeconds: 1
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: fineract-mifoscommunity
|
||||
name: mifos-community
|
||||
|
||||
@@ -88,7 +88,7 @@ spec:
|
||||
- name: SUB_PROTOCOL
|
||||
value: mariadb
|
||||
- name: node_id
|
||||
value: 1
|
||||
value: '1'
|
||||
- name: fineract_tenants_driver
|
||||
value: org.mariadb.jdbc.Driver
|
||||
- name: fineract_tenants_url
|
||||
|
||||
@@ -86,7 +86,7 @@ spec:
|
||||
tier: fineractmysql
|
||||
spec:
|
||||
containers:
|
||||
- image: mysql:5.7
|
||||
- image: mariadb:10.6
|
||||
name: mysql
|
||||
resources:
|
||||
requests:
|
||||
@@ -96,14 +96,14 @@ spec:
|
||||
memory: "5Gi"
|
||||
cpu: "2000m"
|
||||
env:
|
||||
- name: MYSQL_ROOT_PASSWORD
|
||||
- name: MARIADB_ROOT_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: fineract-tenants-db-secret
|
||||
key: password
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MYSQL_ROOT_PASSWORD}"]
|
||||
command: ["sh","-c","mysqladmin ping -h localhost -uroot -p${MARIADB_ROOT_PASSWORD}"]
|
||||
failureThreshold: 10
|
||||
timeoutSeconds: 10
|
||||
readinessProbe:
|
||||
@@ -111,7 +111,7 @@ spec:
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- mysqladmin ping -uroot -p${MYSQL_PASSWORD}
|
||||
- mysqladmin ping -uroot -p${MARIADB_ROOT_PASSWORD}
|
||||
failureThreshold: 10
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#
|
||||
|
||||
echo "Setting Up Fineract service configuration..."
|
||||
kubectl create secret generic fineract-tenants-db-secret --from-literal=username=root --from-literal=password=$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 16)
|
||||
kubectl create secret generic fineract-tenants-db-secret --from-literal=username=root --from-literal=password=$(head /dev/urandom | LC_CTYPE=C tr -dc A-Za-z0-9 | head -c 16)
|
||||
kubectl apply -f fineractmysql-configmap.yml
|
||||
|
||||
echo
|
||||
|
||||
Reference in New Issue
Block a user