Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

psgi (14) Versions 0.1.0

Configures and runs psgi application

Policyfile
Berkshelf
Knife
cookbook 'psgi', '= 0.1.0', :supermarket
cookbook 'psgi', '= 0.1.0'
knife supermarket install psgi
knife supermarket download psgi
README
Dependencies
Quality -%

Synopsis

Configures and runs psgi application

Prerequisites

  • Plack
  • a chosen web server cpan module should be installed ( see list in the web servers supported section )

Last release

http://community.opscode.com/cookbooks/psgi

Features

web servers supported

web frameworks supported

Resources

psgi_application

Resource parameters

  • operator (Catalyst|Dancer|Jifty), specify web framework to use, optional
  • server (FCGI|Starman), specify web server to use, default value is FCGI
  • application_user, change to this user name before starting the process
  • application_home, absolute path to directory holding application home
  • enable_service, whether to add service to run levels, default value is on. To not enable service set this parameter to 'off'
  • script - the relative or absolute path to psgi script
  • daemon_name, optional, if not set - evaluated as basename from script
  • daemon_path - absolute path to daemon, default value is path to system installed plackup
  • socket, optional, specify unix or inet socket
  • environment, hash containing environmental variables, default value {}
  • perl5lib, array containing perl5lib paths, default value []
  • nproc, default value 1, number of child processes to launch
  • loader, specifies the server loading subclass that implements how to run the server - see plackup doc
  • backlog, maximum length of the queue of pending connections, only valid for FCGI server - Plack::Handler::FCGI
  • proc_manager, optional, default value is FCGI::ProcManager
  • proc_title, optional, how the processes are seen in process list
  • mount, optional, mount path, see Plack::App::URLMap for details
  • config, absolute path to application configuration file (optional for 'Dancer' operator)
  • debug, default value 1
  • plackup_environment, default value development
  • cookbook, default value psgi, the name of cookbook where init script template coming from
  • ignore_failure - used in action 'test', whether to ignore test failures, if enabled, than test fail will cause chef runtime exception. Default value is false

Web server specific options

FCGI

  • proc_manager
  • proc_title

Init scripts notes

Ubuntu, CentOS

upstart system used

Debian

start-stop-daemon with System V system used

Usage examples

run Catalyst application as FCGI standalone server

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

run Dancer application as FCGI standalone server

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

run Jifty application as FCGI standalone server

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

run psgi application with Starman server, port 5001

psgi_application 'psgi Starman application' do
     server              'Starman'
     application_user    'user'
     application_home    '/home/user/app/MyApplication'
     script              'app.psgi'
     socket              ':5000'
     nproc               '2'
     action              'install'
end

using with non system plackup

psgi_application 'my application' do
    server              'Starman'
    application_user    'user'
    application_home    '/home/user/app/MyApplication'
    script              '/home/user/app/MyApplication/scripts/foo.psgi'
    config              '/home/user/app/MyApplication/app.conf'
    action              'install'
    daemon_path         '/home/user/app/MyApplication/cpanlib/bin/plackup'      
end

run smoke test on installed psgi application

psgi_application 'my application' do
    application_user    'user'
    application_group   'user'
    application_home    '/home/user/app/MyApplication'
    script              '/home/user/app/MyApplication/scripts/foo.psgi'
    action              'test'
end

Tested on

  • Debian-Stable-64-bit, chef 11.4.4
  • Ubuntu 10.04.1 LTS, chef 11.4.4
  • CentOS-6.4-x86_64, , Chef 10.14.0

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

No quality metric results found