Klondike
Ember front-end that builds on NuGet.Lucene for private NuGet package hosting.
Binaries
Available from the Releases tab on github.
Alternatively, you can clone the Klondike-Release git repo to make upgrading easier.
Preview binaries can be obtained from the Artifacts
tab of a successful AppVeyor build.
What is Klondike
Klondike is an asp.net web application you deploy to your own web server or to the cloud that works as a private NuGet package feed for storing private packages your organization creates. Klondike can also automatically restore packages sourced from 3rd party feeds, such as the nuget.org public feed, to keep your build server humming even when nuget.org is unavailable.
Klondike performs dramatically better than the standard NuGet.Server provider and adds lots of extra features you can't get anywhere else. Klondike uses Lucene.Net meaning that the install footprint is light. Simply grab the binaries, stand up an IIS site (or run the self-hosted exe) and you're done. Much easier than deploying your own NuGet Gallery.
How to Deploy Klondike
- Grab a binary zip from the Releases tab or clone Klondike-Release
- Customize Settings.config
- Create a site in IIS using a .NET v4.0 Integrated Pipeline application pool
N.B. Klondike works best deployed as a root application and is only supported in this configuration. There are known issues with NuGet clients when attempting to host Klondike as a child application on a virtual path. In addition, the Ember web application will not work correctly unless it is rebuilt with a different virtual path.
App Pool Advanced Configuration
Klondike is designed to run as a single process to avoid conflicting writes on the Lucene index files. Adjust your application pool accordingly:
- Make sure
Maximum Worker Processes
is set to1
- Make sure
Disable Overlapped Recycle
is set totrue
Authentication and Role-Based Security
Klondike supports external authentication providers such as Windows (Active Directory), basic auth and NTLM. These are configured in IIS Manager and other tools.
Disable anonymous authentication to require authentication even for read access to Klondike.
In addition to standard authentication, Klondike supports authentication by using the
X-NuGet-ApiKey
HTTP Request header to be compatible with NuGet clients that push and delete
packages.
Local Administrator
Browsing or accessing the Klondike app from a local network interface on the same machine
will implicitly grant access as LocalAdministrator
. This account is allowed to create
additional users, push and delete packages.
You can disable this behavior by editing handleLocalRequestsAsAdmin
in Settings.config.
Mapping Active Directory Roles to Klondike
Edit the roleMappings
section in Web.config to grant
Klondike roles for user administration and package management to existing roles in your
external security provider (such as Active Directory). Multiple groups can be specified
delimited by commas. Membership in any one role is sufficient to grant a Klondike role.
The available roles and their permissions are:
- PackageManager - Allowed to push and delete packages
- AccountAdministrator - Allowed to administer accounts
Creating Users and Passwords
Any user who has the AccountAdministrator role may create, delete and modify accounts and API keys. This includes the LocalAdministrator account.
To access this feature, browse to Klondike and select Admin
in the top navigation,
then Manage Accounts
.
Self-Hosted Klondike
The binary release also includes Klondike.SelfHost.exe in the bin directory. It can be run from the console using mono or the .net framework:
Klondike.SelfHost.exe --port=8080
Or
mono ./Klondike.SelfHost.exe --interactive --port=8080
Klondike requires Mono 4.2.0 or later.
If no port is specified, 8080 is used as a default. See the Klondike.SelfHost README for more information.
Building Locally
This repository consists of two components:
- Ember front-end built and packaged by ember-cli
- c# project built by MSBuild or xbuild
Front End
Prerequisites: node (node
and npm
should be on your PATH).
Install ember-cli and bower if you haven't already:
npm install -g [email protected]
Install dependencies:
npm install && bower install
Finally, build:
ember build
This puts the built app into ./dist
.
Note: if you do not have the .NET 4.5 SDK or Mono 3.6 MDK installed you can
skip building the .net assets by using the ember-only
environment:
ember build --environment=ember-only
.NET Back End
The c# projects can be built on Windows or OS X / Linux. On Windows, install Visual Studio 2013 and the Microsoft.NET Framework 4.5 SDK. On OS X / Linux, install the Mono MDK
Mono can also be installed by homebrew on OS X.
Front End development without .NET
You can develop the front end without needing to build or host the .net code.
Edit config/environment.js and set the apiURL
and (optionally) apiKey
properties to point to an external Klondike API endpoint,
then run
ember serve --environment=ember-only
Previewing debug/release builds
You can serve production builds with:
ember serve --environment=production
Integration Tests
Coming Real Soon Now.