Do you believe OpenMRS should be using MariaDB?If so, how can you help make this happen?
You may have heard this:
“OpenMRS uses Hibernate for database access, which means it can run on any popular database engine.”
We’ve been making that claim for a long time. Now, with your help, we’d like to start living up to that claim. In a recent Developers Forum, we decided our first in formally supporting non-MySQL databases would be MariaDB support. As a result, we created an epic:
Personally, I agree, and my perception of the 2015-04-16 developers forum is that most people there to discuss it agreed, too.
But we also agreed that:
Ensuring we are DB agonstic would probably have to be a gradual process, and
As long as we are shipping a “standalone” installation we will need to have a “default” or "recommended DB.
So the ideas about maintaining continuous integration tests with at least 2 databases was seen as a step in that direction, with MariaDB being the most logical next choice for testing against multiple DB’s.
Someone can feel free to add more here if my perceptions are wrong or if you disagree.
You allude to one of the main humps we have to work through in the community. Everyone realizes that activities like this are important, and want to contribute, but it’s like trying to figure out how to take the first bite of an elephant.
Putting that aside for a second, the immediate task is to demonstrate OpenMRS working operationally on top of MariaDB. At one point, I played around with this, and got it a big part of the way there, but it failed during the installation process. I think some of the SQL scripts that we use to inject demo data might be MySQL syntax specific.
So, if you wanted to get started… simply trying to install OpenMRS, swapping out MariaDB for MySQL, and help us troubleshoot the issues that might (or might not) come up. Once we get through that step, it seems like getting consensus on what a testing strategy for MariaDB (or any database technology) would look like, in order for us to feel comfortable putting that out in the wild.
Of course, there would be some opportunities to wire MariaDB into the continuous build processes as well that create a “release” for general consumption.
I think given the direction that MySQL is heading, we probably want to move away from it being the bundled package at some point.
I’m sure @burke and @darius will correct some of what I’ve said.
I think the main thing that this task is missing is someone willing to “own” it and wake up thinking about it from time to time until we get it resolved/wrapped up.
I for one will commit to working alongside you until we get there.
I’ve installed OpenMRS several times (even dropping the DB) and the demo data never was inserted. So maybe it’s not a MariaDB related problem.
I will try and start creating subtasks.
Update: I removed MySQL from my machine, installed MariaDB 5.5 and installed a fresh OpenMRS without problems. All the scripts (demo data and all the liquibase changes) ran fine. Now it’s just a matter of testing. Even the connection string is compatible.
Yes, I just tested the standalone and it works, details here:
Needs more testing of course, but the initial impression is good.
This week I plan to install the WAR on Tomcat to test the Reference Implementation with MariaDB not embedded. I already tested the legacy UI and all the liquibase DML was executed without problems, so I expect the same behaviour.
@cintiadr, would you be willing/able to assist @lluismf and/or @ch3ck as they try to get a project running on CI to build OpenMRS against MariaDB to reach one of our technical milestones for OpenMRS (i.e., what @darius was saying here)?
I can try to modify the base test classes to allow using a database other than H2, depending for instance of a system property (now is hardcoded to use the in-memory one). But IMHO this should be out of the scope of MariaDB testing. This doesn’t mean that I don’t want to do it, but it won’t be a couple of hours.
A better way to test MariaDB is to update the wiki suggesting new developers to use it instead of MySQL, and issues will arise fast.
@lluismf, definitely asking all new devs to use MariaDB instead of MySQL would solve some problem, but I think our real goal is to grow to the point where we support multiple databases, not just (a different) one.
Are you interested in working with @cintiadr to figure out how to achieve that, through some use of testing and CI?
I have this pretty simple build starting mariadb and kill it at the end.
Is there any super simple way to test importing data? Any arbitrary
username/password can be passed.
Newest version of Bamboo has a nicer support to docker, we can upgrade
Bamboo those tests work.