Let's consider using bintray for our maven repo

Tags: #<Tag:0x00007f1f7fc8bbf8> #<Tag:0x00007f1f7fc8bb30> #<Tag:0x00007f1f7fc8ba68> #<Tag:0x00007f1f7fc8b9a0> #<Tag:0x00007f1f7fc8b8d8>

The server we are currently using is largely being used by nexus (63.8(!) GB – Almost 64GB) and we do not have that much space on it. Builds will continue to fail. We are currently at 92.7% utilization of 117.99GB.

This is the cause of the recent Refapp builds failing. Nexus is the problem here right now.

We need to either:

a) move all the files to S3 and remove them from the server entirely – We could do this. b) use bintray and discontinue nexus because this cannot continue. Logs aren’t taking up space, here, it’s Nexus.

Either way Nexus and all artifacts MUST be deleted from the server. This is not a negotiable here, what is negoitable is where they go before they’re deleted.

What is taking up most of the space within nexus? We (the OpenHMIS team) have been deploying all our released versions to the omrs nexus repo but have not thought about cleaning up old versions as we release new ones. Is there a way to trim older versions and free up some space?

I’d rather just nuke the whole thing to be honest. It’s actually a strain on our resources, so if you guys could use something else – that’d be great. If we migrate to bintray – we won’t have an issue…but right now it’s actually a strain.

Can we prune it? probably…but scripting this will be burdensome. This isn’t good at all. It’s time to retire nexus to be honest and move to Amazon S3 and/or bintray.

This is where we (the infra team) have to step in and not ask if you want it, but say this is how it has to be, here are your options. One application cannot hog over half the disk space like that. That’s just bad.

How would removing the nexus repository and moving to one of these other options affect module developers like us? We have actually already set up our own nexus repo but it mostly pulls from the omrs repo, with the exception of our SNAPSHOT builds.

I totally understand that you have to do what you have to do to keep the server going. I just want to make sure I understand the ramifications. Thanks for all your work to keep these things up and running!

It would likely require changes. I’d rather not constantly be putting out fires.

See this link for how we could use s3; bintray supports maven repos. You don’t need nexus at all.

This is no longer optional. We need to figure out what to do-- sooner rather than later, by that I mean – it has to happen next week.

If we are eating up all our disk space and we can’t get any more (though 120GB doesn’t seem like a particularly large amount, though I know Indiana U is donating it for free) then the current situation is certainly untenable. And if there are third-party solutions like Amazon S3 and bintray, it does seem silly to still be hosting our own. And one would hope that they’d make migration relatively straightforward.

That being said, handling the move incorrectly has the potentially to be (significantly) disruptive to the OpenMRS build pipeline, OpenMRS developers, and potentially other build pipelines as well like OpenHMIS, PIH and Bahmni. I don’t have free time this weekend to add my two cents on Amazon S3 or bintray, but will carve out some time to look into this in greater detail next week so hopefully I can weigh in more intelligently… :slight_smile:

@burke @darius @mseaton

Take care, Mark

Unfortunately – builds are breaking as-is. The server is shared with Confluence(the wiki).

I want to do the move in a way that is not too disruptive, but it will not be pleasant either way sadly as things will break. I’d like to remove Nexus entirely and just use bintray or s3.

The less we have to maintain ourselves, the better.

1 Like

+1 to making this a priority to figure out this coming week.

-Darius (by phone)

1 Like

I think we can address the issue in the following steps:

  1. Disable proxying maven central. It should free up a lot of space on the server. I can do that, but need admin access to http://mavenrepo.openmrs.org/ It doesn’t require any changes from developers.
  2. Start releasing to Bintray. It should be done during this week’s sprint.
  3. Start deploying snapshots to Bintray (oss.jfrog.org). It shouldn’t be hard once 2. is done.
  4. Migrate all openmrs released jars to bintray. It may require assistance from Bintray or we may need to write/find some script/tool to handle the migration ourselves.

The 4th step entails the most work. I would say that if the 1st step frees up enough space to satisfy us we can continue to use http://mavenrepo.openmrs.org as an archive for older versions and delay the 4th step.

+1 with starting with step 1 as @raff above–doesn’t look like I have admin rights either, though.

@r0bby, @darius Do you see an issue with disabling proxying, and, if not, can one of you set Rafal up with admin access?

Do we know if an Amazon S3 solution could potentially make step 4 any easier?

Mark

I agree with Rafal’s proposed approach, and I also hope that Step 1 solves the immediate problem enough that we don’t have to rush through 2-4.

(I don’t know what maven proxying implies, so if Rafal thinks we should disable it, I trust him.)

I have given @raff admin access on mavenrepo.openmrs.org.

I’m not sure if it entails downloading all artifacts… even still – one service cannot be hogging 30+GB of space. You’d have drop below a reasonable value…reasonable being ~10-15GB… 20 at most.

To step #3 that @raff mentions above, do we know if it takes anything to be one the “selected” open source projects (see first sentence in link below)?

https://www.jfrog.com/confluence/display/RTF/Deploying+Snapshots+to+oss.jfrog.org

@raff we would also have to update all the module poms to point to bintray instead of our maven repo, and then developers would have to updat as well, right?

Not ideal, but if #4 becomes too much work, is it possible to make a Maven Repo read-only and continue to host the older artifacts there? Or at least do that in the short-term while we figure out the best way to copy all the old artifacts over?

Take care, Mark

Let me try removing proxy repos – and then we’ll see how much it drops. I don’t anticipate it dropping much.

Removing proxies did nothing. We are now at 48MB of free disk space. This isn’t optional anymore.

Okay I’m making a call here:

There’s an automated tool if we use JFrog Artifactory. Otherwise, we are stuck using a shell script and curl.

It has now grown to 66.3 GB. We can’t host this anymore. I’m making the call. Not even read-only.

One other thing to note: with the fact it is 66.3GB in size, this will not be free. It is a waste of resources to dedicate one server to nexus.

@r0bby, please do not make any changes that are going to impact the dev team unilaterally.

-Darius (by phone)

1 Like

I’m not. I am however saying that a decision must be made within the next couple days. Figure out what we can afford and let’s make a decision. Nothing gets deleted without it being moved somewhere.

All decision and discussion will happen here, not on a call. Here.

Hi folks.

Please, let’s use this thread to get back to basics.

Question #1: Do we actually need more space, or do we have things configured in a way that are incorrect? I see people on this thread saying that we don’t need the space, and I see people saying we need more.

Question #2: Is there an alternative approach to our Maven repo that we need to consider.

From my vantage point, this is not an issue that just cropped up magically. It’s been accumulating for some time obviously. If we need more resources, we can get them. This is not an issue of money as much as it is an issue of approach.

Let’s focus on an approach that requires the least amount of radical change and disruption to our community.