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

RSS

database_sl (9) Versions 0.1.7

Installs/Configures database_sl

Berkshelf/Librarian
Policyfile
Knife
cookbook 'database_sl', '= 0.1.7'
cookbook 'database_sl', '= 0.1.7', :supermarket
knife cookbook site install database_sl
knife cookbook site download database_sl
README
Dependencies
Changelog
Quality

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 resources introduced in chef-client version 12.5.

Requirements

Platforms

  • Ubuntu 14.04 LTS

Chef

  • Chef 12.2.0

packages

  • 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'

Attributes

database_sl::postgresql

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

Resources

Example create postgresql user:

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

Example grant privileges to postgresql user:

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

Example create postgresql database:

postgresql_database 'database_test' do
  action :create
end

Usage

database_sl::postgresql

Just include database_sl in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[database_sl::postgresql]"
  ]
}

For sharing at Chef Supermarket:

knife cookbook site share "database_sl" "Databases"

Testing

Before running kitchen test:

# vagrant box matching `.kitchen.yml` platform driver box
vagrant box add ubuntu-14.04 https://github.com/kraksoft/vagrant-box-ubuntu/releases/download/14.04/ubuntu-14.04-amd64.box

Documentation

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

0.1.0

  • Initial release of database_sl

0.1.1

  • Full chefspec coverage
  • Reviewed README

0.1.2

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

0.1.3

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

0.1.4

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

0.1.5

  • Renamed adding_apt_repository resource to adding_postgresql_apt_repository

0.1.6

  • Added guard property to user and database resources

0.1.7

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

Check the Markdown Syntax Guide for help with Markdown.

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

Foodcritic Metric
            

0.1.7 passed this metric