Need help understanding the Bahmni - Ansible installation process


(ess dee) #1

I would like to install Bahmni on CentOS using an “advanced installation” process. For this task, I think I need to modify the inventory-list (aka “Local”) file per step-4 of the advanced installation instructions. I’m currently stuck on that step for over a week. I can’t find any documentation about the Bahmni-specific implementation of Ansible and I’ve looked!

Does anyone “own” the installation code or familiar enough with it and Ansible to give me a run-down on roughly how to change up the inventory file or the YAML code to perform installations on non-Localhost machines? I don’t really know anything about Ansible yet, and I’m attempting to not have to learn everything about it just to get Bahmni installed securely, so any help would be appreciated.

From what I’ve read,a best-practice for Ansible is using it on a box that’s dedicated solely to installations and not use “localhost” for any of the IP addresses. This allows the dedicated installation machine (that has root access to any box on which it’s installing software) to be removed from the network as soon as the installation is complete. This reduces the opportunity for hackers to gain root access to servers via Ansible indirectly or directly via the root access retained by Ansible.

I’d prefer to not have to reverse-engineer this installation process, so if anyone knows it, you’ll save me a ton of time trying to figure this out in order to get Bahmni installed.


(Angshuman Sarkar) #2
  1. Inventory file
  • “local” is just a name. It can be anything as long as you mention that for the “-i” parameter

bahmni install -i my_file

The documentation clearly mentions that.

bahmni -i <inventory_file_name> install

  1. Inventory file format
  • we follow the INI file format. Where things are mentioned for groups and hosts. Groups are mentioned within the square bracket and you can have multiple hosts mentioned there.
[bahmni-emr]
172.16.1.1
172.16.1.2 passive=yes

While defining an active-passive setup, you will need to define which one is “passive”. Check example here

  • the group of groups mention what all the components are to be installed (of course, you may not define a host under a group)

[local:children]

  1. Bahmni can be installed from a control machine. Its quite common to set this across 2 machines in a active-passive setup. Check example inventory file here

  2. Ansible requires SSH and you need to define a user appropriately so that that user has ssh to a machine and also have sudo access for installation. Once done, you can remove the user! You may also define a key file to use (parameter - ansible_ssh_private_key_file). Check the above inventory file example. common parameters are “ansible_ssh_user”, “ansible_ssh_pass”, “ansible_host

  3. “localhost” is only applicable for local machine installation. the Advanced installation specifically mentions avoiding “localhost” for “Remote Setup/multi machine setup” section. You can use something like this as well, as part of the host definition.

127.0.0.1 ansible_connection=local

[bahmni-emr]
127.0.0.1
  1. There are many examples of inventory files here

Hope these help!


(ess dee) #3

I think that sounds like a step in the right direction. Thank you.