Re: [Catalyst] Best practice for configuration file placement

2012-05-16 Thread Luis Muñoz

On May 17, 2012, at 12:02 AM, John Napiorkowski wrote:

> I would think you could build something into the makefile.PL that would copy 
> this stuff to /etc for production.  

Well, in my case I'm using a .deb that will place the vanilla config file in 
the /etc dir. However I want to make sure that this is where the ConfigLoader 
plugin will look. I'll try and use the snippet you provided (should work 
according to docs).

Thanks!

-lem


___
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] Best practice for configuration file placement

2012-05-16 Thread John Napiorkowski





>
> From: Luis Muñoz 
>To: catalyst@lists.scsys.co.uk 
>Sent: Wednesday, May 16, 2012 5:45 PM
>Subject: [Catalyst] Best practice for configuration file placement
> 
>Hi there,
>
>I've failed in locating this question as a FAQ, so I would appreciate some 
>guidance.
>
>I've written a Catalyst application that will be deployed in Debian. We want 
>to keep config files under /etc/some_app/ so naturally, I would like to add 
>this path to the ones to be searched by ConfigLoader. The application's main 
>.pm contains:
>
>  use Catalyst ( qw/
>    ConfigLoader
>  # ...
>    /
>  );

I usually put my non code data under /share and access it like this:

__PACKAGE__->config(
  'Plugin::ConfigLoader' => {
    file => __PACKAGE__->path_to('share', 'etc'),
  },
);

I would think you could build something into the makefile.PL that would copy 
this stuff to /etc for production.  

John

>
>We'll want to run the application under nginx/FastCGI. I realize that I can 
>simply set the environment appropriately in the startup rc script but before 
>doing that, I was wondering what would be the "best practice" way to achieve 
>this?
>
>Best regards.
>
>-lem
>
>
>___
>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/
>
>
>

___
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] Best practice for configuration file placement

2012-05-16 Thread Luis Muñoz
Hi there,

I've failed in locating this question as a FAQ, so I would appreciate some 
guidance.

I've written a Catalyst application that will be deployed in Debian. We want to 
keep config files under /etc/some_app/ so naturally, I would like to add this 
path to the ones to be searched by ConfigLoader. The application's main .pm 
contains:

  use Catalyst ( qw/
ConfigLoader
  # ...
/
  );

We'll want to run the application under nginx/FastCGI. I realize that I can 
simply set the environment appropriately in the startup rc script but before 
doing that, I was wondering what would be the "best practice" way to achieve 
this?

Best regards.

-lem


___
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] Deploying with Perlbrew

2012-05-16 Thread Todd Lyons
On Wed, May 16, 2012 at 9:41 AM, Nigel Metheringham  wrote:
> Personally I now build a perl rpm package (based around perlbrew,
> parallel installs with the system perl - based in /opt/perl) which
> includes everything within Task::Work (a task module I maintain) and
> builds against a mini cpan snapshot which is occasionally updated as I
> see fit.

Do you package new or updated modules as separate RPMs or do you just
rebuild the whole RPM?

...Todd
-- 
Always code as if the guy who ends up maintaining your code will be a
violent psychopath who knows where you live. -- Martin Golding

___
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] Deploying with Perlbrew

2012-05-16 Thread Nigel Metheringham
Personally I now build a perl rpm package (based around perlbrew,
parallel installs with the system perl - based in /opt/perl) which
includes everything within Task::Work (a task module I maintain) and
builds against a mini cpan snapshot which is occasionally updated as I
see fit.

Build takes less than 2 hours, and works on 2 OS releases (Centos 5 + 6)
under 2 architectures.

However I don't have a lot of skewed application sets to work with so
working to one blessed perl package is OK for me...

Nigel.

-- 
[ Nigel Metheringham -- ni...@dotdot.it ]
[ Ellipsis Intangible Technologies  ]


___
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] upstart script for Starman-based app?

2012-05-16 Thread Octavian Rasnita
From: Bill Moseley 
  Subject: Re: [Catalyst] upstart script for Starman-based app?





  On Thu, May 3, 2012 at 2:24 AM, Octavian Rasnita  wrote:

Hi all,

Does anyone have an upstart script that can be used for automaticly 
starting a Cat app using Starman?

I use Perlbrew and local::lib and I start the app in my own account and not 
as root and I don't know how to make upstart start the app under my account.
Maybe it will be helpful to see an upstart script that works, and try to 
adapt it.



  I'm curious: why you use both Perlbrew and local::lib vs. installing all 
modules in the Perlbrew Perl lib?


  Thanks,


  Hi Bill,

  No special super technical reason. I use Perlbrew because I want to leave the 
system Perl alone, and I thought that I will use a single Perlbrew and a 
different local::lib dir for the 2 different apps I made. But finally I 
installed a separate Perlbrew for each of them.

  Octavian


___
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] upstart script for Starman-based app? Errata to Starman-apache article

2012-05-16 Thread John Karr
There is some important errata to the advent Calendar article posted at: 
http://brainbuz.org/techinfo/2011/12/deploying-catalyst-with-starman-and-apache/

 

Unfortunately I have some frustration with upstart, I’m hoping to have better 
luck with the newest version in Ubuntu Precise. I will post a follow up article 
if I make progress with the new version of upstart. You may want to consider 
using the rc.local method if upstart is too problematic. 

 

From: Dimitar Petrov [mailto:mita...@gmail.com] 
Sent: Wednesday, May 16, 2012 6:00 AM
To: The elegant MVC web framework
Subject: Re: [Catalyst] upstart script for Starman-based app?

 

There was an article about Starman and Apache into the last year Advent 
Calendar. Here is the link: http://www.catalystframework.org/calendar/2011/16

 

Cheers

On Tue, May 15, 2012 at 3:20 PM, Bill Moseley  wrote:

 

On Thu, May 3, 2012 at 2:24 AM, Octavian Rasnita  wrote:

Hi all,

Does anyone have an upstart script that can be used for automaticly starting a 
Cat app using Starman?

I use Perlbrew and local::lib and I start the app in my own account and not as 
root and I don't know how to make upstart start the app under my account.
Maybe it will be helpful to see an upstart script that works, and try to adapt 
it.

 

I'm curious: why you use both Perlbrew and local::lib vs. installing all 
modules in the Perlbrew Perl lib?

 

Thanks,

 

 

-- 
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/

 

___
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] Deploying with Perlbrew

2012-05-16 Thread Stephen Shorrock

On 15/05/2012 14:57, Bill Moseley wrote:

On Tue, May 15, 2012 at 8:18 AM, Tobias Kremerwrote:


We played around with building .debs for all dependencies (mainly
because our ISP understandably likes packages), but it's a total PITA
IMHO. So we went the local::lib route and never looked back. That way
we can distribute and deploy all dependencies with our app. It also
makes setting up a development environment totally easy, because you
just install local::lib, clone the app git repository (which includes
all dependencies) and are pretty much ready to go (assuming that your
dev environment is compatible with your production environment which
is part of the reason we develop with VMs).


Our situation is worse than I wrote about, because it was decided by some
that development should look like production to avoid surprises at release
time.  I'm not sure how that's ever possible, but I digress. So, even the
dev boxes use RPMs for modules.  Talk about a PITA -- especially on a
machine used by multiple developers.

I'm trying to get all our in-house code into a local CPAN and have each
developer use local::lib or even Perlbrew (as it isn't really any more
difficult than local::lib).   I want to avoid a shared local::lib because
that locks development and production to the same platform, which isn't
necessary.   All I care about is a good test suite and that it passes.

For a release (from development) my plan is to have a developer (because
they know the code) build a fresh Perl with Perlbrew and do essentially a
bare-metal install and run all tests on the target platform and finally run
make install of the app.  Exactly as they would do in their own dev
environment.   Then the operations team can package however they want (RPM,
tarball, rsync) and place on the QA machines for testing and then later to
production.  I'm looking for a clean decoupling of development from
operations.

Apologies if this is off topic

I'm interested in how you manage your local CPANs for the various 
versions of environments (multpiple dev, production) you might have, 
when your developers install their environment via and your local mirror 
are they using any autobundle files to load the require packages? and if 
so do you use cpan, cpanp or other.  I'm currently trying to organise 
our environments but for some of the perlbrew Perl versions (5.12.4) my 
autobundles don't cleanly install, and I'm considering whether this is 
actually a dead-end


Thanks in advance

Stephen

___
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] upstart script for Starman-based app?

2012-05-16 Thread Dimitar Petrov
There was an article about Starman and Apache into the last year Advent
Calendar. Here is the link:
http://www.catalystframework.org/calendar/2011/16

Cheers

On Tue, May 15, 2012 at 3:20 PM, Bill Moseley  wrote:

>
>
> On Thu, May 3, 2012 at 2:24 AM, Octavian Rasnita wrote:
>
>> Hi all,
>>
>> Does anyone have an upstart script that can be used for automaticly
>> starting a Cat app using Starman?
>>
>> I use Perlbrew and local::lib and I start the app in my own account and
>> not as root and I don't know how to make upstart start the app under my
>> account.
>> Maybe it will be helpful to see an upstart script that works, and try to
>> adapt it.
>>
>
> I'm curious: why you use both Perlbrew and local::lib vs. installing all
> modules in the Perlbrew Perl lib?
>
> Thanks,
>
>
> --
> 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/
>
>
___
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/