Skip to content

Commit a5e411c

Browse files
committed
add openmrsdb k8s spec
1 parent aa91039 commit a5e411c

File tree

4 files changed

+96
-10
lines changed

4 files changed

+96
-10
lines changed

Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,6 @@ dependencies:
5050
version: ~1.0.0-0
5151
condition: implementer-interface.enabled
5252

53-
- repository: https://bahmniindiadistro.github.io/helm-charts
53+
- repository: https://bahmni.github.io/helm-charts
5454
name: clinic-config
5555
version: ~1.0.0-0

db/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# openmrsdb.yaml
2+
3+
`db/openmrsdb.yaml` specification is only for local Minikube development. Please refer [Developers Guide](https://bahmni.atlassian.net/wiki/spaces/BAH/pages/3073245197/Bahmni+K8s+with+Minikube+for+Development) for more information.

db/openmrsdb.yaml

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
apiVersion: v1
2+
kind: PersistentVolumeClaim
3+
metadata:
4+
labels:
5+
name: openmrsdbdata-pvc
6+
name: openmrsdbdata-pvc
7+
spec:
8+
storageClassName: standard
9+
accessModes:
10+
- ReadWriteOnce
11+
resources:
12+
requests:
13+
storage: 4Gi
14+
---
15+
apiVersion: v1
16+
kind: PersistentVolume
17+
metadata:
18+
name: openmrsdbdata-pv
19+
spec:
20+
storageClassName: standard
21+
claimRef:
22+
name: openmrsdbdata-pvc
23+
capacity:
24+
storage: 4Gi
25+
accessModes:
26+
- ReadWriteOnce
27+
hostPath:
28+
path: '/mnt/bahmni/openmrsdbdata'
29+
---
30+
apiVersion: apps/v1
31+
kind: Deployment
32+
metadata:
33+
labels:
34+
app: openmrsdb
35+
environment: local
36+
name: openmrsdb
37+
spec:
38+
selector:
39+
matchLabels:
40+
app: openmrsdb
41+
replicas: 1
42+
strategy:
43+
type: Recreate
44+
template:
45+
metadata:
46+
labels:
47+
app: openmrsdb
48+
environment: local
49+
spec:
50+
containers:
51+
- env:
52+
- name: MYSQL_DATABASE
53+
value: openmrs
54+
- name: MYSQL_PASSWORD
55+
value: password
56+
- name: MYSQL_ROOT_PASSWORD
57+
value: root
58+
- name: MYSQL_USER
59+
value: openmrs-user
60+
image: mysql:5.7
61+
name: openmrsdb
62+
ports:
63+
- containerPort: 3306
64+
resources: {}
65+
volumeMounts:
66+
- mountPath: /var/lib/mysql
67+
name: openmrsdbdata
68+
restartPolicy: Always
69+
volumes:
70+
- name: openmrsdbdata
71+
persistentVolumeClaim:
72+
claimName: openmrsdbdata-pvc
73+
---
74+
apiVersion: v1
75+
kind: Service
76+
metadata:
77+
name: openmrsdb
78+
spec:
79+
ports:
80+
- name: '3306'
81+
port: 3306
82+
targetPort: 3306
83+
selector:
84+
app: openmrsdb
85+
environment: local
86+
type: ClusterIP

values/local.yaml

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
global:
2-
postgresql:
3-
auth:
4-
postgresPassword: welcome
5-
61
metadata:
72
labels:
83
environment: local
@@ -17,9 +12,11 @@ openmrs:
1712
secrets:
1813
OMRS_DB_USERNAME: openmrs-user
1914
OMRS_DB_PASSWORD: password
20-
OMRS_DB_HOSTNAME: mysql
15+
OMRS_DB_HOSTNAME: openmrsdb
2116
config:
2217
OMRS_DB_NAME: openmrs
18+
DEBUG: true
19+
OMRS_CREATE_TABLES: true
2320
bahmni-web:
2421
enabled: true
2522
bahmni-lab:
@@ -29,7 +26,7 @@ crater:
2926
config:
3027
APP_URL: http://payments-bahmni.k8s
3128
DB_DATABASE: crater
32-
DB_HOST: mysql
29+
DB_HOST: openmrsdb
3330
DB_PORT: 3306
3431
SANCTUM_STATEFUL_DOMAINS: payments-bahmni.k8s
3532
SESSION_DOMAIN: payments-bahmni.k8s
@@ -50,10 +47,10 @@ reports:
5047
OPENMRS_DB_NAME: openmrs
5148
REPORTS_DB_NAME: reports
5249
secrets:
53-
OPENMRS_DB_HOST: mysql
50+
OPENMRS_DB_HOST: openmrsdb
5451
OPENMRS_DB_USERNAME: openmrs-user
5552
OPENMRS_DB_PASSWORD: password
56-
REPORTS_DB_SERVER: mysql
53+
REPORTS_DB_SERVER: openmrsdb
5754
REPORTS_DB_USERNAME: reports-user
5855
REPORTS_DB_PASSWORD: password
5956
patient-documents:

0 commit comments

Comments
 (0)