OpenMRS, the collaborative open source project to develop software that supports the delivery of healthcare in developing countries, recently announced that they have migrated from using Sonatype Nexus and Maven Central to JFrog solutions Artifactory and Bintray.
“It all worked out great and we did not hear about any single issue from developers after the migration. The Artifactory Cloud service works perfect for us so far and is a relief for our busy infrastructure team.”
Rafal Korytkowski Software Engineer at OpenMRS
OpenMRS has joined millions of developers and projects that are already using the special program sponsored by JFrog and Google to support the open source community by providing a solution for binary management and distribution on GCP.
OpenMRS joined this program last February and migrated their Maven repository from Sonatype Nexus to Artifactory. The process was done in two phases in a matter of hours. This blog post covers the migration path and reasons as described in the OpenMRS blog.
Migrating OpenMRS to use Artifactory and Bintray
The OpenMRS maven repository, which is used daily by every OpenMRS developer, was migrated to Artifactory Cloud over a month ago. It was possible thanks to a generous contribution from the JFrog company letting us use a free cloud instance.
Artifactory is a repository for various software artifacts, but we use it mainly for maven build artifacts. In addition we are working on distributing our software to end users through Bintray, which integrates seamlessly with Artifactory.
Around the end of 2016 we hit a space limit on the Nexus repository deployed to our infrastructure hardware. The service was not getting much attention of our busy DevOps team either. We lacked proper backups and updates. However, somehow it served us well for about 6 years. Over that period developers deployed ~20,000 artifacts using ~10 GBs of disk space.
First we considered moving to the Maven Central repo hosted by Sonatype and free for OSS projects, but it did not offer us the same flexibility as our Nexus instance when it comes to who and what gets deployed. It would also be a significant undertake to adjust historic artifacts to requirements imposed by the Maven Central repo.
The offer from the JFrog company came in the right moment. We settled on using a dedicated Artifactory cloud instance, which was pretty much in-place replacement for our Nexus repo.
We divided the migration into two phases. The first phase started 2 weeks ahead of the second phase.
In the first phase we used the nexus2artifactory migration tool to move all artifacts and configuration from Nexus to Artifactory. It took less than 4 hours to complete. We also configured a number of redirects from URLs in the old repo, which were used extensively in projects’ POMs, to the new Artifactory instance. That way we did not have to change anything in projects POMs and the switch could happen with one DNS change by pointing mavenrepo.openmrs.org to an Apache instance, which redirects requests to openmrs.jfrog.io.
The most tedious work was migrating users to Artifactory. Although the migration tool did migrate user accounts, it could not migrate passwords. Unfortunately, Artifactory, at the time we did the migration, did not have a feature of asking a user to reset a password by e-mail.
We decided to expire passwords for all users and reach out to each one by sending an e-mail with a new password and asking to login and reset it to the previously used one. That way when we were ready to switch, users would not even notice we moved from Nexus to Artifactory since their credentials would continue to work.
In the second phase of migration, which was announced to developers ahead of time, we turned off deploying artifacts to Nexus, which guaranteed nothing gets deployed after migrating Artifacts and before changing the DNS entry. Next we ran the migration tool once again to migrate all artifacts, which were deployed since the previous run. It took less than an hour this time. Finally we changed the DNS entry.
It all worked out great and we did not hear about any single issue from developers after the migration. The Artifactory Cloud service works perfect for us so far and is a relief for our busy infrastructure team.
We are now looking into connecting Artifactory with the OpenMRS Bintray account to automatically push releases to Bintray so they are available for end users. Bintray will be used as a backend to replace another piece of our self maintained repository at https://modules.openmrs.org/.
We hope Aritfactory and Bintray will allow us to keep up with the gaining momentum of contributions to OpenMRS!
Finally, I would like to thank Cintia Del Rio, who is one of OpenMRS volunteer DevOps assisting me with the migration process.
Have an OSS project?
Want JFrog Artifactory Cloud hosted on GCP for free? Join the program.