Skip to content
Permalink
Browse files
Implement kubernetes scripts for remaining fineract cn services
  • Loading branch information
Anh3h committed Dec 2, 2019
1 parent ed12080 commit ca210eba58b301369056392ad3a6e7658bb8ba94
Show file tree
Hide file tree
Showing 15 changed files with 889 additions and 18 deletions.
@@ -20,7 +20,7 @@ function init-variables {
CUSTOMER_URL="http://customer-ms:2024/customer/v1"
ACCOUNTING_URL="http://accounting-ms:2025/accounting/v1"
PORTFOLIO_URL="http://portfolio-ms:2026/portfolio/v1"
DEPOSIT_URL="http://deposit-account-management-ms:2027/deposit/v1"
DEPOSIT_URL="http://deposit-ms:2027/deposit/v1"
TELLER_URL="http://teller-ms:2028/teller/v1"
REPORT_URL="http://reporting-ms:2029/report/v1"
CHEQUES_URL="http://cheques-ms:2030/cheques/v1"
@@ -393,7 +393,7 @@ create-application "$PAYROLL_MS_NAME" "" "$MS_VENDOR" "$PAYROLL_URL"
create-application "$GROUP_MS_NAME" "" "$MS_VENDOR" "$GROUP_URL"
create-application "$NOTIFICATIONS_MS_NAME" "" "$MS_VENDOR" "$NOTIFICATIONS_URL"

# # Set tenant identifier
# Set tenant identifier
TENANT=$1
create-tenant ${TENANT} "${TENANT}" "All in one Demo Server" ${TENANT}
assign-identity-ms ${TENANT}
@@ -419,7 +419,7 @@ set-application-permission-enabled-for-user ${TENANT} $RHYTHM_MS_NAME "identity_
provision-app ${TENANT} $ACCOUNTING_MS_NAME
provision-app ${TENANT} $PORTFOLIO_MS_NAME
echo "Waiting for Portfolio to provision."
sleep 45s
sleep 60s
set-application-permission-enabled-for-user ${TENANT} $RHYTHM_MS_NAME "portfolio__v1__khepri" "imhotep"
provision-app ${TENANT} $DEPOSIT_MS_NAME
provision-app ${TENANT} $TELLER_MS_NAME
@@ -0,0 +1,78 @@
apiVersion: v1
kind: Service
metadata:
name: accounting-service
namespace: default
spec:
selector:
app: accounting-ms
ports:
- port: 2025
targetPort: 2025
type: LoadBalancer

---

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: accounting-ms-cluster
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: accounting-ms
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: accounting-ms
spec:
containers:
- name: fineract-cn-accounting
image: apache/fineract-cn-accounting:latest
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: external-tools-config
- configMapRef:
name: fineract-service-config
env:
- name: eureka.instance.hostname
value: accounting-ms
- name: server.port
value: "2025"
- name: spring.application.name
value: accounting-v1
- name: system.publicKey.modulus
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_MODULUS
name: secret-config
- name: system.publicKey.exponent
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_EXPONENT
name: secret-config
- name: system.publicKey.timestamp
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_TIMESTAMP
name: secret-config
- name: system.privateKey.modulus
valueFrom:
configMapKeyRef:
key: PRIVATE_KEY_MODULUS
name: secret-config
- name: system.privateKey.exponent
valueFrom:
configMapKeyRef:
key: PRIVATE_KEY_EXPONENT
name: secret-config
ports:
- containerPort: 2025
@@ -0,0 +1,78 @@
apiVersion: v1
kind: Service
metadata:
name: cheques-service
namespace: default
spec:
selector:
app: cheques-ms
ports:
- port: 2030
targetPort: 2030
type: LoadBalancer

---

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: cheques-ms-cluster
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: cheques-ms
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: cheques-ms
spec:
containers:
- name: cheques-ms
image: apache/fineract-cn-cheques:latest
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: external-tools-config
- configMapRef:
name: fineract-service-config
env:
- name: eureka.instance.hostname
value: cheques-ms
- name: server.port
value: "2030"
- name: spring.application.name
value: cheques-v1
- name: system.publicKey.modulus
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_MODULUS
name: secret-config
- name: system.publicKey.exponent
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_EXPONENT
name: secret-config
- name: system.publicKey.timestamp
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_TIMESTAMP
name: secret-config
- name: system.privateKey.modulus
valueFrom:
configMapKeyRef:
key: PRIVATE_KEY_MODULUS
name: secret-config
- name: system.privateKey.exponent
valueFrom:
configMapKeyRef:
key: PRIVATE_KEY_EXPONENT
name: secret-config
ports:
- containerPort: 2030
@@ -24,9 +24,4 @@ data:
ribbon.eureka.enabled: "true"
server.max-http-header-size: "16384"
spring.cloud.config.enabled: "false"
spring.cloud.discovery.enabled: "true"
system.privateKey.exponent: ${PRIVATE_KEY_EXPONENT}
system.privateKey.modulus: ${PRIVATE_KEY_MODULUS}
system.publicKey.exponent: ${PUBLIC_KEY_EXPONENT}
system.publicKey.modulus: ${PUBLIC_KEY_MODULUS}
system.publicKey.timestamp: ${PUBLIC_KEY_TIMESTAMP}
spring.cloud.discovery.enabled: "true"
@@ -0,0 +1,78 @@
apiVersion: v1
kind: Service
metadata:
name: customer-service
namespace: default
spec:
selector:
app: customer-ms
ports:
- port: 2024
targetPort: 2024
type: LoadBalancer

---

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: customer-ms-cluster
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: customer-ms
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: customer-ms
spec:
containers:
- name: customer-ms
image: apache/fineract-cn-customer:latest
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: external-tools-config
- configMapRef:
name: fineract-service-config
env:
- name: eureka.instance.hostname
value: customer-ms
- name: server.port
value: "2024"
- name: spring.application.name
value: customer-v1
- name: system.publicKey.modulus
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_MODULUS
name: secret-config
- name: system.publicKey.exponent
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_EXPONENT
name: secret-config
- name: system.publicKey.timestamp
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_TIMESTAMP
name: secret-config
- name: system.privateKey.modulus
valueFrom:
configMapKeyRef:
key: PRIVATE_KEY_MODULUS
name: secret-config
- name: system.privateKey.exponent
valueFrom:
configMapKeyRef:
key: PRIVATE_KEY_EXPONENT
name: secret-config
ports:
- containerPort: 2024
@@ -0,0 +1,78 @@
apiVersion: v1
kind: Service
metadata:
name: deposit-service
namespace: default
spec:
selector:
app: deposit-ms
ports:
- port: 2027
targetPort: 2027
type: LoadBalancer

---

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: deposit-ms-cluster
namespace: default
spec:
replicas: 1
selector:
matchLabels:
app: deposit-ms
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
labels:
app: deposit-ms
spec:
containers:
- name: deposit-ms
image: apache/fineract-cn-deposit-account-management:latest
imagePullPolicy: IfNotPresent
envFrom:
- configMapRef:
name: external-tools-config
- configMapRef:
name: fineract-service-config
env:
- name: eureka.instance.hostname
value: deposit-ms
- name: server.port
value: "2027"
- name: spring.application.name
value: deposit-v1
- name: system.publicKey.modulus
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_MODULUS
name: secret-config
- name: system.publicKey.exponent
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_EXPONENT
name: secret-config
- name: system.publicKey.timestamp
valueFrom:
configMapKeyRef:
key: PUBLIC_KEY_TIMESTAMP
name: secret-config
- name: system.privateKey.modulus
valueFrom:
configMapKeyRef:
key: PRIVATE_KEY_MODULUS
name: secret-config
- name: system.privateKey.exponent
valueFrom:
configMapKeyRef:
key: PRIVATE_KEY_EXPONENT
name: secret-config
ports:
- containerPort: 2027

0 comments on commit ca210eb

Please sign in to comment.