Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-11 Thread Alejandro Imass
On Sun, Mar 10, 2013 at 4:20 PM, Tomas Doran bobtf...@bobtfish.net wrote:

 On 8 Mar 2013, at 04:57, Francisco Obispo fobi...@isc.org wrote:

 They are installed by default under the lib/ directory, I'm not a big fan of 
 that setup,

 Nobody is a big fan of this setup.


I don't think the problem is so much the destination of the lib files.
IMHO they should be installed in the local or site perl directories
amongst any other local CPAN modules.

Where I see the problem is that the current installation ignores all
non-library files completely (the app root directory and the config
file), plus any other data files the app should need.

 This pre-dates Module::ShareDir.


So the templates, images (i.e. the /root) are considered shared data?

And the configuration file should go for example in /etc in Debian and
/usr/local/etc on FBSD??

And if the app needs some other files for example a sqllite db file,
where would those go? /var/lib/db ?
How about Windows, how does work there?


--
Alejandro Imass

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


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-11 Thread Bill Moseley
On Mon, Mar 11, 2013 at 1:29 PM, Alejandro Imass
alejandro.im...@gmail.comwrote:



  This pre-dates Module::ShareDir.
 

 So the templates, images (i.e. the /root) are considered shared data?


When I was converting our Catalyst apps to use Dist::Zilla I looked at
changing where Catalyst looks for /root -- just so I could use
Module::ShareDir (supported by Dist::Zilla) and not have to rewrite
Module::Install::Catalyst.

I think I had some discussion of these back in July:
http://www.mail-archive.com/catalyst@lists.scsys.co.uk/msg13186.html

In the end I did implement the code to copy in the /root (and other files
and dirs) into blib just like Module::Install::Catalyst does.

And the configuration file should go for example in /etc in Debian and
 /usr/local/etc on FBSD??


We deploy with RPM.

FWIW, this is something we discussed at work quite a bit.  Operations
wanted config in standard location, but we wanted config with the
application.  In general, of our config is more constants that config and
so there's rarely changes to our app config.  Plus, having config with the
app makes it a bit easier to have multiple copies installed.  (In the past
used symlinks to point to live version.)

In other words, the bulk of our config is more like static data, so placing
in share would be ok.

What we did in the end to make the site operations team happy was update
our config system to look in /etc/$app_name/config.yml for an extra config
file that would override (merge with) the app's config.

Our config loads config.yml filrst, then it loads and merges any
mode-specific (i.e. qa, staging, production) config, then finally looks for
/etc/$app_name/config.yml.

Some day we will look more closely at centralized configuration tools --
Puppet and Chef, for example.

-- 
Bill Moseley
mose...@hank.org
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-10 Thread Tomas Doran

On 8 Mar 2013, at 04:57, Francisco Obispo fobi...@isc.org wrote:

 They are installed by default under the lib/ directory, I'm not a big fan of 
 that setup,

Nobody is a big fan of this setup.

This pre-dates Module::ShareDir.

If someone was to fix things such that new applications installed their stuff 
to the correct Module::ShareDir location, and we (i.e. Runtime) fell back to 
looking under lib/ also (for compat with older applications which hadn't been 
re-installed), then this would get a ++ from me!

I don't think the involved (code) changes are actually particularly hard, just 
nobody has hated it quite enough to fix it.

 so what we usually do (in debian), we setup a custom package that does the 
 magic that we need, including the nginx setup, etc.

I assume you're using 'we' to mean the debian perl team, so I'm cling y'all in, 
sorry!

If debian have a standard way of making this less retarded, then we'd entirely 
love to evaluate that as a downstream patch / thing we can work together to fix.

Exactly where do you relocate things and how does it fit into the toolchain 
(i.e. does this fit to what File::ShareDir does, and if not - why not?)

Cheers
t0m


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


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-10 Thread Francisco Obispo
Yes,

By we I mean: Internet Systems Consortium (ISC), internal applications.

We use debian in some of our platforms, and we package our software into a 
private repo.

Apologies for the confusion ;-)

On Mar 10, 2013, at 3:00 PM, gregor herrmann gre...@debian.org wrote:

 I'm not aware of anything like this in Debian's catalyst package; so
 I guess Francisco meant running under Debian. Sorry :)
 
 
 Cheers,
 gregor (Debian Perl Group)

Francisco Obispo 
Director of Applications and Services - ISC
email: fobi...@isc.org
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
PGP KeyID = B38DB1BE


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


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-08 Thread Bill Moseley
On Thu, Mar 7, 2013 at 8:57 PM, Francisco Obispo fobi...@isc.org wrote:


 Module::Install lets you do some limited configuration, but if you're
 looking to customize it, you're better off with a custom distribution
 package.


A bit off the topic, but I've been using Dist::Zilla to help package
Catalyst apps.   My favorite features are auto versioning, managing the
Changes file, and automatic dependency creation.  And, of course, having a
custom PluginBundle that centralizes how we build distributions.   Perhaps
not for everyone, but worth a look.  Check out the Dist::Zilla::Plugins on
CPAN.

But the end result is still just a normal Perl module.   All our modules
(Catalyst and others) use Dist::Zilla now.

I have a Dist::Zilla::Plugin::CatalystFiles that helps build the dist and
builds a custom Makefile.PL.


-- 
Bill Moseley
mose...@hank.org
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-08 Thread Alejandro Imass
On Fri, Mar 8, 2013 at 3:24 AM, Bill Moseley mose...@hank.org wrote:


 On Thu, Mar 7, 2013 at 8:57 PM, Francisco Obispo fobi...@isc.org wrote:



Thanks to both of you for your valuable insight.

We've also looked at the PAR route. Up until now we've always
installed manually and only used the Makefile to keep track of
dependencies and easier installs of them, but we've never used it to
install the app as such. We are currently deploying a beautiful code
and we wanted to do it end-to-end including the make install. We're
going to experiment with this first and then analyze all other
options.

Again, thanks for your comments and will keep posted to close the thread.

--
Alejandro Imass

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


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-08 Thread Bill Moseley
On Fri, Mar 8, 2013 at 1:43 PM, Alejandro Imass
alejandro.im...@gmail.comwrote:

 Thanks to both of you for your valuable insight.

 We've also looked at the PAR route. Up until now we've always
 installed manually and only used the Makefile to keep track of
 dependencies and easier installs of them, but we've never used it to
 install the app as such. We are currently deploying a beautiful code
 and we wanted to do it end-to-end including the make install. We're
 going to experiment with this first and then analyze all other
 options.


Just to add a bit:

As you know, Catalyst is like any other Perl module.  So, we deploy our
Catalyst apps to an internal DarkPAN along with all our other internal
modules.

What that means is on a new machine (with a few environment variables set)
you can type:

   cpanm Our::Catalyst::App

and it an all its dependencies are installed.  So, that Makefile actually
comes in pretty handy.

(And since we use Dist::Zilla, releasing to our internal CPAN is just dzil
release.  So, that's pretty slick.)

We then build RPMs from these modules and that's what is used for
deployment.



-- 
Bill Moseley
mose...@hank.org
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Dist::Zilla and Catalyst (Was: [Catalyst] Using the Catalyst Makefile to install

2013-03-08 Thread Greg Matheson
On Fri, 08 Mar 2013, Bill Moseley wrote:

 A bit off the topic, but I've been using Dist::Zilla to help package
 Catalyst apps.   My favorite features are auto versioning, managing the
 Changes file, and automatic dependency creation.  And, of course, having a
 custom PluginBundle that centralizes how we build distributions.   Perhaps
 not for everyone, but worth a look.  Check out the Dist::Zilla::Plugins on
 CPAN.

 But the end result is still just a normal Perl module.   All our modules
 (Catalyst and others) use Dist::Zilla now.

 I have a Dist::Zilla::Plugin::CatalystFiles that helps build the dist and
 builds a custom Makefile.PL.

That appears to be a different module than the 
Dist::Zilla::Plugin::Catalyst on CPAN.

http://www.xenoterracide.com/2010/06/announcing-distzillaplugincatalyst.html
http://search.cpan.org/~xeno/Dist-Zilla-Plugin-Catalyst-0.15/lib/Dist/Zilla/Plugin/Catalyst.pm

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


[Catalyst] Using the Catalyst Makefile to install

2013-03-07 Thread Alejandro Imass
Hi,

What is the canonical way to use the provided Makefile to deploy
Catalyst apps. Up until now I've only used to mainatin the
dependencies and use make and make test but I have never used make
install.

I read through the Makefile and it's obvious that it will install all
modules where they belong, but where do the resto of the files go??
Example, the /root directory, the config file, etc.

Is there a document that talks about this?

Thanks,

--
Alejandro Imass

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


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-07 Thread Francisco Obispo
The installer uses Module::Install

So basically:

1) lib/ is installed in: /usr/local/lib/perl5
2) script/* becomes /usr/local/bin/*
3) man pages are usually installed in /usr/local/share/man/man3/

etc.

perldoc Module::Install for more info ;-)


dh-make-perl if you want to make a debian/ubuntu package



On Mar 7, 2013, at 2:56 PM, Alejandro Imass alejandro.im...@gmail.com wrote:

 Hi,
 
 What is the canonical way to use the provided Makefile to deploy
 Catalyst apps. Up until now I've only used to mainatin the
 dependencies and use make and make test but I have never used make
 install.
 
 I read through the Makefile and it's obvious that it will install all
 modules where they belong, but where do the resto of the files go??
 Example, the /root directory, the config file, etc.
 
 Is there a document that talks about this?
 
 Thanks,
 
 --
 Alejandro Imass
 
 ___
 List: Catalyst@lists.scsys.co.uk
 Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
 Dev site: http://dev.catalyst.perl.org/

Francisco Obispo 
Director of Applications and Services - ISC
email: fobi...@isc.org
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
PGP KeyID = B38DB1BE


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


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-07 Thread Alejandro Imass
On Thu, Mar 7, 2013 at 6:03 PM, Francisco Obispo fobi...@isc.org wrote:
 The installer uses Module::Install

 So basically:

 1) lib/ is installed in: /usr/local/lib/perl5
 2) script/* becomes /usr/local/bin/*
 3) man pages are usually installed in /usr/local/share/man/man3/

 etc.

 perldoc Module::Install for more info ;-)



So the source, static files and the config file, etc. need to be
installed manually ??

BTW: saludes!

--
Alejandro Imass

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


Re: [Catalyst] Using the Catalyst Makefile to install

2013-03-07 Thread Francisco Obispo
They are installed by default under the lib/ directory, I'm not a big fan of 
that setup, so what we usually do (in debian), we setup a custom package that 
does the magic that we need, including the nginx setup, etc.

Module::Install lets you do some limited configuration, but if you're looking 
to customize it, you're better off with a custom distribution package.

Module::Install also gives you the ability to generate a PAR (Perl Archive), 
and a tar distribution (make tardist). 

On FreeBSD for example I usually install my catalyst apps as:

perl Makefile.PL INSTALL_BASE=/path/to/myapp

that way I have everything enclosed in one location (FreeBSD package manager is 
a nightmare)

:-)


On Mar 7, 2013, at 8:50 PM, Alejandro Imass alejandro.im...@gmail.com wrote:

 On Thu, Mar 7, 2013 at 6:03 PM, Francisco Obispo fobi...@isc.org wrote:
 The installer uses Module::Install
 
 So basically:
 
 1) lib/ is installed in: /usr/local/lib/perl5
 2) script/* becomes /usr/local/bin/*
 3) man pages are usually installed in /usr/local/share/man/man3/
 
 etc.
 
 perldoc Module::Install for more info ;-)
 
 
 
 So the source, static files and the config file, etc. need to be
 installed manually ??
 
 BTW: saludes!
 
 --
 Alejandro Imass
 
 ___
 List: Catalyst@lists.scsys.co.uk
 Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
 Dev site: http://dev.catalyst.perl.org/

Francisco Obispo 
Director of Applications and Services - ISC
email: fobi...@isc.org
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
PGP KeyID = B38DB1BE


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