Bahmni Lite Helm Charts
What is Helm-chart?
Helm is the package manager for Kubernetes.
Helm uses a packaging format called charts. A chart is a collection of files that describe a related set of Kubernetes resources. A single chart might be used to deploy something simple, like a memcached pod, or something complex, like a full web app stack with HTTP servers, databases, caches, and so on.
Why Bahmni prefer using helm-charts ?
Bahmni preferred using helm-charts over other tools due to the following reasons:
🔘 Reduces the complexity of deploying microservices
🔘 Simplifies deployment scripts and files (all defined in YAML)
🔘 Improves the productivity of the deployments and rollback
🔘 Provides a way of versioning the Kubernetes resources as a single unit.
Bahmni: Helm Charts
Bahmni is using Helm-charts for its Kubernetes Packaging Structure
. All the deployments in the Lite env happened using helm-charts deployment. We have implemented helm-umbrella-charts for better management of resources.
Below is the K8s packaging Structure we follow in Bahmni:
Helm with Umbrella Charts
Directory Structure for Applications:
--- bahmni (openmrs-module-bahmniapps repo)
- package
- docker
- Dockerfile
- ....
- helm
-- Chart.yaml --> holds the chart definition
-- values.yaml --> default values, secret ref
- templates
-- deployment
-- service
-- secrets
--- openmrs (openmrs-module-bahmni-distro repo)
- package
- docker
- Dockerfile
- ...
- helm
-- Chart.yaml --> holds the chart definition
-- values.yaml --> default values, secret ref
- templates
-- deployment
-- service
-- secrets
=================================================================================
=================================================================================
--- helm-charts (https://github.com/Bahmni/helm-charts/tree/gh-pages)
-- openmrs (Application folder)
- openmrs-<release_tag>.tgz ---> Relase of <Application>
-- clinic-config
- clinic-config-<Release_tag>.tgz
--- Umbrella charts (https://github.com/Bahmni/helm-umbrella-chart)
-- Chart.yaml --> Contains the dependencies defined helm-charts
- clinic
- dev.yaml
- qa.yaml
- demo.yaml
- prod.yaml
All the Deployments are automated using Github actions. Refer the repository links attached with helm-charts & Umbrella-charts.
For any application in Bahmni we have followed the above directory structure.
Lets refer to Bahmni-lab repo as an example
Docker folder contains
Dockerfile
& other related files needed for docker-compose setupHelm folder contains the helm templates like,
values.yaml
,chart.yaml
& related Kubernetes components definition likedeployments
,services
,secrets
etc.
Helm-charts: This is used to store the deployed helm-charts tagged build under
gh-pages
Umbrella-charts: This is used to define the dependent charts to be deployed in the environment along with the individual env values defined in
dev.yaml
,qa.yaml
,demo.yaml
.
Pipeline Visualisation
Below is the pictorial representation of deployment pipeline.
References
Video Recording about Bahmni Helm-charts
https://thoughtworks.zoom.us/rec/share/y_mdW5zvdapFmpZ1ymkLEOHEob9vu7u-GjelszpmEsEuDG_AIj5U2LPB98-Rm_HS.RjrPR9cd58KNKdJ0
Passcode: VB?WSC#3
NOTE: Please contact Infra squad (Slack: #bahmni-infra) if you are facing any issues related to helm-charts & Deployments
The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)