Hosting NuGet repository via Apache / http server - nuget

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 :-(

Related

Getting started for team development

I want to start developing with a team using a Neo4j DB, a Spring Boot backend and an AngularJS frontend.
For that, I want to have a Maven Repository and a Jenkins.
To enable my team to use this, I want to have some kind of server at home that can provide remote (sequred) access to the Maven Repo, the Jenkins and the Neo4j DB and that can host the AngularJS frontend communicating with the Spring Backend.
I don't really know where to start. After some googling I found a NAS, but I'm not sure if they suit my requirements.
I've found tutorials for configuring a VPN but there may be a simpler way.
What would you recommend?
So, after some more asking around and googling if found 2 possible solutions, that i want to try out in the future:
First of seems to be the NAS (I've only read about Synology), although it not seems to be intended for my requirements. However there are packages available in the DiskStation OS that allow the installation of a Jenkins, a Maven Repo and Docker, allowing to host a Neo4j DB. I was told, I should be cautious, because only the "x86 diskstation supports docker". At this point I'm not too sure what this means, but since I'm posting an answer, I don't want to keep this knowledge for myself.
I didn't really find anything on hosting applications.
Second solution seems to be, to build a homeserver. In my current understanding, it should suffice to have a spare PC at home for that. All the steps involved should be available under here (german).
I didn't find anything about hosting applications here too, but since this is a "real" system, I'm pretty sure it's possible.
I'm going to try the second one out and keep you updated as far as I don't forget it :)

How can I automate Node.js deployments?

I'm looking for something analogous to Capistrano for Rails - https://github.com/capistrano/capistrano/wiki/
I'd like to be able to run a single command from my workstation that will update the code on my server(s) from a GitHub project and handle all necessary process restarting for the application. I need to be able to control specifically when this happens, not use a hook in GitHub's checkin event.
Are Node.js developers also using Capistrano, or is there a tool that works better for Node.js?
You could use fabric, it's a python lib. Nodejs already uses python for some build operations for extensions, no reason you couldn't also use python to do what you're asking.
http://docs.fabfile.org/en/1.2.2/index.html
I don't know of a javascript lib that does this, not to say there isn't one though. Fabric sounds very much like what capistrano is, but maybe a tiny bit different in some aspects.
Capistrano seems to be the most popular choice.

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!

Eclipse FTP "Team Plugin"

It seems to me from the following page
http://www.eclipse.org/eclipse/platform-team/target.php
and other pages like it. that there has been a robust, mature, properly integrated (and seemingly very smart) way to upload and synchronize files from an eclipse workspace with an FTP site for four to six years already.
It seams from that page and similar pages around the web that "The WebDAV and FTP plugins are built as part of the platform build" which to me in plain english would mean that if you have the core eclipse files you should already have it.
This is obviously not the case. you dont even have the plugins required to make basic ftp access unless you install it from a repository.
Not only is it not installed. it is not available from the default plugin repositries set up when you download eclipse.
Not only that but I could not even find the link to the repository anywhere.
RSE - which seams like a library out of the nineties with such limited functionality that shell clients writen for windows 3.1 could do more in less steps - has its plugin repository url posted in many places. but the team plugin has only links to CVS repositories of the source at best. even most of those are broken.
In conclusion.
Does anyone know how to install the "team" ftp client so that I can synchronize my content with FTP?
Well, here is an sftp plugin on sourceforge.
It is only about internal plugin defining a basic container for any ftp or webdav-based application.
You can see, when looking at:
the source of eclipse.ftp, that this is mainly an exception, some interfaces and a basic FTP container.
the sources of the target.ftp plugin, that that feature is here from more than 4 years, untouched, with basic functions only.
Only a more advance client like eclipse.team.ftp defines a client, but not on eclipse.team.ftp no more, since this is now the DSDP Target Management component which actually has developed a more advanced FTP/Webdav layer. It took over since 2006.
Ok, time for me to answer my own question.
No RSE does not do what org.eclipse.team.ftp was able to accomplish five years ago. Somehow that functionality never made it in. I have no idea why they dropped a perfectly logical solution in favor of the new backwards methodology.
However, visiting the site that #bmargulies recommended I realized that Jcraft still hosts the original FTP and WebDav Service for Team Services (upon which their sftp service is built)
So you can just point your eclipse install dialog at http://eclipse.jcraft.com/ and install the original plugin.
Good luck
I am also looking for this. Any solution for you yet?
This one also has been left dead and then excluded. :((
Team Synchronization on top of RSE
I guess there are still not enough Eclipse developers interested in it. Especially if one continue to see not only dead projects but even succesfull ftp-sync projects being shut out.
Really sad.

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.