cookbook 'puma', '= 0.1.1', :supermarket
Installs and configures puma
cookbook 'puma', '= 0.1.1'
knife supermarket install puma
knife supermarket download puma
Chef cookbook for the puma server.
The defaults assume you are deploying with capistrano and will write all configuration and logs to the shared/puma directory... However the configuration should be flexible enough to support any deployment setup.
The cookbook will also setup scripts to support restarts and phased restarts.
By default puma_config will enable monit monitoring and log rotation via logrotate.
Basic puma configuration using defaults based off the application name:
Custom config overriding app settings. In this example the configuration files and helper scripts will be placed in /srv/app/shared/puma.
For example - in the following example to do a 'phased-restart' (zero downtime deploy) after deploying your code you would run the /srv/app/shared/puma/puma_phased_restart.sh script.
puma_config "app" do directory "/srv/app" environment 'staging' monit false logrotate false thread_min 0 thread_max 16 workers 2 end
directory: Working directory of your app. This is where config.ru is.
puma_directory: directory where sockets, state and logs will be stored. Defaults to <directory>/shared/puma
environment: (default = production)
bind: defults to unix socket (at unix:///srv/app/shared/puma/app.sock) can speficy TCP socket instead such as "tcp://0.0.0.0:9292"
exec_prefix: default bundle exec
thread_min: min number of threads in puma threadpool
thread_max: max number of threads in puma threadpool
workers: number of worker processes defaults to 0, must be greater than 0 for phased restarts
monit: (true) set to false to disable monit functionality
logrotate: (true) set to false to disable logrotate functionality
attributes/default.rb for default values.
node['puma']['version']- Version of puma to install
node['puma']['bundler_version']- Version to bundler to install
Find a bug? Want a feature? Submit an issue here. Patches welcome!
Fork the repository on Github
Create a named feature branch (like
Write you change
Write tests for your change (if applicable)
Run the tests, ensuring they all pass
Submit a Pull Request using Github
License and Authors
Authors: Yousef Ourabi
About: This was originally developed for use at Burstorm
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|monit >= 0.0.0|
|logrotate >= 0.0.0|
There are no cookbooks that are contingent upon this one.