cookbook 'psgi', '~> 0.1.1'
psgi (14) Versions 0.1.1 Follow1
Configures and runs psgi application
cookbook 'psgi', '~> 0.1.1', :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 )
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 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 -
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 forFCGI
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 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
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.
Collaborator Number Metric
0.1.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.1 failed this metric
FC064: Ensure issues_url is set in metadata: psgi/metadata.rb:1
FC065: Ensure source_url is set in metadata: psgi/metadata.rb:1
FC066: Ensure chef_version is set in metadata: psgi/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 failed this metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file
Foodcritic Metric
0.1.1 failed this metric
FC064: Ensure issues_url is set in metadata: psgi/metadata.rb:1
FC065: Ensure source_url is set in metadata: psgi/metadata.rb:1
FC066: Ensure chef_version is set in metadata: psgi/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
No Binaries Metric
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 failed this metric
FC065: Ensure source_url is set in metadata: psgi/metadata.rb:1
FC066: Ensure chef_version is set in metadata: psgi/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any
0.1.1 passed this metric
Testing File Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file
Version Tag Metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
0.1.1 failed this metric
0.1.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number