Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Best practices for deploying perlbrew and carton with apache fast-cgi

by dlarochelle (Sexton)
on Mar 08, 2012 at 18:57 UTC ( [id://958516]=perlquestion: print w/replies, xml ) Need Help??

dlarochelle has asked for the wisdom of the Perl Monks concerning the following question:

We're working on switching from using an ancient system Perl (5.8) to a modern Perl using Perlbrew and carton. Our code uses the Catalyst Web framework and runs fine with carton and perlbrew when run directly.

We're now trying to integrate it into our production server. There we use fastcgi through apache. Part of the complication is that for security reasons, we do not want the Perlbrew install to be writable by the apache/web user.

Also since Apache is invoked through init.d, sourcing a perlbrew bashrc file is more complicated

I was wondering if there are any best practices for integrating a Perlbrew/carton managed app into Apache. I'm googled and searched on Perlmonks but could not find anything appropriate.

Thanks in advance

  • Comment on Best practices for deploying perlbrew and carton with apache fast-cgi

Replies are listed 'Best First'.
Re: Best practices for deploying perlbrew and carton with apache fast-cgi
by gugod (Initiate) on Mar 08, 2012 at 19:14 UTC

    sourcing perlbrew bashrc does'nt give you anything but the advantage to `use` a different version on-the-fly. It is unlkely that you need to do so when launching the app daemon. I would simply put the desired perlbrew-ed version of perl in the $PATH when launching the app daemon.

    To automatically do that when rebooting the machine, create a shell script as a wrapper that modify the PATH first, then launch the app, and invoke the wrapper script from crontab (with @reboot time) or init.d.

    perlbrew really does not have to be involved unless it is required to run app with multiple versions of perl. Even so, writing multiple wrapper scripts cannot be too difficult. :)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://958516]
Approved by herveus
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-23 21:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found