[Catalyst] Shared Host Setup

Matt S Trout dbix-class at trout.me.uk
Tue Nov 20 22:28:05 GMT 2007


On Tue, Nov 20, 2007 at 04:34:54PM -0500, Jason Kohles wrote:
> 1. I run squid on my laptop, bound only to the localhost interface and  
> with ACLs that only allow localhost to use it as a general-purpose  
> proxy, then I login to the remote host with a port forward and run  
> cpanp (or cpan) with a proxy configuration...
> 
> 	ssh -R 3128:localhost:3128 server.address
> 	server% http_proxy=http://localhost:3128 cpanp
> 
> 2. If I'm at a client site where my laptop won't have outgoing access  
> either, then I run apache on the laptop, and use CPAN::Mini to make  
> myself a local mirror of CPAN before I go...
> 
> 	minicpan -l /var/www/html/minicpan -r http://some.cpan.mirror/
> 
> 	ssh -R 8080:localhost:80 server.address
> 	server% cpanp (and use http://localhost:8080/minicpan as the mirror  
> address)

the minicpan script is ass. But then it was written as an article, not as
a highly efficient piece of code.

http://trout.me.uk/perl/mirror.sh.txt

syncs a hell of a lot faster and makes two rsync connections rather than
a vast number of HTTP requests.
 
> 3. As a last resort, if the site is so paranoid that ssh forwarding is  
> locked down too, then I still have a fallback...
> 
> 	rsync -essh -avz /var/www/html/minicpan some.secure.host:minicpan

Meh. CPAN doesn't delete anything from ~/.cpan/sources, ever, normally. So
you start from an empty site_perl and an empty local::lib, wipe that, do
a 'make installdeps' on your app, verify it (this being essential to ensuring
you've got all the deps into Makefile.PL anyway), then you just rsync that up
and the CPAN.pm on the far end has the exact set of tarballs it needs.

Much more bandwidth efficient :)

-- 
      Matt S Trout       Catalyst and DBIx::Class consulting and support -
   Technical Director      http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.  Christmas fun in collectable card game form -
                           http://www.shadowcat.co.uk/resources/2007_trading/



More information about the Catalyst mailing list