Capistrano with Local (not file:///) repository

I’m developing an rails app. The SVN repository resides on a (Win 2k)
server on my company’s local intranet. The repository is accessed via
http (Apache + mod_dav_svn). From this machine, it is not a problem to
get out onto the Internet. However, coming in from the Internet is not
possible (at least, not without a VPN connection).

Given this, is it possible to use Capistrano to deploy my application
from the repository on the intranet to a production web server (a Linux
box) on the Internet (i.e. NOT connected to the intranet)?

I have root (on the Linux box) and Administrator (on the subversion
Win2K box) access, so my options are fairly flexible. Any thoughts are
quite welcome!

Thanks!

Hey Will,

AFIK, if the production server cant access the repository, then
deployment
wont be possible without some hackery. Everything that I can think of
(setting up a tunnel from production to repository) requires that you
have
to VPN in to the intranet.

If that is not a problem, then you can set up a tunnel from the
production
server to port 80 (or whatever Apache is sitting on) of the repository
through your local machine(once you VPNed in from the local machine,
ofcourse). Then you can set your repository path in your capistrano
recipe
as http://production_server:forwarded_port/repository/trunk

HTH
~Rohith

I thought VPN’ing might be a solution.

Another thought:

  • Export the app to a temp dir on my local workstation
  • SCP the contents of the temp export
  • Continue as normal (link current, etc.)

Perhaps I’ll look into this next week.

Rohith R. wrote:

Hey Will,

AFIK, if the production server cant access the repository, then
deployment
wont be possible without some hackery. Everything that I can think of
(setting up a tunnel from production to repository) requires that you
have
to VPN in to the intranet.

If that is not a problem, then you can set up a tunnel from the
production
server to port 80 (or whatever Apache is sitting on) of the repository
through your local machine(once you VPNed in from the local machine,
ofcourse). Then you can set your repository path in your capistrano
recipe
as http://production_server:forwarded_port/repository/trunk

HTH
~Rohith

I have a simple recipe for just this purpose at…

http://blog.wolfman.com/articles/2006/05/26/capistrano-local-deploy-recipe

oo, I like!

You could use zip instead of tar in this case on a windows box.

Cool!

Looks like I need to deploy from a *nix or OS X box, though, as tar
isn’t usually available on Windows systems.

That, or actually use my Cygwin install.

Thanks, Jim!

Jim M. wrote:

I have a simple recipe for just this purpose at…

Wolfmans Howlings