Requirements for Dockerizing Bahmni on the latest CentOS images

Tags: #<Tag:0x00007f8c967d50f8>

Hiya!

We’re a team at the University of Southampton trying to implement Bahmni for a team of clinicians in Ethiopia. Because we’ve got a development team, CI, staging, and acceptance servers, and the end result will have to be deployed to a handful of production machines, we’re looking to build light-weight automated deployments.

We’re using Bahmni, but at the moment only need the EMR functionality so we’ve been trying to Dockerize just that part of the entire Bahmni platform. However, that has not been successful so far. as documentation and examples:

  • are out of date, using older CentOS versions or Bahmni releases
  • use insecure package installation sources (HTTP instead of HTTPS)
  • run partly (the Mekom Solutions Docker images, see screen shot)

I am looking for advice on where to find the latest requirements for Docker deployments, or recent examples. Once we find a configuration that works, we believe can tailor it or slim it down to what our clinicians need.

Thank you for your time,

Bart

PS: @mksrom I was asked to tag you in this post :slight_smile:

1 Like

Hi @bart, welcome to the OpenMRS community!

It is unfortunate that the Docker image you’ve tried does not work out of the box. It should.

Which tag did you pull? and which command did you use?


As you have already found out, Bahmni does not really support Docker. The images we are using are only a workaround of what should really be done. They are just a base CentOS 6.9 (or 7 for the latest ones) on which we have run the Bahmni installer. They are already making the deployment of Bahmni much easier though but we definitely start to see the limitations.

Definitely not how Docker should be used anyway plus it brings quite a number of deployment and performance issues.

The right way is to have a Docker Compose project (or other similar tool) that would start individual services, each of them isolated in its container.

For Bahmni EMR only, those service would be:

  • Reverse proxy used as an entry point to the application
  • MySQL database to host the OpenMRS database
  • Tomcat 7 to serve the OpenMRS Java app
  • An HTTP server to serve Bahmni Apps
  • An HTTP server to serve Bahmni Config
  • Tomcat 7 to serve Bahmni Reports Java app
  • maybe others?

We have started work in this direction already and we can almost start an EMR only Docker Compose project - still having issues with loading the databases. Adding Odoo brings its lot of problems but we are making progress as well. All is still WIP.

You can have a look at the Docker Compose file:

I would suggest that you rather go in this direction as it makes things cleaner and plugs nicely on a Docker Swarm or Kubernetes orchestrator.

We can also discuss that over a call.

Useful resources:

The JIRA epic we have used is:

Project is hosted here: (on branch BAH-781)

To deploy all that, we are also using the OCD3, a Dockerized custom Jenkins to deploy OpenMRS and Bahmni server:

Though it may not be usable “as is” for you as there is some assumptions that are not documented in there. The main one being that you need to package your projects as Maven distributions. Have a look at what we’ve done here for instance:

Hi @bart, did the above helped?

Hi @mksrom, thanks for taking the time to explain the current state of things. Due to severely limited resources we’ve had put aside our desire for CI pipelines and Dockerization. Instead we built custom Ansible playbooks to provision both bare metal prod machines as well as development and acceptance VMs, as this is all pretty similar to proven existing solutions.