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

mysql_role (1) Versions 0.1.0

MySQL role wrapper cookbook

Berkshelf/Librarian
Policyfile
Knife
cookbook 'mysql_role', '~> 0.1.0'
cookbook 'mysql_role', '~> 0.1.0', :supermarket
knife cookbook site install mysql_role
knife cookbook site download mysql_role
README
Dependencies
Quality 44%

Description

Role wrapper cookbook for MySQL.

Install MySQL and configure utility tools such as Percona Toolkit, mysqltuner and other shell tools.

Currently tested with test-kitchen and Chef 11.10.4.

On Ubuntu/Debian, Opscode's apt cookbook is used to ensure the package cache is updated so Chef can install mysql chef gem.

Full description on github

Requirements

Platform:

  • Ubuntu (>= 12.04)

Cookbooks:

  • mysql (= 3.0.2)
  • database (~> 1.3.12)
  • mysql-chef_gem
  • apt (>= 2.6.0)

Attributes

  • node[:mysql][:bind_address] - Defaults to "0.0.0.0".
  • node[:mysql][:allow_remote_root] - Defaults to "false".
  • node[:mysql][:remove_test_database] - Defaults to "true".
  • node[:mysql][:remove_anonymous_users] - Defaults to "true".
  • node[:mysql][:tunable][:log_bin] - Binary log path used for database replication and incremental backups. Defaults to "/var/log/mysql/mysql-bin.log".
  • node[:mysql][:tunable][:innodb_file_per_table] - Whether innodb tables should be stored one file per table. Defaults to "true".
  • node[:mysql][:users_databag] - Databag containing MySQL users. Defaults to "mysql_users".

Recipes

mysql_role::databag_users

The recipe is used to create MySQL users from databag contents.

Users are fetched from a search into node[:mysql][:users_databag] with the key server:#{server_fqdn} where server_fqdn is computed from node[:fqdn]. If cookbook user is using the hostname cookbook and he has set node[:set_fqdn] to change the hostname it will take precedence on node[:fqdn] to avoid issues on first run.

See databag format for details on databag content.

mysql_role::default

Main recipe used to install and configure MySQL.

Depends on apt::default to update the package cache, then it includes all other recipes but databag_users

mysql_role::full

Used to install and configure MySQL and configure users through databags.

Also includes default recipe.

mysql_role::shell_config

This recipes provides passwordless mysql access for root user. It writes '/root/.my.cnf' file (with 0600 permissions) to allow root user to access mysql from shell without providing password.

mysql_role::tools

Installs some useful system tools to interact with MySQL installation. Provided tools are:

Percona toolkit is installed with Ubuntu native package.

The latter three tools are installed from vendored files into /usr/local/bin so they are available in $PATH.

Databag format for users

This is the JSON structure used in databag for defining users

{
   "id": "uniq_id", # not used in recipe but required for databag semantic
   "server": "db.example.org", // Single or multiple elements allowed
   "server": ["db1.example.org", "db2.example.org"], // if array the user will be created on all matching servers
   "username": "db_username", // mandatory parameter
   "password": "db_password", // mandatory, plain or hashed password
   "host": "%.example.org", // optional, default localhost
   "privileges": ["SELECT, UPDATE"], // optional, default :all
   "database_name": "db", // optional, default *, i.e. all databases
   // if given the previous grants will be given for all of these database and database parameter is ignored
   "databases": [
       "db1",
       "db2",
       "db3"
   ]
}

License and Maintainer

Maintainer:: Fabio Napoleoni (f.napoleoni@gmail.com)

License:: Apache 2.0

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

FC064: Ensure issues_url is set in metadata: mysql_role/metadata.rb:1
FC065: Ensure source_url is set in metadata: mysql_role/metadata.rb:1
FC066: Ensure chef_version is set in metadata: mysql_role/metadata.rb:1
FC069: Ensure standardized license defined in metadata: mysql_role/metadata.rb:1
Run with Foodcritic Version 12.2.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

0.1.0 passed this metric

No Binaries Metric
            

0.1.0 passed this metric

Publish Metric
            

0.1.0 passed this metric

Supported Platforms 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