unicorn: Install and run unicorn.unicorn::params: Params class with default values.
unicorn::app: Defines a unicorn application
Install and run unicorn.
unicorn::app { 'my-sinatra-app':
approot => '/opt/my-sinatra-app',
pidfile => '/opt/my-sinatra-app/unicorn.pid',
socket => '/opt/my-sinatra-app/unicorn.sock',
user => 'sinatra',
group => 'sinatra',
preload_app => true,
rack_env => 'production',
source => 'bundler',
require => [
Class['ruby::dev'],
Bundler::Install[$app_root],
],
}The following parameters are available in the unicorn class:
Data type: Optional[Stdlib::Absolutepath]
Path to export the HOME environment.
Default value: undef
Data type: Boolean
Whether to manage the unicorn package.
Default value: true
Data type: String[1]
State to ensure the unicorn package.
Default value: 'present'
Data type: String[1]
The provider used to ensure the unicorn package.
Default value: 'gem'
Params class with default values.
Defines a unicorn application
The following parameters are available in the unicorn::app defined type:
approotpidfilesocketlistensexport_homebacklogworkersusergroupconfig_fileconfig_templateinitscriptinit_timelogdirrack_envpreload_appsourceextra_settings
Data type: Stdlib::Absolutepath
Path to the application working directory.
Data type: Stdlib::Absolutepath
Path to the PID file.
Data type: Stdlib::Absolutepath
Path to socket file.
Data type: Array
Additional listen directives other than the default socket.
Default value: []
Data type: Optional[Stdlib::Absolutepath]
Path to export the HOME environment.
Default value: undef
Data type: String
Value to set for the backlog on the listening socket.
Default value: '2048'
Data type: Integer
Number of worker_processes to run.
Default value: $facts['processors']['count']
Data type: String[1]
Specify the user to run unicorn as.
Default value: 'root'
Data type: String[1]
Specify the group to run unicorn as.
Default value: 'root'
Data type: Optional[Stdlib::Absolutepath]
The path to install the configuration file.
Default value: undef
Data type: String[1]
The source template for the configuration file.
Default value: 'unicorn/config_unicorn.config.rb.erb'
Data type: Optional[String[1]]
The template to use for the unicorn init script.
Default value: undef
Data type: Integer
The time in seconds between checks for the old unicorn process during a service reload.
Default value: 15
Data type: Stdlib::Absolutepath
Path to the application log directory.
Default value: "${approot}/log"
Data type: String[1]
The rack environment mode to start as.
Default value: 'production'
Data type: Boolean
Whether to preload the application before forking worker processes.
Default value: false
Data type: String[1]
The daemon source used to run the application.
Default value: 'system'
Data type: Hash
A hash of additional settings to pass directly intol the application configuration file.
Default value: {}