Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Catalyst: Users

how do you distribute a catalyst app

 

 

Catalyst users RSS feed   Index | Next | Previous | View Threaded


pbruna at it-linux

Jun 10, 2009, 7:52 AM

Post #1 of 19 (1520 views)
Permalink
how do you distribute a catalyst app

wich methods do you use to distribute a catalyst application from on box to another.
and suposse this box has diferent operating system, i ment one has suse and the other redhat.
what are you recomendations


------------------------------------
Patricio Bruna V.
IT Linux Ltda.
http://www.it-linux.cl
Fono : (+56-2) 333 0578
IT Linux en Facebook


bobtfish at bobtfish

Jun 10, 2009, 9:15 AM

Post #2 of 19 (1472 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

Patricio A. Bruna wrote:
> wich methods do you use to distribute a catalyst application from on box
> to another.
> and suposse this box has diferent operating system, i ment one has suse
> and the other redhat.
> what are you recomendations

Don't do that.

Having an app balanced across two totally dissimilar boxes is going to
cause you more issues than across two similar boxes, so I'd just avoid
it if possible.

If not possible, then I guess distro style packages of all your
dependencies would be the way to go.

Cheers
t0m

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


pbruna at it-linux

Jun 10, 2009, 9:40 AM

Post #3 of 19 (1471 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

Maybe i explain wrong.
I did not mean load balance, i meant deployment.
i develop my app on my box, and then i need to deploy it on the production server, with the same operating system. downloading all the modules from cpan is time consuming, are any better way?


------------------------------------
Patricio Bruna V.
IT Linux Ltda.
http://www.it-linux.cl
Fono : (+56-2) 333 0578
IT Linux en Facebook


----- "Tomas Doran" <bobtfish[at]bobtfish.net> escribió:
> Patricio A. Bruna wrote:
> > wich methods do you use to distribute a catalyst application from on box
> > to another.
> > and suposse this box has diferent operating system, i ment one has suse
> > and the other redhat.
> > what are you recomendations
>
> Don't do that.
>
> Having an app balanced across two totally dissimilar boxes is going to
> cause you more issues than across two similar boxes, so I'd just avoid
> it if possible.
>
> If not possible, then I guess distro style packages of all your
> dependencies would be the way to go.
>
> Cheers
> t0m
>
> _______________________________________________
> List: Catalyst[at]lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>


bobtfish at bobtfish

Jun 10, 2009, 9:41 AM

Post #4 of 19 (1471 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

Patricio A. Bruna wrote:
> Maybe i explain wrong.
> I did not mean load balance, i meant deployment.
> i develop my app on my box, and then i need to deploy it on the
> production server, with the same operating system. downloading all the
> modules from cpan is time consuming, are any better way?

Yes.

Use a self contained local::lib. Bootstrap local::lib (see the docs),
then, from inside your MyApp directory:

eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib--self-containted,local_lib)
make installdeps

And you'll then have all the dependencies for your app (given you listed
them in Makefile.PL) built for you, inside your app directory, where you
can add them to revision control.

I generally have a per-app local::lib, and a couple of trivial shell
scripts I put in the scripts/ directory which can give you a shell with
the environment setup correctly to see this local::lib etc..

Then pushing a new version of your application (and all your
dependencies) is just a case of rsyncing your app up to your web server :)

Cheers
t0m

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


orasnita at gmail

Jun 10, 2009, 10:14 AM

Post #5 of 19 (1472 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

From: "Tomas Doran" <bobtfish[at]bobtfish.net>
> Patricio A. Bruna wrote:
>> Maybe i explain wrong.
>> I did not mean load balance, i meant deployment.
>> i develop my app on my box, and then i need to deploy it on the
>> production server, with the same operating system. downloading all the
>> modules from cpan is time consuming, are any better way?
>
> Yes.
>
> Use a self contained local::lib. Bootstrap local::lib (see the docs),
> then, from inside your MyApp directory:
>
> eval
> $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib--self-containted,local_lib)
> make installdeps
>
> And you'll then have all the dependencies for your app (given you listed
> them in Makefile.PL) built for you, inside your app directory, where you
> can add them to revision control.
>
> I generally have a per-app local::lib, and a couple of trivial shell
> scripts I put in the scripts/ directory which can give you a shell with
> the environment setup correctly to see this local::lib etc..
>
> Then pushing a new version of your application (and all your dependencies)
> is just a case of rsyncing your app up to your web server :)
>
> Cheers
> t0m
>

I think it could be very helpful to add these details on the "Deployment"
page of the wiki.

BTW, regarding local::lib, does anyone know how can I force install a module
that gives an error under Windows when I use it?

Thanks.

Octavian




_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


hdp.perl.catalyst.users at weftsoar

Jun 10, 2009, 10:22 AM

Post #6 of 19 (1469 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

On Wed, Jun 10, 2009 at 08:14:10PM +0300, Octavian Râşniţă wrote:
> BTW, regarding local::lib, does anyone know how can I force install a
> module that gives an error under Windows when I use it?

The same way you force install anything using the CPAN shell.

CPAN> force install Some::Module

hdp.

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


joel at fysh

Jun 10, 2009, 10:25 AM

Post #7 of 19 (1470 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

On 10 Jun 2009, at 18:14, Octavian Râşniţă wrote:
> BTW, regarding local::lib, does anyone know how can I force install
> a module that gives an error under Windows when I use it?

Why would you do that? If the module you're installing fails its
tests, you should file a bug report. What kind of error? IME you
shouldn't ever want to or need to force install a module. This should
be a *colossal* red flag to you.

Are you prepared to deploy code built in a house-of-cards manner on
modules with bugs so grave they fail the author's tests on your
platform? This ought to scare you.

In any case, force installing a CPAN module in the CPAN shell should
be no different whether you're using a local::lib or not. Can you
describe the issue you're seeing? If it _is_ different, file a bug!

/joel



_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


swatt at infobal

Jun 10, 2009, 10:55 AM

Post #8 of 19 (1471 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

> Why would you do that? If the module you're installing fails its
> tests, you should file a bug report. What kind of error? IME you
> shouldn't ever want to or need to force install a module. This should
> be a *colossal* red flag to you.
>
> ...
>
> /joel
It is very possible that the tests fail because the tests are wrong, not
the module. I use a Perl that does not have fork emulation on Windows,
partly for performance. Many tests assume fork, even where the modules
they are testing do not depend on it. Yes, these modules should be
reported, but you don't need to wait for a new release, nor is the
module necessarily compromised. Authors cannot always test on a wide
range of platforms. I find a good few modules fail tests for
system/platform reasons rather than because of bugs in the code.

Modules I know fail on Windows without fork but generally don't care
include: DBD::mysql, Test::NoWarnings, WWW::Mechanize,
HTTP::Server::Simple, Cache::Cache, and DBD::SQLite. Most of these have
tests that assume fork. Some get caught by file system differences and
permissions differences.

You might have a wider concern if you are using a "standard" build (if
such a thing exists) but it is at least sometimes justifiable to look
through the tests that fail and make a judgment call.

--S
--
Stuart Watt
ARM Product Developer
Information Balance


orasnita at gmail

Jun 10, 2009, 12:31 PM

Post #9 of 19 (1469 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

From: Stuart Watt
Why would you do that? If the module you're installing fails its tests, you should file a bug report. What kind of error? IME you shouldn't ever want to or need to force install a module. This should be a *colossal* red flag to you.

...

/joel

It is very possible that the tests fail because the tests are wrong, not the module. I use a Perl that does not have fork emulation on Windows, partly for performance. Many tests assume fork, even where the modules they are testing do not depend on it. Yes, these modules should be reported, but you don't need to wait for a new release, nor is the module necessarily compromised. Authors cannot always test on a wide range of platforms. I find a good few modules fail tests for system/platform reasons rather than because of bugs in the code.

Modules I know fail on Windows without fork but generally don't care include: DBD::mysql, Test::NoWarnings, WWW::Mechanize, HTTP::Server::Simple, Cache::Cache, and DBD::SQLite. Most of these have tests that assume fork. Some get caught by file system differences and permissions differences.

You might have a wider concern if you are using a "standard" build (if such a thing exists) but it is at least sometimes justifiable to look through the tests that fail and make a judgment call.

--S

--
Stuart Watt
ARM Product Developer
Information Balance


Hi,



Sometimes I see that I can't install some perl modules, but then I found a ppm package that can be installed, and that module has the same version as the ones I couldn't install using the cpan shell.



So probably the tests are done wrong.



Some tests (like the one for DBD::SQLite) also crash the perl interpreter, not only that the tests don't succeed.



And as you said, most of the tests use fork and then I know why they are not working under Windows.



If we need to deploy a Catalyst app under Linux, is not so hard to install modules from CPAN using the cpan shell, but it might be very hard to install some modules under Windows, so it would be very good if we could use local::lib to pre-install the necessary modules.



And regarding my question, in local::lib's POD, I read that:



From the shell -

perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::install(LWP)'



Where in this command line can I add the "force" parameter, or is there another way of installing perl modules in the local directory?



And, another question:

Can we deploy an app that uses local::lib without having shell access but only ftp access if local::lib is not installed?

(It would be interesting to know, although I never needed it until now.)



Thanks.



Octavian


orasnita at gmail

Jun 10, 2009, 12:33 PM

Post #10 of 19 (1468 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

From: "Hans Dieter Pearcey" <hdp.perl.catalyst.users[at]weftsoar.net>
> BTW, regarding local::lib, does anyone know how can I force install a
> module that gives an error under Windows when I use it?

The same way you force install anything using the CPAN shell.

CPAN> force install Some::Module

When using this syntax, where can I specify the local path where I want to
install the Some::Module?

Thanks.

Octavian


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


hdp.perl.catalyst.users at weftsoar

Jun 10, 2009, 12:58 PM

Post #11 of 19 (1469 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

On Wed, Jun 10, 2009 at 10:33:26PM +0300, Octavian Râşniţă wrote:
> When using this syntax, where can I specify the local path where I want
> to install the Some::Module?

You never do that with local::lib. It sets up the env variables for you
(PERL_MM_OPT and MODULEBUILDRC) -- CPAN.pm doesn't know anything about it.

hdp.

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


orasnita at gmail

Jun 11, 2009, 7:18 AM

Post #12 of 19 (1414 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

From: "Hans Dieter Pearcey" <hdp.perl.catalyst.users[at]weftsoar.net>On Wed,
Jun 10, 2009 at 10:33:26PM +0300, Octavian Râşniţă wrote:
> > When using this syntax, where can I specify the local path where I want
> > to install the Some::Module?

> You never do that with local::lib. It sets up the env variables for you
> (PERL_MM_OPT and MODULEBUILDRC) -- CPAN.pm doesn't know anything about it.
> hdp.

I read in the POD of local::lib that I can specify the local path where the
modules are installed ('my_lwp'):

# Install LWP and it's missing dependencies to the 'my_lwp' directory
perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::install(LWP)'

When using this syntax for installing modules in the directory 'my_lwp' I
don't know how I can specify the "force" parameter of the cpan shell.

Thanks.

Octavian




_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


bobtfish at bobtfish

Jun 11, 2009, 7:49 AM

Post #13 of 19 (1411 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

Octavian Râşniţă wrote:
> When using this syntax for installing modules in the directory 'my_lwp'
> I don't know how I can specify the "force" parameter of the cpan shell.

perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::force(qw/install LWP/)'

Cheers
t0m


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


orasnita at gmail

Jun 11, 2009, 11:23 AM

Post #14 of 19 (1407 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

From: "Tomas Doran" <bobtfish[at]bobtfish.net>
Octavian Râşniţă wrote:
> When using this syntax for installing modules in the directory 'my_lwp' I
> don't know how I can specify the "force" parameter of the cpan shell.

perl -MCPAN -Mlocal::lib=my_lwp -e 'CPAN::force(qw/install LWP/)'

Cheers
t0m

Thank you. local::lib seems to work fine, but not always:

perl -MCPAN -Mlocal::lib=support -e "CPAN::install(HTML::FormFu)"

The result:

Database was generated on Thu, 11 Jun 2009 17:08:37 GMT
HTML::FormFu is up to date (0.05000).

But HTML::FormFu is not installed under the "support" path.

Sometimes I succeed to install some of the modules if I add the
parameter --self-contained, but sometimes I can't because some dependencies
are not installed automaticly, or some modules give very many errors like
the case of Moose:

Failed 185/213 test programs. 20/536 subtests failed.

(This error is given when I try to install Moose using the standard cpan
command line also.)

Octavian


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


hdp.perl.catalyst.users at weftsoar

Jun 11, 2009, 11:31 AM

Post #15 of 19 (1410 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

On Thu, Jun 11, 2009 at 09:23:41PM +0300, Octavian Râşniţă wrote:
> perl -MCPAN -Mlocal::lib=support -e "CPAN::install(HTML::FormFu)"
>
> The result:
>
> Database was generated on Thu, 11 Jun 2009 17:08:37 GMT
> HTML::FormFu is up to date (0.05000).
>
> But HTML::FormFu is not installed under the "support" path.

Because it's already installed somewhere else, and you didn't use
--self-contained.

> Failed 185/213 test programs. 20/536 subtests failed.
>
> (This error is given when I try to install Moose using the standard cpan
> command line also.)

This isn't an error, this is a summary. No one can help you fix the problem if
all you give is the summary instead of the actual error log. Nopaste, or
attach, or something?

hdp.

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


orasnita at gmail

Jun 11, 2009, 12:46 PM

Post #16 of 19 (1407 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

From: "Hans Dieter Pearcey" <hdp.perl.catalyst.users[at]weftsoar.net>
> Failed 185/213 test programs. 20/536 subtests failed.
>
> (This error is given when I try to install Moose using the standard cpan
> command line also.)

This isn't an error, this is a summary. No one can help you fix the problem
if
all you give is the summary instead of the actual error log. Nopaste, or
attach, or something?
hdp.

I discovered the problem. Moose requires a newer version of Class::MOP than
the one I had it installed.

I don't know why cpan didn't try to install the newer version, because I've
seen that the newer version was required in the Makefile.PL.

But now installs fine after manually installing Class::MOP.

Octavian


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


hdp.perl.catalyst.users at weftsoar

Jun 11, 2009, 12:53 PM

Post #17 of 19 (1408 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

On Thu, Jun 11, 2009 at 10:46:49PM +0300, Octavian Râşniţă wrote:
> I discovered the problem. Moose requires a newer version of Class::MOP
> than the one I had it installed.
>
> I don't know why cpan didn't try to install the newer version, because
> I've seen that the newer version was required in the Makefile.PL.
>
> But now installs fine after manually installing Class::MOP.

CPAN.pm using CPAN::SQLite had some inconsistent behavior with following
dependencies until the last version or so. Maybe you got bit by this?

hdp.

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


orasnita at gmail

Jun 11, 2009, 10:43 PM

Post #18 of 19 (1386 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

From: "Hans Dieter Pearcey" <hdp.perl.catalyst.users[at]weftsoar.net>
On Thu, Jun 11, 2009 at 10:46:49PM +0300, Octavian Râşniţă wrote:
> I discovered the problem. Moose requires a newer version of Class::MOP
> than the one I had it installed.
>
> I don't know why cpan didn't try to install the newer version, because
> I've seen that the newer version was required in the Makefile.PL.
>
> But now installs fine after manually installing Class::MOP.

CPAN.pm using CPAN::SQLite had some inconsistent behavior with following
dependencies until the last version or so. Maybe you got bit by this?
hdp.

Aha, that might be the problem because I installed that plugin for CPAN that
uses a local database.

I tried for more times to install the newer version of CPAN, but each time
I've done this, CPAN gave errors when trying to install a module with it, so
I let the version that came with the ActivePerl distribution.

Anyway, I found another problem that disallow me to install some modules
with CPAN. Some tests stop the execution and wait forever.
In cases like this I used to install the ppm version of those modules, but
now if I want to use local::lib I need to manually install those modules and
specify the prefix when doing perl Makefile.PL.

Could it be possible to use local::lib and specify that I want to skip the
tests for the current module?

Octavian


_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


hdp.perl.catalyst.users at weftsoar

Jun 11, 2009, 10:59 PM

Post #19 of 19 (1388 views)
Permalink
Re: how do you distribute a catalyst app [In reply to]

On Fri, Jun 12, 2009 at 08:43:08AM +0300, Octavian Rasnita wrote:
> Could it be possible to use local::lib and specify that I want to skip the
> tests for the current module?

This also doesn't have anything to do with local::lib. Look for 'notest' in
the CPAN.pm docs.

(This is a potentially bad idea for all the same reasons 'force' is.)

local::lib has nothing to do with how CPAN.pm behaves. Any questions you have
about "how can I do X while using CPAN.pm" should be looked up in the CPAN.pm
documentation.

local::lib sets environment variables that Module::Build and
ExtUtils::MakeMaker use to determine what directory they should go into, and
for perl to add extra paths to @INC, and corresponding variables for both
inside a Perl process that you use it in. That's all. You seem to have the
impression that it touches much more than it actually does, and I think you'll
be less confused and have an easier time answering your own questions if you
understand local::lib's scope.

hdp.

_______________________________________________
List: Catalyst[at]lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst[at]lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Catalyst users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.