FINERACT-783

- Update README.md with instructions for kubernetes
 - Setup fineractmysql configuration file
 - Setup fineract-server configuration file
closes https://issues.apache.org/jira/browse/FINERACT-783
This commit is contained in:
xurror
2020-04-12 11:06:38 +02:00
committed by Michael Vorburger ⛑️
parent beee2e5330
commit 472f5b6280
4 changed files with 244 additions and 0 deletions
+76
View File
@@ -0,0 +1,76 @@
# 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-server
name: fineract-server
spec:
ports:
- protocol: TCP
port: 8443
targetPort: 8443
selector:
app: fineract-server
tier: backend
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: fineract-server
labels:
app: fineract-server
spec:
selector:
matchLabels:
app: fineract-server
tier: backend
strategy:
type: Recreate
template:
metadata:
labels:
app: fineract-server
tier: backend
spec:
containers:
- name: fineract-server
image: apache/fineract:latest
env:
- name: JAVA_OPTS
value: -Dfineract_tenants_url=jdbc:mysql:thin://fineractmysql:3306/fineract_tenants -Dfineract_tenants_driver=org.drizzle.jdbc.DrizzleDriver -Dfineract_tenants_uid=root -Dfineract_tenants_pwd=skdcnwauicn2ucnaecasdsajdnizucawencascdca -Djava.awt.headless=true -XX:+UseG1GC -Dfile.encoding=UTF-8
- name: FINERACT_DEFAULT_TENANTDB_HOSTNAME
value: fineractmysql
- name: FINERACT_DEFAULT_TENANTDB_PORT
value: '3306'
- name: FINERACT_DEFAULT_TENANTDB_UID
valueFrom:
secretKeyRef:
name: fineract-tenants-db-secret
key: username
- name: FINERACT_DEFAULT_TENANTDB_PWD
valueFrom:
secretKeyRef:
name: fineract-tenants-db-secret
key: password
ports:
- containerPort: 8443
name: fineract-server
+113
View File
@@ -0,0 +1,113 @@
# 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: PersistentVolume
metadata:
name: fineractmysql-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/data"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: fineractmysql-pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteMany
resources:
requests:
storage: 5Gi
---
apiVersion: v1
kind: Service
metadata:
labels:
app: fineract-server
name: fineractmysql
spec:
ports:
- protocol: TCP
port: 3306
targetPort: 3306
selector:
app: fineract-server
tier: fineractmysql
clusterIP: None
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: fineract-server
name: fineractmysql
spec:
selector:
matchLabels:
app: fineract-server
tier: fineractmysql
strategy:
type: Recreate
template:
metadata:
labels:
app: fineract-server
tier: fineractmysql
spec:
containers:
- image: mysql:5.7
name: mysql
env:
- name: MYSQL_ROOT_PASSWORD
valueFrom:
secretKeyRef:
name: fineract-tenants-db-secret
key: password
livenessProbe:
exec:
command:
- mysqladmin
- ping
- -h
- localhost
failureThreshold: 10
timeoutSeconds: 10
ports:
- containerPort: 3306
name: fineractmysql
volumeMounts:
- name: fineractmysql-persistent-storage
mountPath: /var/lib/mysql/
- name: fineractmysql-host-path
mountPath: /docker-entrypoint-initdb.d/
volumes:
- name: fineractmysql-persistent-storage
persistentVolumeClaim:
claimName: fineractmysql-pv-claim
- name: fineractmysql-host-path
hostPath:
path: /fineract-db
+26
View File
@@ -0,0 +1,26 @@
# 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: Secret
metadata:
name: fineract-tenants-db-secret
type: Opaque
stringData:
username: root
password: skdcnwauicn2ucnaecasdsajdnizucawencascdca