Bahmni Ansible Installation errors

Hi @preethi_s and Bahmni team,

I was following the documentation for installing Bahmni with Ansible here: https://bahmni.atlassian.net/wiki/display/BAH/Install+Bahmni+on+Centos+using+Ansible

I noticed that there are a number of places on the page that instruct the user to run the bahmni install command as such:

sudo bahmni -i inventory_file_name install

However, this command fails:

[vagrant@bahmni ~]$ sudo bahmni -i inventory install Using inventory file at /etc/bahmni-installer/inventory… bahmni: Bad usage. n Invalid option – -i Usage:…

Looking at what is in /opt/bahmni-installer/bin/bahmni, it appears one needs to do this:

sudo bahmni install inventory_file_name

Perhaps i’m doing something wrong, but I figured I’d highlight this in case it needs fixing in the docs.

Thanks, Mike

Hi Bahmni team,

There is another installation issue I ran into that I also wanted to document. Not sure if this should be it’s own talk post, but I’ll add it here.

Basically, if I try to do a default install (eg. nothing in deployment-artifacts) but a custom “inventory” file to limit my install to just EMR, and with no custom setup.yml, running

sudo bahmni install inventory

fails with this error:

TASK: [bahmni-emr | Install openmrs from bahmni-repo] ************************* REMOTE_MODULE yum name=“openmrs-1.12.0-325” state=present EXEC [‘/bin/sh’, ‘-c’, ‘mkdir -p $HOME/.ansible/tmp/ansible-tmp-1458387485.15-128050416771567 && echo $HOME/.ansible/tmp/ansible-tmp-1458387485.15-128050416771567’] PUT /tmp/tmpwjMC72 TO /root/.ansible/tmp/ansible-tmp-1458387485.15-128050416771567/yum EXEC /bin/sh -c ‘sudo -k && sudo -H -S -p “[sudo via ansible, key=nsgxjqhiwvmuhwdjjsajxiesxyvczcwk] password: " -u root /bin/sh -c '”’“‘echo BECOME-SUCCESS-nsgxjqhiwvmuhwdjjsajxiesxyvczcwk; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python -tt /root/.ansible/tmp/ansible-tmp-1458387485.15-128050416771567/yum; rm -rf /root/.ansible/tmp/ansible-tmp-1458387485.15-128050416771567/ >/dev/null 2>&1’”‘"’’ failed: [localhost] => {“changed”: false, “failed”: true, “rc”: 0, “results”: } msg: No Package matching ‘openmrs-1.12.0-325’ found available, installed or updated

In order to fix this, I found that I needed to add a custom setup.yml file that specifies the correct repo url:

bahmni_repo_url: “https://bahmni-repo.twhosted.com/rpm/bahmni/

Please have a try and let me know if I’m doing something wrong or if there is a bug that needs fixing.

Thanks, Mike

Hi Mike, The “bahmni” command line utility version given for endtb release is a shell script.

The next version of that utility is a python script which is more advanced and can become an one-stop-shop for sysadmins to manage things on the environment like backups, restores, mysql & pgsql replication checks etc. This is more cutting edge and the usage you saw in the documentation is for the latest one. For now, this is still experimental.

I have updated the documentation to use the shell script version of “bahmni” utility for now. Once, the development of the python script is complete, we will update the documentation. Sorry for the confusion.

Regarding your second question, the default rpm repo configured with the bahmni installation is this. So, if the artifact is still not released officially, then the RPMs will not be available here. So, we have to override it with a nightly repo which you pointed out in the talk. So, ideally, once the current release of bahmni is out (within next few days), then you need not have to do that thing in setup.yml.

2 Likes