Skip to content

Commit

Permalink
add openmrsdb k8s spec
Browse files Browse the repository at this point in the history
  • Loading branch information
N0-man committed Dec 8, 2022
1 parent aa91039 commit a5e411c
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ dependencies:
version: ~1.0.0-0
condition: implementer-interface.enabled

- repository: https://bahmniindiadistro.github.io/helm-charts
- repository: https://bahmni.github.io/helm-charts
name: clinic-config
version: ~1.0.0-0
3 changes: 3 additions & 0 deletions db/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# openmrsdb.yaml

`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.
86 changes: 86 additions & 0 deletions db/openmrsdb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
name: openmrsdbdata-pvc
name: openmrsdbdata-pvc
spec:
storageClassName: standard
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 4Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: openmrsdbdata-pv
spec:
storageClassName: standard
claimRef:
name: openmrsdbdata-pvc
capacity:
storage: 4Gi
accessModes:
- ReadWriteOnce
hostPath:
path: '/mnt/bahmni/openmrsdbdata'
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: openmrsdb
environment: local
name: openmrsdb
spec:
selector:
matchLabels:
app: openmrsdb
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: openmrsdb
environment: local
spec:
containers:
- env:
- name: MYSQL_DATABASE
value: openmrs
- name: MYSQL_PASSWORD
value: password
- name: MYSQL_ROOT_PASSWORD
value: root
- name: MYSQL_USER
value: openmrs-user
image: mysql:5.7
name: openmrsdb
ports:
- containerPort: 3306
resources: {}
volumeMounts:
- mountPath: /var/lib/mysql
name: openmrsdbdata
restartPolicy: Always
volumes:
- name: openmrsdbdata
persistentVolumeClaim:
claimName: openmrsdbdata-pvc
---
apiVersion: v1
kind: Service
metadata:
name: openmrsdb
spec:
ports:
- name: '3306'
port: 3306
targetPort: 3306
selector:
app: openmrsdb
environment: local
type: ClusterIP
15 changes: 6 additions & 9 deletions values/local.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
global:
postgresql:
auth:
postgresPassword: welcome

metadata:
labels:
environment: local
Expand All @@ -17,9 +12,11 @@ openmrs:
secrets:
OMRS_DB_USERNAME: openmrs-user
OMRS_DB_PASSWORD: password
OMRS_DB_HOSTNAME: mysql
OMRS_DB_HOSTNAME: openmrsdb
config:
OMRS_DB_NAME: openmrs
DEBUG: true
OMRS_CREATE_TABLES: true
bahmni-web:
enabled: true
bahmni-lab:
Expand All @@ -29,7 +26,7 @@ crater:
config:
APP_URL: http://payments-bahmni.k8s
DB_DATABASE: crater
DB_HOST: mysql
DB_HOST: openmrsdb
DB_PORT: 3306
SANCTUM_STATEFUL_DOMAINS: payments-bahmni.k8s
SESSION_DOMAIN: payments-bahmni.k8s
Expand All @@ -50,10 +47,10 @@ reports:
OPENMRS_DB_NAME: openmrs
REPORTS_DB_NAME: reports
secrets:
OPENMRS_DB_HOST: mysql
OPENMRS_DB_HOST: openmrsdb
OPENMRS_DB_USERNAME: openmrs-user
OPENMRS_DB_PASSWORD: password
REPORTS_DB_SERVER: mysql
REPORTS_DB_SERVER: openmrsdb
REPORTS_DB_USERNAME: reports-user
REPORTS_DB_PASSWORD: password
patient-documents:
Expand Down

0 comments on commit a5e411c

Please sign in to comment.