psgi applications easy install with chef

"Plack - Perl Superglue for Web frameworks and Web Servers (PSGI toolkit)" as said in documentation. Dealing with perl applications deployment, which I do with chef - modern open source platform for configuration, I have written psgi cookbook to configure, install psgi applications. Here are some simple exmaples of usage which are self explanatory.

This snippet of code install Catalyst application as fast cgi standalone server:

psgi_application 'Catalyst FCGI application' do
    operator      'Dancer'
    application_user    'user'
    application_home    '/home/user/app/'
    script              '/home/user/app/scripts/foo.psgi'
    config              '/home/user/app/app.conf'
    action              'install'      
end

And this snippet of code installs Dancer application as Starman web server:

psgi_application 'Dancer Starman application' do
    operator                 'Dancer'
    server                     'Starman'
    port                        '5010'
    application_user    'user'
    application_home    '/home/user/app/'
    script              '/home/user/app/scripts/foo.psgi'
    action              'install'      
end

Checkout http://community.opscode.com/cookbooks/psgi for details.


2 Comments

Cool! How are you doing the actual deployment and dependency resolution? It looks like your cookbook runs plackup directly without anything like carton to manage a local library.

Leave a comment

About melezhik

user-pic Dev & Devops --- Then I beheld all the work of God, that a man cannot find out the work that is done under the sun: because though a man labour to seek it out, yet he shall not find it; yea further; though a wise man think to know it, yet shall he not be able to find it. (Ecclesiastes 8:17)