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


database_sl (9) Versions 0.1.8

Installs/Configures database_sl

cookbook 'database_sl', '~> 0.1.8', :supermarket
cookbook 'database_sl', '~> 0.1.8'
knife supermarket install database_sl
knife supermarket download database_sl
Quality 50%

Cookbook Version
Build Status
Code Climate
Coverage Status
Dependency Status

database_sl Cookbook

Super light database cookbook. As opposed to other database cookbooks, to run
queries it is used only the official terminal-based tool.
Living on the edge, it is used the approach to build custom
introduced in
chef-client version 12.5.



  • Ubuntu 14.04 LTS


  • Chef 12.2.0


  • database_sl::postgresql - Installs PostgreSQL db server and client
  • database_sl::postgresql_distribution - Installs a version of PostgreSQL db server and client included in distribution'
  • database_sl::postgresql_apt_repository - Installs a version of PostgreSQL db server and client from PostgreSQL Apt Repository'



See attributes/postgresql.rb for default values.

  • node['database']['postgresql']['origin'] - Origin of version installed (Possible values: :distribution, :apt_repository
  • node['database']['postgresql']['version'] - Version of the postgresql db (Example: 9.4)
  • node['database']['postgresql']['repository_version'] - Version of the postgresql at apt repository

To check available package versions run command:

sudo apt-cache madison postgresql


Example create postgresql user:

postgresql_user 'create_webuser' do
  name 'webuser'
  password 'webuser123'
  action :create

Example grant privileges to postgresql user:

postgresql_user 'grant_webuser' do
  database_name 'database_test'
  name 'webuser'
  password 'webuser123'
  privileges ['ALL PRIVILEGES']
  action :grant

Example create postgresql database:

postgresql_database 'database_test' do
  action :create



Just include database_sl in your node's run_list:

  "run_list": [

For sharing at Chef Supermarket:

knife cookbook site share "database_sl" "Databases"


Before running kitchen test:

# vagrant box matching `.kitchen.yml` platform driver box
vagrant box add ubuntu-14.04



  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. Submit a Pull Request using Github

License and Authors

Authors: David Saenz Tagarro

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

database_sl CHANGELOG

This file is used to list changes made in each version of the database_sl cookbook.


  • Initial release of database_sl


  • Full chefspec coverage
  • Reviewed README


  • Fixed FC041: Execute resource used to run curl or wget commands


  • Fixed FC013: Use file_cache_path rather than hard-coding tmp paths


  • Added guard to adding postgresql media key
  • Fixed reference to localhost in connection options (


  • Renamed adding_apt_repository resource to adding_postgresql_apt_repository


  • Added guard property to user and database resources


  • Refactoring to one recipe for each install method: :distribution (version included in distribution - recipe database_sl::postgresql_distribution) and :apt_repository (version included in postgresql apt repository - recipe database_sl::postgresql_apt_repository)


  • Removed not required postgresql default attribute

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.8 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.8 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, and your repo must contain a file

Foodcritic Metric

0.1.8 failed this metric

FC066: Ensure chef_version is set in metadata: database_sl/metadata.rb:1
FC108: Resource should not define a property named 'name': database_sl/resources/database.rb:6
FC108: Resource should not define a property named 'name': database_sl/resources/user.rb:6
FC120: Do not set the name property directly on a resource: database_sl/recipes/postgresql_test.rb:4
FC120: Do not set the name property directly on a resource: database_sl/recipes/postgresql_test.rb:15
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric

0.1.8 passed this metric

Testing File Metric

0.1.8 passed this metric

Version Tag Metric

0.1.8 passed this metric