1

I recently installed Nuget Gallery (https://github.com/NuGet/NuGetGallery) as a repository. Ideally I would like to create multiple feeds so that I could differentiate between nuget packages that will be reused in other projects (dll's, contracts etc) from the packages we use to deploy our projects to the production environment.

I know I can achieve this by creating multiple instances of the Nuget Gallery, but this seems to me a bit of an overkill, it would mean two websites two databases. I am also familiar with the fact that MyGet provides this functionally but I will not be able to get an approval for the purchase. I am also aware teamcity contains its own feed server but it doesn't allow this multiple feed scenario, nor its performs well enough to be used in a large scale.

In a nutshell the ideal deployment scenario would be as follow:

  • teamcity generate deployment package or dll/contract package, depending on the build scenario.
  • teamcity publishes deployment packages to a nuget gallery deploy feed (say: nugetgallery.server.com/deploy/api/v2).
  • teamcity publishes dll/contract packages to a nuget gallery dev feed (say: nugetgallery.server.com/dev/api/v2).
  • octopus always searches for packages in nugetgallery.server.com/deploy/api/v2
  • devs / teamcity searches for packages in nugetgallery.server.com/dev/api/v2

This way I keep things clean and I can even go as far as create a third type of feed that only contains release packages so that I can be sure nothing would ever be deployed to production if it wasn't on that feed.

I might have missed some fundamental approach, so alternatives to this one I picked are welcome.

rjso
  • 1,314
  • 10
  • 19
  • afaik, two nuget feeds requires two websites, for NugetGallery and NugetServer. Does it require two databases? I've never used NugetGallery, but for NuGetServer I know you can point the two websites to the same repository path. – Frank Bryce Apr 07 '16 at 15:43
  • I am fairly confident I could also point at least the files to the same location , but not so sure about the same database for two different sites, as I cannot think of a way it would differentiate packages based on the url they were uploaded from. I think it would be like having two instances of the same website no? There is a Gallery.SiteRoot key I can try and play with it, see if fits the purpose – rjso Apr 07 '16 at 16:09
  • Hmmm, good point. With your setup you'd need two databases because you'd have package ID collisions if you shared a database, right? This to me means you'd probably need two separate databases regardless. – Frank Bryce Apr 07 '16 at 16:11
  • @rjso tried contacting MyGet through the web site to help you with trying to get approval for the purchase? There's a free Enterprise trial you could give a spin. – Xavier Decoster Apr 08 '16 at 23:57
  • hi Xavier, thnks for the suggestion. Unfortunately as with many things in our industry that decision came from above and I am just supposed to find the best solution out of it. Another "drawback" (because I really dont see it as such) is that MyGet only allows you to store your packages in their online repos which apparently is a bad thing and we want to keep everything in our local servers – rjso Apr 11 '16 at 10:03

2 Answers2

1

As I couldn't find anything relevant I ultimately gave up and went with the two servers solution. I struggled a lot to find any documentation what functionalities the nuget gallery really has.

Right now we have something like deploy-nuget.server.com and dev-nuget.server.com, separate urls, iis instances and sql instances and folder location.

For someone that might look into this in the future, one of the solutions that could work is to make private repository based on the user, unfortunately in my case that would not be enough as I would also want the packages to be stored in different locations so we could enforce different backup policies based on the type of package. Another option would be to actually change to fork the project, but from my previous experience this never ends well as sooner rather than later you will want to upgrade and your custom changes will have to be sorted somehow.

I understand this is not the idea behind nuget gallery, as you are not supposed to delete packages. But we do have some space constraints so eventually we will remove certain deployment packages that were created for QA environments which we obviously dont care anymore.

rjso
  • 1,314
  • 10
  • 19
1

you can try Proget. using this server you can easily manage multiple NuGet feeds. it also provides free edition which supports all features.

Nagaraj M
  • 480
  • 3
  • 17