You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by vo...@apache.org on 2021/12/30 10:42:07 UTC
[fineract] branch develop updated: FINERACT-1457: Change Kubernetes set-up to use MariaDB
This is an automated email from the ASF dual-hosted git repository.
vorburger pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git
The following commit(s) were added to refs/heads/develop by this push:
new ccff5d8 FINERACT-1457: Change Kubernetes set-up to use MariaDB
ccff5d8 is described below
commit ccff5d8ad23a3b446846e5e84f973994d022feed
Author: Petri Tuomola <pe...@tuomola.org>
AuthorDate: Thu Dec 30 10:14:17 2021 +0800
FINERACT-1457: Change Kubernetes set-up to use MariaDB
---
kubernetes/fineract-mifoscommunity-deployment.yml | 28 +++++++++++------------
kubernetes/fineract-server-deployment.yml | 2 +-
kubernetes/fineractmysql-deployment.yml | 8 +++----
kubernetes/kubectl-startup.sh | 2 +-
4 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/kubernetes/fineract-mifoscommunity-deployment.yml b/kubernetes/fineract-mifoscommunity-deployment.yml
index 3bf4321..eeb13fc 100644
--- a/kubernetes/fineract-mifoscommunity-deployment.yml
+++ b/kubernetes/fineract-mifoscommunity-deployment.yml
@@ -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
diff --git a/kubernetes/fineract-server-deployment.yml b/kubernetes/fineract-server-deployment.yml
index 0179d89..6b45ab8 100644
--- a/kubernetes/fineract-server-deployment.yml
+++ b/kubernetes/fineract-server-deployment.yml
@@ -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
diff --git a/kubernetes/fineractmysql-deployment.yml b/kubernetes/fineractmysql-deployment.yml
index d44fbbd..81ff40d 100644
--- a/kubernetes/fineractmysql-deployment.yml
+++ b/kubernetes/fineractmysql-deployment.yml
@@ -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
diff --git a/kubernetes/kubectl-startup.sh b/kubernetes/kubectl-startup.sh
index f52306f..8ca9055 100755
--- a/kubernetes/kubectl-startup.sh
+++ b/kubernetes/kubectl-startup.sh
@@ -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