Bahmni Mart Installation Setup

1. For cleaning up postgres from instance ( Not required for all scenarios, only required if we want a different version of postgres from what we already have in the bahmni instance)

yum remove postgresql -y yum remove postgres\* -y rm -rf /var/lib/pgsql yum list installed | grep postgres

2. Remove bahmni-mart if installed before

yum remove bahmni-mart -y

3. Download bahmni-mart playbook

wget -O /tmp/bahmni-mart-playbook.zip https://github.com/Bahmni/bahmni-mart-playbook/archive/refs/heads/master.zip && unzip -o /tmp/bahmni-mart-playbook.zip -d /tmp && sudo rm -rf /etc/bahmni-mart-playbook && sudo mv /tmp/bahmni-mart-playbook-master /etc/bahmni-mart-playbook && rm -rf /tmp/bahmni-mart-playbook.zip

4. If we want bahmni-mart installed on both master and slave machine please use the commands to get the mart_inventory file below

change the bahmni-mart url based on the latest artefact

Update ip for fresh installation of mart

5. For standalone instance where we don’t have master and slave setup the below inventory is being used

  1. Since the master-slave set-up is not available, remove all the lines with <slave_ip>

  2. Update master_ip

Remove entries under [bahmni-mart-db-slave], [bahmni-mart-scdf], [metabase-db-slave] in the bahmni-mart inventory file

6. Verify and update the below parameters in setup.yml

cd /etc/bahmni-mart-playbook

If user wants to install mart with latest bahmni_mart_url then user need to update bahmni_mart_version to the rpm version so that it will install the latest mart.

Modify the file “/etc/bahmni-mart-playbook/roles/postgres/defaults/main.yml” with below entries

7. Metabase without ssl

Metabase with let's encrypt ssl(optional)
Metabase with custom ssl(optional)
Add necessary jobs or Remove the extra jobs from bahmni-mart.json

8. Add access privileges to Vagrant IP in pg_hba.conf

Update the file with the below entry

Restart Postgresql


9. Run bahmni mart

Check if following URLs are accessible
Metabase

 

To connect metabase with a analytics database (when using without ssl)

Host : IP of the machine as seen by Metabase docker container. E.g: 172.17.42.1

port : 5432

Database name : analytics

Database username : analytics

Database password : password

 

Docker container (metabase and scdf) removal step need to be added.

 

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)