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

psql (2) Versions 0.2.0

A set of LWRPs for interacting with postgres using the CLI.

Berkshelf/Librarian
Policyfile
Knife
cookbook 'psql', '~> 0.2.0'
cookbook 'psql', '~> 0.2.0', :supermarket
knife cookbook site install psql
knife cookbook site download psql
README
Dependencies
Changelog
Quality 33%

Description

Build Status

A set of LWRPs for interacting with postgres using the CLI.

Dependencies

The cookbook requires the 'psql' client utility for postgres to be installed on the node. However there is no depedence on a cookbook that installs this utlility. One can be found here: https://github.com/opscode-cookbooks/postgresql.git

Requirements

Platform:

No platforms defined

Cookbooks:

  • cutlery (~> 0.1)

Attributes

No attributes defined

Recipes

No recipes defined

Resources

psql_database

Actions

  • create: Default action.
  • drop:
  • owner:

Attribute Parameters

  • host:
  • port: Defaults to <code>5432</code>.
  • admin_username: Defaults to <code>nil</code>.
  • admin_password: Defaults to <code>nil</code>.
  • database:
  • owner:
  • encoding: Defaults to <code>"DEFAULT"</code>.
  • template: Defaults to <code>nil</code>.
  • tablespace: Defaults to <code>nil</code>.
  • collation: Defaults to <code>nil</code>.
  • connection_limit: Defaults to <code>nil</code>.
  • bash_user: Defaults to <code>"postgres"</code>.
  • bash_group: Defaults to <code>"postgres"</code>.

psql_exec

Actions

  • run: Default action.

Attribute Parameters

  • command:
  • host:
  • port: Defaults to <code>5432</code>.
  • admin_username: Defaults to <code>nil</code>.
  • admin_password: Defaults to <code>nil</code>.
  • dbname:
  • match: Defaults to <code>nil</code>.
  • returns: Defaults to <code>0</code>.
  • bash_user: Defaults to <code>"postgres"</code>.
  • bash_group: Defaults to <code>"postgres"</code>.

psql_exec_file

Actions

  • run: Default action.

Attribute Parameters

  • command_file:
  • host:
  • port: Defaults to <code>5432</code>.
  • admin_username: Defaults to <code>nil</code>.
  • admin_password: Defaults to <code>nil</code>.
  • dbname:
  • match: Defaults to <code>nil</code>.
  • returns: Defaults to <code>0</code>.

psql_permission

Actions

  • grant: Default action.
  • revoke:

Attribute Parameters

  • host:
  • port: Defaults to <code>5432</code>.
  • admin_username: Defaults to <code>nil</code>.
  • admin_password: Defaults to <code>nil</code>.
  • username:
  • database:
  • permissions:
  • bash_user: Defaults to <code>"postgres"</code>.
  • bash_group: Defaults to <code>"postgres"</code>.

psql_schema

Actions

  • grant_usage: Default action.

Attribute Parameters

  • host:
  • port: Defaults to <code>5432</code>.
  • admin_username: Defaults to <code>nil</code>.
  • admin_password: Defaults to <code>nil</code>.
  • database:
  • schema:
  • username:
  • bash_user: Defaults to <code>"postgres"</code>.
  • bash_group: Defaults to <code>"postgres"</code>.

psql_user

Actions

  • create: Default action.
  • drop:

Attribute Parameters

  • host:
  • port: Defaults to <code>5432</code>.
  • admin_username: Defaults to <code>nil</code>.
  • admin_password: Defaults to <code>nil</code>.
  • username:
  • password:
  • grant_create_db: Defaults to <code>false</code>.
  • bash_user: Defaults to <code>"postgres"</code>.
  • bash_group: Defaults to <code>"postgres"</code>.

Usage

The cookbook is simply a set of LWRPs that you can use in your own cookbook. A simple example follows.

psql_user "myuser" do
  host node['fqdn']
  port node['postgresql']['config']['port']
  admin_username 'postgres'
  admin_password node['postgresql']['password']['postgres']
  password 'secret'
end

psql_database "mydatabase" do
  host node['fqdn']
  port node['postgresql']['config']['port']
  admin_username 'postgres'
  admin_password node['postgresql']['password']['postgres']
  owner 'myuser'
  template 'template_postgis'
  encoding 'DEFAULT'
  tablespace 'MyTablespace'
  collation 'fr_FR'
  connection_limit -1
end

psql_permission "myuser@mydatabase => all" do
  host node['fqdn']
  port node['postgresql']['config']['port']
  admin_username 'postgres'
  admin_password node['postgresql']['password']['postgres']
  username 'myuser'
  database 'mydatabase'
  permissions ['ALL']
end

License and Maintainer

Maintainer:: Peter Donald (peter@realityforge.org)

Contributors:: * André Hester

License:: Apache 2.0

Dependent cookbooks

cutlery ~> 0.1

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

0.2.0 (Pending):

  • Add support for psql_exec_file LWRP. Submitted by André Hester.

0.1.0:

  • Initial release.

Collaborator Number Metric
            

0.2.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.2.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.2.0 failed this metric

FC059: LWRP provider does not declare use_inline_resources: psql/providers/database.rb:1
FC059: LWRP provider does not declare use_inline_resources: psql/providers/exec.rb:1
FC059: LWRP provider does not declare use_inline_resources: psql/providers/exec_file.rb:1
FC059: LWRP provider does not declare use_inline_resources: psql/providers/permission.rb:1
FC059: LWRP provider does not declare use_inline_resources: psql/providers/schema.rb:1
FC059: LWRP provider does not declare use_inline_resources: psql/providers/user.rb:1
FC064: Ensure issues_url is set in metadata: psql/metadata.rb:1
FC065: Ensure source_url is set in metadata: psql/metadata.rb:1
FC066: Ensure chef_version is set in metadata: psql/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: psql/metadata.rb:1
FC069: Ensure standardized license defined in metadata: psql/metadata.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.2.0 passed this metric

No Binaries Metric
            

0.2.0 passed this metric

Publish Metric
            

0.2.0 passed this metric

Supported Platforms Metric
            

0.2.0 failed this metric

psql should declare what platform(s) it supports.

Testing File Metric
            

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