I believe OpenMRS should be 100% DB-agnostic.
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.
@lluismf would you be able and willing to help us get OpenMRS using MariaDB?
Yes I guess I can spare a couple of hours per week. Not sure about the tasks to do though.
Thanks a ton, Lluis!
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 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.
Anything new going on with this?
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.
@jthomas It will be great to use MariaDB for OpenMRS at least because of it’s licencing. I’m not very confident with MySQL in Oracle’s hands.
@lluismf Nice will assist if I have some spare time. My GSoC project is somehow related to this
I already tested the basic scenarios (legacy, embedded and reference application running on Tomcat). Next step is CI but it’s not in my hands.
@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)?
Sure thing, I will continue the discussion on the JIRA issue.
Since @michael helpfully reminded us we shouldn’t have substantive conversations in the issue tracker, we seem to have lost the thread…
So, what do you think about how to approach this.
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?
Yes I do, it’s only that I don’t have much time to spend.
I don’t have heaps of time this week or the next, but after 18th I should be much more free.
What I’ve done is installing docker on the agents. https://ci.openmrs.org/browse/RELEASE-MDT-6/log
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.
I don’t think we need to import any data. The idea is to run the tests against an empty database and let the tests insert the initial data. It’s already done for the in-memory DB, it just needs to be tweaked to connect to a “normal” database.