[Catalyst] Here's my shot at an app to install Catalyst Dependencies

Peter Edwards peterdragon at users.sourceforge.net
Thu Feb 9 15:02:45 CET 2006


Hi john,

>I know this shell script is a brain dead way to do
>this, so I am looking for suggestions on how to
>improve it.  What I'd like to have in the end is an
>application that would perform a "Catalyst
>Certification" on a given machine to make sure it has
>everything you need to install Catalyst.

I've been down this road before for an OpenInteract mod_perl app and have a
script that's close:
http://perl.dragonstaff.co.uk/om-0.2/
You could tweak that to make a Catalyst app installer for Unix.

There are two types of install here, one for developers, and one for
releasing to customers. The developer one should work on as many platforms
as possible and 'cpanp i Task::Catalyst' covers Unix. For Windows you could
use cygwin or an ActiveState PPM bundle.
 
The customer installer needs to be specific as to platform, database
version, web server, CPAN and RPM module versions, otherwise customers are
on different kit and support is a nightmare. The install builder needs to
run using its own copy of RPM/CPAN archives (in case no net access inside a
customer firewall) and install to its own tree, preferably below somewhere
like /opt/myapp-x.xx on Linux. Then you can tar up that directory and use it
as a binary install.
To give some metrics, I had it down to 30 minutes for an anaconda/kickstart
installation of RHEL, then 50 minutes for a build (mostly doing CPAN makes)
or < 5 minutes for a binary install from a 75MB archive, then running a
utility for a few manual settings. The whole lot went easily into an ISO and
onto CD for on-site use.

I put the stripped down sample installer here
http://perl.dragonstaff.co.uk/om-0.2/
The script ominstall.pl does some bootstrapping, then lets you run one of a
number of phases, each of which has a function run_<phasename>. You can list
these with 'ominstall -l'. These cover things like building Apache front and
back end, installing RPMs, setting up MySQL, installing CPAN modules.
Required packages are defined in new() and any magic needed to install CPAN
modules is specified there. E.g. cpan_bundle_oi_pkgs where an array entry
means a simple make-make test-make install, and a hash entry means a custom
install where you can specify preparatory commands, PREFIX or basedir and
whether to skip 'make test' (some modules won't install otherwise).

To work on it you need a virtual host utility like VMWare so you can quickly
go back to a fresh install of Linux, re-run it then verify the web app comes
up okay. No small job...

Regards,
Peter

-----Original Message-----
From: catalyst-bounces at lists.rawmode.org
[mailto:catalyst-bounces at lists.rawmode.org] On Behalf Of John Napiorkowski
Sent: 09 February 2006 09:17
To: The elegant MVC web framework
Subject: [Catalyst] Here's my shot at an app to install Catalyst
Dependencies

I worked out a good portion of the dependencies (and
their required install order) in order to get the bulk
of Task::Catalyst to install on a newly compiled perl
5.8.7 installation.  I also created my first shot at a
shell script that installs all this stuff in a
(mostly) error free way.

As I mentioned in a past post, perl 5.8.8 has some
changes that prevents some of the modules you need
from installing without force, and my goal is to
create a way of setting up everything you need without
force or hacking.

Right now the attached shell script will install
pretty much everything without prompting you for
dependent modules.  For any of the prompts for things
like LWP or CPANPLUS you can just accept all the
defaults.  There are one or two strange cases where I
can't get a module to install using the method in my
shell script, so you get prompted to download and
install it, but if you do that it should work without
any trouble.  Here are the trouble modules:

Compress::Zlib
UNIVERSAL::isa
UNIVERSAL::can

After you run this script, assuming your perl
installation is pretty normal and that you have all
the standing stuff you need, like gcc and the glibc
headers, you can just install Catalyst.

You can also install Task::Catalyst but there are some
troubles remaining.  You have to skip the XMLRPC stuff
because I didn't work out the XML dependencies.  I
didn't do this because some of the require certain
third party C are needed and writting a script to
download and install these are not something I have
time to do right now :)

I know this shell script is a brain dead way to do
this, so I am looking for suggestions on how to
improve it.  What I'd like to have in the end is an
application that would perform a "Catalyst
Certification" on a given machine to make sure it has
everything you need to install Catalyst.

Anyway, let me hear from you if this is something you
all find useful.  If so please send me bug reports. 
Also please let me know if you all think something
like this just go in the Wiki to help others with
installation troubles.

Thanks to people that suggested Devel:Deps and
CPAN::Unwind as a way to help trace the dependencies.

--john

 




More information about the Catalyst mailing list