Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Self-Hosting NuGet

I have been looking at self hosting NuGet, having a hard time understanding how to set it up and how it would help support our development process.

Does anyone have any recommendations as to which to use, how to set it up?

Or should I just use a hosted service?

like image 244
Jason Watts Avatar asked Sep 11 '12 17:09

Jason Watts


People also ask

Where is NuGet hosted?

Server. NuGet Gallery: Packages are hosted on an Internet server using the NuGet Gallery Project (github.com). NuGet Gallery provides user management and features such as an extensive web UI that allows searching and exploring packages from within the browser, similar to nuget.org.

What is a Nupkg package?

Put simply, a NuGet package is a single ZIP file with the . nupkg extension that contains compiled code (DLLs), other files related to that code, and a descriptive manifest that includes information like the package's version number.


2 Answers

After looking around at various solutions--self-hosted and hosted service--we chose to go with ProGet.

ProGet Summary

ProGet has a standard "free" license and nominal licensing fees (single year and perpetual) for the enterprise version. We currently use the standard "free" version and have no real complaints. You can create as many feeds as you want, add as many users as you want, etc. (We created "Testing", "Staging", and "Production" feeds to be part of our quality assurance process.) The only real limit in the free version is the inability to filter external feeds for specific packages you want included in your ProGet feeds. This filtering feature is managed with "connectors". With the enterprise version--when you create a feed--you can optionally add a "connector" to pull in packages from other feeds (external or internal).

ProGet With Nuget Package Management and Creation

The steps for creating a nuget package itself I'll leave to David Ebbo's popular blog post, http://blog.davidebbo.com/2011/04/easy-way-to-publish-nuget-packages-with.html. However, know that for uploading packages you can upload via the ProGet packages administration web UI, command-line nuget.exe, or the Nuget Package Explorer.

ProGet Installation, Configuration, and Activation

Installing, configuring and activating ProGet was the least intuitive part. It can install backed by a regular SQL Server database or a SQL Server Express db. Furthermore, it can also be a self-hosted app or run under IIS. If you need to perform offline activation or want to request different license keys go to my.inedo.com and create an account and you can do everything from there.

Proget Quality Control & CI

CI with TeamCity is something we are going to need so we are looking at creating a nuget package build process using TeamCity's Nuget server. There's a how-to for creating the packages I'll post in a comment. The next step would be to automatically publish the TeamCity-created nuget packages over to the appropriate ProGet feeds (ie. "Testing", "Staging", "Production") perhaps utilizing command-line Nuget with an API key.

Further Information

We looked at MyGet as a hosted service but it seemed to trip up on simple scenarios like adding another contributor/user. It also jumped quite a bit in price when needing more than just two contributor accounts. Whereas with ProGet you get unlimited user accounts with the free version alone.

One more side note: For publishing OSS type projects/packages, I'd take a look at Chocolatey as a solution.

like image 138
TWright Avatar answered Sep 30 '22 02:09

TWright


Another option for self hosting is using the NuGet.Server package and creating an IIS website to host it on your internal network, although it won't scale very well if you plan to publish more than a handful of packages.

I've created a fork of NuGet.Server that uses a Lucene.Net index to fix these performance issues. Downloads are available from https://github.com/themotleyfool/Klondike/releases.

like image 41
Chris Eldredge Avatar answered Sep 30 '22 01:09

Chris Eldredge