Deploying Bahmni UI and DB on separate servers

Dear All,

When I installed Bahmni on CentOS the GUI and DB is configured on same server. How to separate that out? and if it is possible?

Best Regards,


Yes it is possible and encouraged (esp in Production). Simply speaking it means everywhere where a DB connection string is mentioned, it should mention the IP of the DB server (instead of localhost).

One way to do this would be to inform the Bahmni installer what IP you want the DB to be installed? For that edit the /etc/bahmni-installer/<profile_name> file (local). It has the IP addresses for each component, and you may need to edit the ones which mention DB and put appropriate DB. Then the machine you trigger install from, will try and SSH into those machines and setup DB there. See this file as a reference: bahmni-playbooks/local at master · Bahmni/bahmni-playbooks · GitHub

This is a feature of Ansible which is used by bahmni-installer under the hood. It uses Ansible to trigger installation and replace variables in the file.

Alternatively, u can create the DBs first on a machine (Backup->Restore DB on different machine), and then replace all config files where DB string is mentioned from localhost->IP. For this you can use grep to search for DB string and then edit it everywhere.

cc: @angshuonline may be able to confirm this. Or someone else in the community.

Thank you for the response. We have already setup MySQL Database. So I do not want Bahmni to install MySQL. Can we skip DB installation while Bahmni installation?

Is there any way to just give IP of MySQL running host to Bahmni installer?

Best Regards,