Bahmni Configuration & Overriding

Hello Bahmni Team–

As you probably know, we (PIH) recently launched our first Bahmni implementation a few months back at one of our sites in Sierra Leone. We are now are taking the preliminary steps to look into expanding our use of Bahmni to other sites.

As we do this, we are trying to devise a strategy to share common configuration elements across our sites, while also allowing custom configurations for each site. We’ve been looking to use the Bahmni “override config” functionality as described here:

https://bahmni.atlassian.net/wiki/display/BAH/Overriding+Config

Either the documentation wasn’t entirely clear, or I missed part of it, but just to confirm, when overriding configs, the “parent” config goes in the “/var/www/bahmni_config” directory while the config that provides implementation-specific overrides goes in “/var/www/implementation_config”. Is this correct?

Also, I see on the Bahmni roadmap something called “Config Builder” scheduled for Q4 2016, so I was wondering if there were any upcoming improvements or changes planned for configuration that we may want to take into account when developing our strategy.

Take care, Mark

Yes, You are right… Just be aware that the directory structure is similar for both directories. Only the Json files are overridden and not other files like the groovy files etc… The final merged config from both the directories bahmni_config and implementation_config is based on the definitions mentioned in documentation.

@gsluthra @kartikn Can you please answer this query…

Thanks @sravanthi17! Looking forward to info on the roadmap.

Take care, Mark

@sravanthi17 one other question–you said that only the json files are overrwritten. I assume then that the SQL migrations are not overwritten… but will migrations placed in the implementation_config directory get picked up at all, or can migrations only live in the bahmni_config directory?

Thanks, Mark

Yes, right now they can’t be picked up.

But for now, there is a way to run migrations from implementation_config. During installation, migrations under bahmni_config will anyways be picked up and executed. On top of it, you can use to run custom plays (may be written in implementation_config).

For example in order to run the plays in implementation_config, use the below command.

sudo bahmni --implementation_play={path} -i {inventory_file} install-impl (for example: path="/var/www/implementation_config/playbooks/all.yml" }

Hope this works for your use case :slight_smile: