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
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: fineract-mifoscommunity
|
app: mifos-community
|
||||||
name: fineract-mifoscommunity
|
name: mifos-community
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 9090
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
selector:
|
selector:
|
||||||
app: fineract-mifoscommunity
|
app: mifos-community
|
||||||
tier: frontend
|
tier: frontend
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
|
|
||||||
@@ -38,20 +38,20 @@ spec:
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: fineract-mifoscommunity
|
name: mifos-community
|
||||||
labels:
|
labels:
|
||||||
app: fineract-mifoscommunity
|
app: mifos-community
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: fineract-mifoscommunity
|
app: mifos-community
|
||||||
tier: frontend
|
tier: frontend
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: fineract-mifoscommunity
|
app: mifos-community
|
||||||
tier: frontend
|
tier: frontend
|
||||||
spec:
|
spec:
|
||||||
initContainers:
|
initContainers:
|
||||||
@@ -59,7 +59,7 @@ spec:
|
|||||||
image: busybox:1.28
|
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";']
|
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:
|
containers:
|
||||||
- name: fineract-mifoscommunity
|
- name: mifos-community
|
||||||
image: openmf/community-app:latest
|
image: openmf/community-app:latest
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
@@ -70,16 +70,16 @@ spec:
|
|||||||
memory: "0.5Gi"
|
memory: "0.5Gi"
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /#
|
path: /
|
||||||
port: 9090
|
port: 80
|
||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 1
|
periodSeconds: 1
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /#
|
path: /
|
||||||
port: 9090
|
port: 80
|
||||||
initialDelaySeconds: 90
|
initialDelaySeconds: 90
|
||||||
periodSeconds: 1
|
periodSeconds: 1
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
name: fineract-mifoscommunity
|
name: mifos-community
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ spec:
|
|||||||
- name: SUB_PROTOCOL
|
- name: SUB_PROTOCOL
|
||||||
value: mariadb
|
value: mariadb
|
||||||
- name: node_id
|
- name: node_id
|
||||||
value: 1
|
value: '1'
|
||||||
- name: fineract_tenants_driver
|
- name: fineract_tenants_driver
|
||||||
value: org.mariadb.jdbc.Driver
|
value: org.mariadb.jdbc.Driver
|
||||||
- name: fineract_tenants_url
|
- name: fineract_tenants_url
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ spec:
|
|||||||
tier: fineractmysql
|
tier: fineractmysql
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: mysql:5.7
|
- image: mariadb:10.6
|
||||||
name: mysql
|
name: mysql
|
||||||
resources:
|
resources:
|
||||||
requests:
|
requests:
|
||||||
@@ -96,14 +96,14 @@ spec:
|
|||||||
memory: "5Gi"
|
memory: "5Gi"
|
||||||
cpu: "2000m"
|
cpu: "2000m"
|
||||||
env:
|
env:
|
||||||
- name: MYSQL_ROOT_PASSWORD
|
- name: MARIADB_ROOT_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
name: fineract-tenants-db-secret
|
name: fineract-tenants-db-secret
|
||||||
key: password
|
key: password
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
exec:
|
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
|
failureThreshold: 10
|
||||||
timeoutSeconds: 10
|
timeoutSeconds: 10
|
||||||
readinessProbe:
|
readinessProbe:
|
||||||
@@ -111,7 +111,7 @@ spec:
|
|||||||
command:
|
command:
|
||||||
- sh
|
- sh
|
||||||
- -c
|
- -c
|
||||||
- mysqladmin ping -uroot -p${MYSQL_PASSWORD}
|
- mysqladmin ping -uroot -p${MARIADB_ROOT_PASSWORD}
|
||||||
failureThreshold: 10
|
failureThreshold: 10
|
||||||
initialDelaySeconds: 5
|
initialDelaySeconds: 5
|
||||||
periodSeconds: 5
|
periodSeconds: 5
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
echo "Setting Up Fineract service configuration..."
|
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
|
kubectl apply -f fineractmysql-configmap.yml
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
Reference in New Issue
Block a user