[Catalyst] Shared Host Setup

Jason Kohles email at jasonkohles.com
Wed Nov 21 01:29:14 GMT 2007

On Nov 20, 2007, at 5:28 PM, Matt S Trout wrote:

> 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.
Yeah, it's dog slow, but it's a wheel I didn't feel like re-inventing,  
and if you run it periodically (like nightly from cron) then it only  
has to download changes, which isn't quite so annoying.

> 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.
That's a decent approach too, which I may now use instead, since it's  
a better wheel I don't have to re-invent...  :)

>> 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 :)
Maybe, but it's fairly uncommon for me to go through all this just for  
one app anyway, usually it's setting up development servers, which  
means it's nice to have a full CPAN mirror instead of just the  
dependencies for that one app.

email at jasonkohles.com - http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire

More information about the Catalyst mailing list