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

simple_passenger (13) Versions 1.1.0

Chef cookbook to deploy rack based Ruby web applications with Passenger standalone

Policyfile
Berkshelf
Knife
cookbook 'simple_passenger', '= 1.1.0', :supermarket
cookbook 'simple_passenger', '= 1.1.0'
knife supermarket install simple_passenger
knife supermarket download simple_passenger
README
Dependencies
Quality 29%

simple_passenger Chef Cookbook

Chef cookbook Travis

Chef cookbook to deploy Rack-based Ruby web application(s) (Rails, Sinatra, etc) with Passenger standalone.

Usage

First, include recipe[simple_passenger::default] on your node's run list. This will install common dependencies for Rack web apps. See the default recipe for more details.

To deploy your app(s) with this cookbook, you can use the simple_passenger_app LWRP in another cookbook. You can also define apps in the attribute ['passenger']['apps'] as a hash. The keys of this hash should be the name of the app, and the values should be a hash of properties you want to call on the simple_passenger_app LWRP. The default recipe will iterate over this hash and call the LWRP for you with the properties you have defined. You can see an example of this attribute approach in the ChefSpec attributes or [the Test Kitchen attributes](/.kitchen.yml).

simple_passenger_app LWRP

Below are each of the properties defined on the LWRP, see the resource definition for defaults and more details. See the default recipe in the fixture cookbook used by Test Kitchen integration tests for an example of using this LWRP.

Property Ruby class Examples Description
app_name String 'my-app' Name of app to deploy
git_repo String 'https://github.com/user/my-app.git' The URI for the git repository. See the Chef git resource.
git_revision String 'master', 'v1.2.3' The URI for the git repository. See the Chef git resource.
ruby_version String '2.2.6', 'jruby-9.1.6.0' ruby-build definition to install. See the ruby_build_ruby LWRP.
ruby_bin String '/path/to/ruby', '/opt/chef/embedded/bin/ruby' Path of a different Ruby to use (should be in a bin/ directory). Setting this prevents installing a Ruby with the ruby_build_ruby LWRP.
bundler_version String '1.13.1', '~> 1.12' Version of Bundler to install (should be a RubyGems version specification).
passengerfile Hash { environment: 'development', port: 8080 } Properties to specify in Passengerfile.json (will be merged over sensible defaults).
passengerfile_mode String, Integer '644' Permissions to set on Passengerfile.json. See the Chef file resource.
log_dir_mode String, Integer '0755' Permissions to set on the log directory for the app. See the Chef directory resource.
logrotate_frequency String 'daily' See the logrotate_app LWRP
logrotate_rotate Integer 7 See the logrotate_app LWRP

Notes

Multiple apps

This cookbook support multiple apps just as expected. Simply call the LWRP multiple times (or define multiple apps in the attribute ['passenger']['apps'] as a hash). Be sure to bind each app to a different port.

Testing

Chefspec unit tests and Test Kitchen integration tests are run on all pushes to GitHub by Travis CI.

# install gem dependencies
bundle
# unit tests
bundle exec rspec
# integration tests with kitchen-vagrant
bundle exec kitchen test

Test Kitchen integration tests are on Travis CI use Docker via kitchen-docker. If you'd like to use Docker to run Test Kitchen integration tests locally:

# Ensure docker is running first
# On Mac OS X you may need to have sudo commands available with no password,
# the easiest way to do this is run a command as sudo so the next command won't prompt
# for a password
sudo ls
# Run Test Kitchen integration tests with docker (uses concurrency)
KITCHEN_LOCAL_YAML=.kitchen.docker.yml bundle exec kitchen test

Big thanks to https://github.com/zuazo/kitchen-in-travis for the Travis / Test Kitchen guide

Contributing

Enhancements and bug fixes are appreciated! Remember, this cookbook is designed to be simple.

  1. Fork the repo
  2. Create a feature or fix branch with an intuitive name (fix/some-bug, feat/some-feature)
  3. Add relevant tests (kitchen, chefspec, etc)
  4. Create a pull request back to this repo

Chef Supermarket

This cookbook is available in the community Chef Supermarket. To push new versions with stove:

bundle install
# make changes
# update metadata version
git commit -am 'some fixes'
git push
# tag and push to supermarket
stove

Dependent cookbooks

build-essential >= 2.1
logrotate ~> 1.9
ruby_build ~> 0.8

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

1.1.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

1.1.0 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
            

1.1.0 passed this metric

License Metric
            

1.1.0 failed this metric

simple_passenger does not have a valid open source license.
Acceptable licenses include Apache-2.0, apachev2, Apache 2.0, MIT, mit, GPL-2.0, gplv2, GNU Public License 2.0, GPL-3.0, gplv3, GNU Public License 3.0.

No Binaries Metric
            

1.1.0 passed this metric

Testing File Metric
            

1.1.0 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
            

1.1.0 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