This post follows up on the latest discussions around O3 implementations on how to best organise modularity and configuration of OpenMRS 3 modules and Docker images across implementations - especially in the context of the growing momentum of the O3 squads and collaborative features.
For example, the MSF team currently configures versions of the OpenMRS 3 frontend and backend Docker images using Github Actions, also pushing versions of these customised images to Docker Hub with tags per environment like DEV, QA, and PROD. At execution level, Docker Compose pulls and runs these images, and configurations like metadata are loaded using Docker volumes.
While that approach works well to quickly configure images and update backend and frontend versions of the EMR, it might not be the most scalable one - especially since each environment requires a tagged Docker image.
Our question for the community is then how to collectively identify and align on the best DevOps practices for making OpenMRS modules and Docker images modular and configurable at scale.
Here is a tentative diagram trying to illustrates the shift where the reference application is more of a βproductβ than a βreferenceβ, serving as a configurable foundation for implementations:
Here are a few points/assumptions to discuss based on that potential model:
-
OpenMRS community modules and Docker images are used whenever possible, allowing to share maintenance efforts between implementers, rather than repeated for each of them.
-
Configuration files are prioritised over forks or rebuilds, allowing to make modules and product images more reusable.
-
Configurations that are specific to an implementation (at least in the context of MSF ones) live in separate repositories. Example: OpenMRS3-Iraq-Configuration.
-
Released Docker images from OpenMRS community are reusable or extendable, allowing to reuse images without rebuilding them from scratch.
-
OpenMRS frontend Docker image already implemented part of this reusability functionality in 3.0.0-beta.16. For example in frontend/DockerFile:
FROM openmrs/openmrs-reference-application-3-frontend:3.0.0-beta.16
RUN rm -rf /usr/share/nginx/html/*
COPY ./frontend /usr/share/nginx/html/
-
Backend configurations could be packaged using Maven while building the backend Docker image for an implementation.
-
Below is a simple Git illustration of how MSF could maintain images and implementations with the OpenMRS community:
The above discussion is a work in progress, open to all suggestions that can facilitate iterative alignment among us. For MSF, the objective is to use the Iraq implementation (to start with) to measure and showcase the efficiency of the modular approach. We also aim to document those collective best practices to facilitate adoption and contributions to O3, while also acknowledging that different architectures might already be in place.
Looking forward to your insights and suggestions
@michaelbontyes @eudson @samuel34 @mksrom @mogoodrich @caseynth2 @delphinep @ibacher @grace @dkayiwa @dkigen @pirupius @jayasanka @slubwama @ruhanga @mksd