unicorn
Unicorn daemonizer for Rails/Non rails and Bundle/Non bundle apps
Version information
released May 3rd 2016
This version is compatible with:
Start using this module
Add this module to your Puppetfile:
mod 'russmac-unicorn', '0.1.6'
Learn more about managing modules with a PuppetfileDocumentation
russmac/unicorn — version 0.1.6 May 3rd 2016
puppet-unicorn
Creates a deamonized init script which is just original unicorn script modified and templated.
Works on debian jessie 8.3 with systemd
Could be useful to quickly spin up ruby apps for CI by wrappering with a define
see examples folder for example usage.
# Wrapper class see app.yaml
class wrapper_class(
$ruby_apps=hiera('ruby_apps')
){
$ruby_apps_keys=keys($ruby_apps)
wrapper_define::generate{$ruby_apps_keys:
app_data => $ruby_apps
}
}
# wrapper define
define wrapper_define(
$app_data,
$self=$app_data[$name]
){
unicorn::generate{ $name:
app_root => $self['app_root'],
user => $self['user'], # optional
rails_env => $self['rails_env'], # optional
bundle => $self['bundle'], # optional
app_socket => $self['app_socket'], # optional
pid_file => $self['pid_file'], # optional
worker_processes => $self['worker_processes'], # optional
backlog => $self['backlog'], # optional
timeout => $self['timeout'], # optional
}
}