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

br-rails (1) Versions 0.1.0

Configures and manages Rails deployments

Policyfile
Berkshelf
Knife
cookbook 'br-rails', '~> 0.1.0', :supermarket
cookbook 'br-rails', '~> 0.1.0'
knife supermarket install br-rails
knife supermarket download br-rails
README
Dependencies
Quality 17%

Rails Cookbook

Configures Rails applications

  1. Overview
  2. Recipes
  3. Attributes
  4. Examples
  5. Maintainers

Overview

This cookbook is designed to prepare a deployed Rails application to start. The three main phases are configure,
install, and migrate. The configure phase handles updating configuration files for the current environment, the
install phase will install gem dependencies, and the migrate phase will run database migrations.

Although this cookbook can download application code from a git repository using the prepare recipe, managing
deployments should be handled by a different cookbook. Application deployment has many concerns that go beyond
the scope of this project, such as managing multiple versions, rollbacks, restarts, in-place upgrades, etc.

Note: Built by Robots is committed to maintaining a simple, robust set of cookbooks that can be used to deploy Ruby
web applications in an enterprise setting. These open source projects will be humanely maintained and will not abrutly
lose support. Any future transitions of ownership or deprecation will be handled with clear communication and plenty of
advance notice.

Recipes

br-rails::default

Runs configure, install, and migrate recipes. The prepare recipe is not included by default since it is
recommened to create another cookbook to handle application deployment.

br-rails::prepare

Prepares for configuration by installing package dependencies and syncing application code from a git repository.

br-rails::configure

Configures a deployed Rails application. Typically this includes production.rb, database.yml, and secrets.yml, but
custom config files and templates are also supported.

br-rails::install

Runs installation commands for a deployed Rails application like bundle install.

br-rails::migrate

Runs migration commands for a deployed Rails application like rake db:migrate.

Attributes

The following attributes reside under rails/default which contains the default attributes used for every every
application listed under rails/applications. To configure a new rails application, use the same set of keys, but
place them under applications. Example: rails/applications/example

Key Type Description
install_path String Directory containing Rails application folder
dependencies Array of Strings Package dependencies to install
ruby/install_path String Location where Ruby versions are installed
ruby/version String Required: Ruby version to use
git/respository String Git repository for application
git/revision String Git revision to sync
owner Type Owner of application files and folders
group Type Group of application files and folders
mode Type Mode of application files and folders
environment Type Application environment variables
config Hash Configuration fils
install Hash Installation commands
migrate Hash Migration commands

[default values](attributes/default.rb)

Examples

Role

{
  "name": "example",
  "chef_type": "role",
  "json_class": "Chef::Role",
  "description": "Example Role",
  "run_list": ["recipe[br-ruby::default]", "recipe[br-rails::prepare]", "recipe[br-rails::default]"],
  "default_attributes": {
    "ruby": {
      "versions": ["2.2.3"]
    },
    "rails": {
      "applications": {
        "example": {
          "ruby": {
            "version": "2.2.3"
          },
          "git": {
            "repository": "https://github.com/built-by-robots/rails-application.git"
          },
          "config": {
            "environment":{
              "values": {
                "cache_classes": "true",
                "eager_load": "true",
                "consider_all_requests_local": "false",
                "action_controller": {
                  "perform_caching": "true"
                },
                "serve_static_files": "ENV['RAILS_SERVE_STATIC_FILES'].present?",
                "assets": {
                  "js_compressor": ":uglifier",
                  "compile": "false",
                  "digest": "true"
                },
                "log_level": ":debug"
              }
            },
            "database": {
              "values": {
                "production": {
                  "adapter": "sqlite3",
                  "pool": "5",
                  "timeout": "5000",
                  "database": "db/development.sqlite3"
                }
              }
            },
            "secrets": {
              "values": {
                "production": {
                  "secret_key_base": "c8b92f99b11f01fc05a98245b9f2d32e8b6485a29447"
                }
              }
            }
          }
        }
      }
    }
  }
}

Maintainers

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

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

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

0.1.0 failed this metric

FC022: Resource condition within loop may not behave as expected: br-rails/recipes/prepare.rb:15
FC022: Resource condition within loop may not behave as expected: br-rails/recipes/prepare.rb:25
FC039: Node method cannot be accessed with key: br-rails/attributes/default.rb:23
FC052: Metadata uses the deprecated "suggests" keyword: br-rails/metadata.rb:9
FC052: Metadata uses the deprecated "suggests" keyword: br-rails/metadata.rb:10
FC053: Metadata uses the deprecated "recommends" keyword: br-rails/metadata.rb:17
FC064: Ensure issues_url is set in metadata: br-rails/metadata.rb:1
FC066: Ensure chef_version is set in metadata: br-rails/metadata.rb:1
FC069: Ensure standardized license defined in metadata: br-rails/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.0 passed this metric

Testing File Metric
            

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

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