views:

512

answers:

2

I have Subversion setup and running on my local network with windows and svnserve. I'd like to use Capistrano to deploy to a remote ubuntu server but am a bit on unsure on what I need to do to get the client end to work on windows. My understanding is that the remote server needs to be able to tunnel into my subversion server. I've read over a few tutorials but either they or I get all turned around about when they are talking about my local system, my svn server, or my remote system and of course almost none of them talk about capistrano and windows together.

Do I need to setup Apache to serve my subversion repository? I'd rather not but if I must what are the steps?

I found this tutorial but I have no idea if it will enable ssh access to the repository

A: 

I'm not a Windows person, but my understanding is that in Capistrano's normal state, it executes all of its commands on the server. That is why it needs to be able to pull the code via SVN from your machine.

Looking at that tutorial, it appears as though it is using Apache as the mechanism to allow a client(in this case Capistrano) to pull source code from your Windows machine. This will work for what you want to do.

You don't have to setup Apache in order to accomplish this, you could probably setup an SSH server on your Windows machine, though that is out of my realm of knowledge. :-)

hernan43
+2  A: 

You could try having capistrano checkout your code locally, zip and send it to the server. This isn't as efficient has having the server access svn because it has to send the entire codebase every time, but it will save you the trouble of exposing your repository to the outside.

From this page on the capistrano website, under Deployment Strategies:

set :deploy_via, :copy
set :copy_strategy, :export
set :copy_compression, :zip

You will need a command line zip utility available to make this work. The Info-Zip FTP site has one available.

Jeff Dallien
You're missing a comma after deploy_via but otherwise this is just the tip I needed about 4 hours ago. Thanks.
srboisvert
Actually, fails anyway. Bug in capistron flipping the \'s around to /'s and causing svn to fail on the export (though they are the correct way around for svn in the -info call. go figure)
srboisvert