You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Scott Brady <sb...@3creek.com> on 2005/11/29 20:47:32 UTC

Remote Deployment

I'm new to subversion, and I'm evaluating new versioning control systems
so we can get away from Visual Source Safe.  Because I'm coming from a
VSS background, I hope my questions make sense.

Our applications are all web apps.  Our setup is currently this:
-- Each developer has their own local working copy.
-- We have 2 internal servers where we put code for testing (one is a
dev server where we put code that's not ready for QA testing yet and the
other is a QA testing box).
-- We have an external staging server for final testing and client
acceptance.
-- We have an external production server with an obvious purpose.

Currently, using VSS, we would "Get Latest" to our internal servers and
FTP files from QA to Stage and from Stage to Production.  Along with the
myriad problems with VSS, that process is a bit klunky.

What we'd really like to do is to be able to send files from our
repository to not only our internal servers but also to the external
servers (essentially, doing a "Get Latest" or "Get" version).  I've been
searching on ways to do that using svn (both in the Subversion book and
through other online sources), and I don't know if I'm understanding if
it's possible and how.  But, I think two options are:

1) Using the Externals property and a post-commit hook -- but, if I
understand that correctly, that would require svn being installed on the
external servers(?).  And, because of our QA process, we wouldn't want
that to occur right after changes are committed.

2) Install an SVN client (such as TortoiseSVN) on the external servers,
the remote into those servers and essentially do an "Update local copy"
from our internal repository.

Are there other options? Is the post-commit hook different from the way
I'm interpreting it?

Thanks for any help!
 
----------------------------------
Scott Brady
Senior Developer
Triple Creek Associates
303.707.0300
800.268.4422



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Remote Deployment

Posted by Phil Endecott <sp...@chezphil.org>.
Scott Brady wrote:
> We have an external production server with an obvious purpose.
> Currently, using VSS, we would "Get Latest" to our internal servers and
> FTP files from QA to Stage and from Stage to Production.
> What we'd really like to do is to be able to send files from our
> repository to not only our internal servers but also to the external
> servers
> 2) Install an SVN client (such as TortoiseSVN) on the external servers,
> the[n] remote into those servers and essentially do an "Update local copy"
> from our internal repository.

Yes, that's probably the way to do it.
Some minor points are:
Being a working copy it will contain .svn directories; either configure 
the web server to hide them or do "export" each time rather than "update".
Updates are not atomic.  If this matters, i.e. you don't want the danger 
of broken pages being server even for a moment, update into a parallel 
directory and "flip a switch" somewhere (in Unix-land we have symlinks) 
to change over atomically.

You could use a post-commit hook to automate some of this, but I suggest 
that you don't try that until you have something working manually. 
Typically in your setup you would have a "deployed" branch, and after QA 
approval you'd copy the new content into this "deployed" branch.  The 
production server would have a checkout of only this branch, updated 
from the hook, so normal commits to the trunk and elsewhere don't change 
anything on the production server.

The hook script runs on the machine where the repository lives; if 
that's not the production server where the automatic update needs to 
happen, you need a remote command execution mechanism.  "ssh 
production_server -c svn update" might be all you need.

I don't see why you think you need svn:externals; I think you're 
misunderstanding something there.

--Phil.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org