Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

puma (6) Versions 0.1.7

Installs and configures puma

Policyfile
Berkshelf
Knife
cookbook 'puma', '~> 0.1.7', :supermarket
cookbook 'puma', '~> 0.1.7'
knife supermarket install puma
knife supermarket download puma
README
Dependencies
Changelog
Quality 17%

Puma Cookbook

Build Status

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.

Requirements

monit, logrotate

Usage

The cookbook contains two definitions: puma_install and puma_config.

The puma_install definition allows you to install multiple instances of puma in different ruby environments by changing the gem_bin_path parameter... but you are not required to use it to install puma if your tool/workflow installs puma differently.

The default recipe simply calls puma_install. If you plan on using puma_install directly you don't need to include the the default recipe in your run list.

The puma_config defintion will create a puma configuration, stop/start scripts and configure monit to watch the puma process. It can be used with or without using puma_install.

Basic puma configuration using defaults based off the application name:

puma_config "app"

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

Common Settings

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

See the attributes/default.rb for default values.

  • node['puma']['version'] - Version of puma to install

  • node['puma']['bundler_version'] - Version to bundler to install

Issues

Find a bug? Want a feature? Submit an issue here. Patches welcome!

Contributing

  1. Fork the repository on Github

  2. Create a named feature branch (like add_component_x)

  3. Write your change

  4. Write tests for your change (if applicable)

  5. Run the tests, ensuring they all pass

  6. Squash your commits into one single commit. Submit a Pull Request using Github

  7. Assure the PR merges cleanly. Assure the Travis build is passing.

License and Authors

License: Apache

Authors: Yousef Ourabi

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

http://www.apache.org/licenses/LICENSE-2.0

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.

Dependent cookbooks

monit >= 0.0.0
logrotate >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

CHANGELOG for puma

This file is used to list changes made in each version of puma.

0.1.4:

  • Remove dateformat option to logrotate to be compatible with current logrotate cookbook

0.1.3:

  • Many bug fixes. Remove non ASCII characters, add timeout to Monit, make path to RubyGems configurable

0.1.0:

  • Initial release of puma

Check the Markdown Syntax Guide for help with Markdown.

The Github Flavored Markdown page describes the differences between markdown on github and standard markdown.

Collaborator Number Metric
            

0.1.7 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.7 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.7 failed this metric

FC064: Ensure issues_url is set in metadata: puma/metadata.rb:1
FC065: Ensure source_url is set in metadata: puma/metadata.rb:1
FC066: Ensure chef_version is set in metadata: puma/metadata.rb:1
FC069: Ensure standardized license defined in metadata: puma/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: puma/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.7 passed this metric

Testing File Metric
            

0.1.7 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.7 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