public
Description: A custom capistrano deploy strategy that creates a SVN export in a shared location.
Clone URL: git://github.com/metaskills/remote_shared_cache.git
metaskills (author)
Tue Mar 18 06:15:33 -0700 2008
commit  07103378dd543e0a1b904d30d1a5ce48bb860ef9
tree    5c19ce82103f04a8de5b51bb25fcc5c2ddd23501
parent  11da2cf10ee050634f3c3c81b2b739ff1a0a3a0c
name age message
file README Tue Mar 18 06:13:32 -0700 2008 Updating the README a bit. [metaskills]
file remote_shared_cache.rb Tue Mar 18 06:15:33 -0700 2008 Updating the README a bit. [metaskills]
README
Copyright 2008 Ken Collins, Decisiv Inc.
Distributed via MIT license
Feedback appreciated: kcollins at [nospam] decisiv dt net

This class greatly speeds up deploy times to multiple hosts by only updating your latest source code to a 
shared drive on a single host. If you have 5 app servers then the code update only happens with the primary 
or first server while all others use the shared cache to copy from. The remote cache is a SCM export 
created in one of the following two ways.

  1) If :remote_repository_access is not set or is false, a local export is made, compressed
     and copied to the target host and uncompressed to the remote shared cache.
  2) If :remote_repository_access returns true, the target host will perform a direct SCM 
     export to the remote shared cache.

Despite which method is used above, the creation of the remote shared cache will only target the primary 
app server using the primary_app_server() method. Again all other app targets assume that this is a 
shared directory accessbile to all. This yeilds faster deployments since capistrano does not have to 
locally prepare/compress/copy the source to each host.

This development strategy inherets from the normal Copy deployment strategy and uses many of the same 
metods/configurations available to that class when needing to perform local export and copy of the source.
Examples include, :copy_compression, :copy_remote_dir, :copy_dir. Configurations specific to this strategy 
includes, :shared_cache_dir (parent of all cached revisions) and :remote_repository_access (which determins 
what method is used above to create the shared cache).