diff --git a/Chart.yaml b/Chart.yaml index cda568c9..3bef41d3 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -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 diff --git a/db/README.md b/db/README.md new file mode 100644 index 00000000..8ba9d301 --- /dev/null +++ b/db/README.md @@ -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. diff --git a/db/openmrsdb.yaml b/db/openmrsdb.yaml new file mode 100644 index 00000000..e67bf243 --- /dev/null +++ b/db/openmrsdb.yaml @@ -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 \ No newline at end of file diff --git a/values/local.yaml b/values/local.yaml index a20b277c..f301654f 100644 --- a/values/local.yaml +++ b/values/local.yaml @@ -1,8 +1,3 @@ -global: - postgresql: - auth: - postgresPassword: welcome - metadata: labels: environment: local @@ -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: @@ -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 @@ -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: