NuGet Server With Caching - nuget

I have a build server that pulls nuget packages on every build, and currently have a NugetGallery deployed internally for custom packages. Right now that eats bandwidth like no tomorrow (not a huge deal, but I want to be kind and make things faster for us).
So I want to auto-mirror repos and cache them.
So far I have a few options: MyGet, which is a cloud-only offering (so no), and Proget (which I'm leaning towards). Are there any other options for auto-mirroring I'm missing?

Klondike is an open-source NuGet package manager that you can deploy privately to your own servers.

Inedo's ProGet is by far the most popular choice for on-prem NuGet servers, but both JFrog and Sonatype have options as well.

You didn't mention whether you have multiple locations to support in your setup. If you do, I'd like to point you to this new feature developed by Inedo (ProGet) and MyGet in partnership:
http://blog.myget.org/post/2015/01/28/Introducing-MyGet-Feed-Sync.aspx

BaGet is the best tool if you looking for something similar to vardaccio or Devpi. It is opensource and capable of caching packages by enabling read-through caching

Related

NuGet private feed not updating DownloadCount

I have set up a small test Nuget private repository on my machine following this guide.
Everything is working perfectly and I can publish packages, update versions, download them etc. The only problem is that the DownloadCount of my packages is always 0 regardless of how many times I download it.
I downloaded NuGet source but could not find a place where this value is updated. Moreover, nuget does not seem to use any DB technology so probably the feed is just generated on demand from the contents of the Packages folder.
Does anyone have any idea if this is a known issue or if it's a problem in my setup or if I should just add some code to the server to record downloads myself?
Thanks!
NuGet.Server based web sites are simply a front-end exposing an OData feed on top of a file share. There's no real database behind it, no indexing, no auditing, tracing, metrics or statistics, or any of that kind of stuff.
You could build it yourself, or take a look at alternatives such as MyGet, ProGet, Artifactory, etc.

Version control architecture for a large project with many dev groups

We are working on a very large portal project. We need a scalable source version control architecture such that, it should be scalable to many teams and possible incoming teams.
There will be common libraries and each group will work on different part of the system. At demo times, we need to integrate these parts and have the product testable, demoable and so on.
Do you recommend some guidelines or architectures?
How would you approach this problem?
In terms of version control system, we are using TFS, if it helps.
Sounds to me you would be better off with a DVCS (Distributed Version Control System) like Git, rather than TFS which has a centralised version control system.
TFS now integrated with Git, here is a good blog post which provides you with most of the details you would need - http://blogs.msdn.com/b/visualstudioalm/archive/2013/01/30/getting-started-with-git-in-visual-studio-and-team-foundation-service.aspx
Add an enterprise level Git Repository Management tool like Atlassian Stash and life will be sweet - http://www.atlassian.com/software/stash/overview
From a TFS server side...setup only 1 team project. This will be key. The other key is to have the server running SQL Server 2012 with SP1 (there's tons of perf improvements in SQL that will help you scale TFS).

Hosting NuGet repository via Apache / http server

Is there any way that I can setup and host a NuGet repository on an Apache or related http server? I have code that I would like made available, and it turns out that I have an apache server as well. I know that there are public places that I could publish to, but I was curious about my own. Any ideas? Is it possible?
If you need it i made a little nuget server with php. It works on apache with mod_rewrite and IIS: http://www.kendar.org/?p=/dotnet/phpnuget :)
I needed this recently too and have started implementing it at https://github.com/grenade/apache-nuget-repo
There are some limitations, like you can't push to it (yet?). To have that, it'd need some server side upload handler and that would mean picking a technology like PHP, Node, Python, etc which compromises the current simplicity. I also haven't made any effort yet around NuGet api v3 support.
Right now it relies on some other copy process uploading the .nupkg files and triggering the manifest and html generators.
There's nothing stopping you come creating a NuGet server that runs on Apache, but I don't think there's anything currently available that'll do this.
The command-line nuget.exe runs on Mono, but I suspect getting the ASP.NET NuGet server running is a whole new ballgame :-(

Could you use Nuget / OpenWrap to manage remote deployments?

I haven't thought this through to completion, but it seems that if nuget is a tool for managing the inclusion of packages in a known location, could it not be used as a deployment tool for web servers (a website being just a very large package itself)?
A service running on the web server would ping a nuget server for updates, and install them when available. There would have to be some additional management (recycling app pools, making sure that all your webservers don't update at the same time etc.), but I think it could work?
Any thoughts?
Yes that's definitly on the roadmap for openrasta/openwrap, so it's not a crazy idea. Some people already have done some of that work themselves.
This sort of thing is usually known as a Continuous Integration (CI for short) setup. You could probably cobble something together with Nuget but there are already some pretty good tools out there. Cruise and TFS to name a couple.
If you're looking for a mad scientist project though, carry on and let the community know what you come up with!

Best version control for a one man web app?

I'm just learning how to do things, and want to start using some sort of version control for a web app.
What's most appropriate for deploying a python or php web app on my own? I'm using linux and have a linux server.
Thanks!
SVN, but you need to be able to easily deploy your webapp with SVN.
Since it is not always a simple task, so I just point out this article which may be of interest for your project.
General principle:
Configure Apache on your development server so that it picks up your checked out working copies as separate subdomains. Using this, you can simply make a checkout of your project and it will automagically be up and running. No need to touch the Apache configuration. You need a DNS wildcard entry so that all subdomains of dev.example.org go to your development server.
The only problem with using the above Apache configuration locally is the DNS wildcard. Unless your desktop is assigned a hostname by your network's DNS server and you can set the wildcard there, you will have to make do with your localhost address. You can install dnsmasq to act as a local caching DNS server and put the wildcard on your own machine
Use dnsmasq so you can achieve the same effect on your own development machine. That way you can develop your web applications locally and you won't need a central development server. In my examples I will be assuming you use subversion for your version control, but it works virtually the same with other version control packages, such as git or bazaar.
Note: (Humor)
This other question on Subversion allowed me to point out to this article about publishing its (source-controlled) data into production, with in it probably the ugliest diagram I ever saw on the topic ;-)
If I had not bumped into git, I would've doubtless gone with SVN. Having said that, I would recommend git.
Nowadays, I would certainly go with a distributed version control system. Setup is faster since you don't need to set up a version control server and everything, all you usually need to do is initialize a certain directory within your development box for version control and you're good to go. They also seem like the way to go these days. If it were 2001, I would recommend a centralized system like Subversion. But it's 2008, everyone is moving to distributed systems and user interfaces and supporting tools tend to get better.
Here are some suggestions for you:
Darcs: Easy to learn and has all the features you will usually need
Mercurial
Git: Powerful. May take some time to understand but evolves rapidly
All three of them should be readily available in your Linux-based OS through the usual package management solutions.
SVN is great.
Nowadays the hype around DVCS.
I prefer Bazaar.
Because of it's name, the support, the feature set, and it works well on my window$ machine too.
I'm using unfuddle.com and I love it. It's free for a one person web app
The answer really depends on your way of thinking. I personally had problems switching to subversion from SourceSafe. If you come from microsoft shop, I'd suggest using SourceGear Vault, it is free for <=2 users. If you come from non microsoft area, then using subversion would be preferrable. Also please consider git if working on linux.
HTH, Valve.
Personally I use monotone, learning a DVCS is definitely the way forward.
For a one-man job, pretty much any revision control system will do the job. It's when you get into multiple people, and past that into multiple repositories, where there start to be differences.
Given that, I'd go with whatever Free Software system your development environment supports best. I see Subversion and Git mentioned and both are fine choices.
SVN would been my first choice. If I have to take a second choice I would go to CVS.
One of the most popular models out there today is Subversion. It's generally easy to setup & configure and is able to handle multiple platforms.
SVN. If one does not need concurrent access (which is your case), it is VERY easy to setup as no server is required at all. Definitely your weapon of choice.
I wholeheartedly agree with SVN. Command-line SVN is quite easy too.
While I like svn a lot, I've found mercurial handy for having the whole repository locally. (the same goes for git, but its interface is a little less polished in my opinion.)
I'm not able to answer the question as asked, because I don't develop on a Linux server.
But maybe this experience has a counterpart in Linux world.
I use a local-on-my-LAN-only IIS server (actually on an old laptop that no longer travels but works as a little server). I have VSS installed on that server too. There is an integration between the IIS Server, the FrontPage extensions on that server, and the VSS.
The upshot is that I can use FrontPage to build and edit my site and build a development image that is always backed up in VSS, and I can check out, check in, and do all of that from within FrontPage.
Now, the way I publish is I take advantage of the sharing capability of VSS so I have a deployment image that shares with the project that is actually an IIS web site. I have a deployment-image directory that I can transfer the latest checked-in material to (material that has not changed is not updated). I then deploy the deployment image to the hosted, public web site using FTP (again, only transfering new and updated files).
I present all of these details to suggest what might be the use-case of interest, even though a different solution approach is needed with Linux.
If I wasn't using a tool that integrated with the web server and also the source control at the server, I could do something similar by checking the VSS material in and out of a local directory and then pushing the updated VSS project to the IIS server web-pages directory hierarchy. The workflow is a little more clumsy. In this case, I would not edit pages directly on the development web server unless I could lock check-in pages as read-only or something.
Does this suggest anything that might be appealing in the Linux server case?
Definitively Mercurial is a good choice, quick, easy to use, perfect for working alone, or with multiple other developer, perfectly multiplateform, handles merges, branches, etc. very simply, plugin based, there are great tools out there such as nice IDE plugins (notably Netbeans and Eclipse).
Robust, it works just as you a expect such a tool to work, not like SVN (and I have years of day to day)...
Both Sun, Xen and Mozilla host all their repos on Mercurial. We're currently moving from SVN to Mercurial after a 6 month daily test, without any regret.
I once used Perforce and was impressed with it. There's GUI and command line versions and it supports Windows, Linux, Mac and Unix for both the server and client. It integrates with Eclipse and has APIs for writing your own client applications (C/C++, Ruby, Perl, Python) It only supports two users and five workspaces before you need to buy licenses though (but that is within the scope of this question).
Subversion is a good choice. For the client, there's TortoiseSVN (http://tortoisesvn.tigris.org/) that integrates with the shell and lets you do things with a right click on a folder. For integration with Visual Studio (I'll assume that's your environment) there's VisualSVN (http://www.visualsvn.com/) and AnhkSVN (http://ankhsvn.open.collab.net/). For the server there's a one-click installer you can find here (http://svn1clicksetup.tigris.org/) that does the setup in a snap. VisualSVN also has a (free) server that you can use which provides it's own web access and security (rather than using apache) and has a mmc-snapin for managing/creating repositories and users.
CVS - No, I'm not joking. Not that it is better (it is not) or the simplest (it isn't), but it really doesn't matter at the end of the day. The important thing is to get started with ANY version control system even if it is a one-developer shop, even if it is CVS.