cookbook 'psgi', '= 0.0.12'
psgi (14) Versions 0.0.12 Follow1
Configures and runs psgi application
cookbook 'psgi', '= 0.0.12', :supermarket
knife supermarket install psgi
knife supermarket download psgi
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 )
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 fromscript
-
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 value1
, number of child processes to launch -
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 valuepsgi
, 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
Ubunut, 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.