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

mw_mysql (4) Versions 0.1.3

Installs/Configures mw_mysql

Policyfile
Berkshelf
Knife
cookbook 'mw_mysql', '~> 0.1.3', :supermarket
cookbook 'mw_mysql', '~> 0.1.3'
knife supermarket install mw_mysql
knife supermarket download mw_mysql
README
Dependencies
Quality 17%

Personalized mysql server cookbook

Build Status Cookbook Version

The mw_mysql cookbook provides recipes for installing mysql server as a
standalone instance, or acting as master or slave instance. Another feature
provided is the fact that integrates with mysql_tuning cookbook.

Requirements

  • Chef 12+

Platform support

The following platforms have been tested with test kitchen

  • Debian 7.8
  • Debian 8.2
  • Ubuntu 14.04
  • Centos 6.7
  • Centos 7.2

Cookbook dependencies

  • mysql
  • mysql_tuning
  • chef-sugar

Other cookbooks may be required depending on the platform used:

  • apt/yum so packages are updated if ubuntu/debian/centos/rhel

Usage

Place a dependency on the mw_application cookbook in your cookbook's metadata.rb

  depends 'mw_mysql', '~> 0.1.0'

Then, in a recipe you can use provided recipes or helper functions

Attributes

  • default['mw_mysql']['enable_tmpdir']: enable tmpdir for mysql temporay dir. It will mount a ram disk to speed up mysql file operations. It will not enabled by default
  • default['mw_mysql']['tmpdir']: directory to mount temporary RAM disk
  • default['mw_mysql']['tmpdir_size']: RAM disk size
  • default['mw_mysql']['charset']: default server charset
  • default['mw_mysql']['collation']: default server collation.
  • default['mw_mysql']['max_connections']: number of max connections allows. If nil, it will be calculated by mysql_tuning cookbook based on hardware specs
  • default['mw_mysql']['expire_logs_days']: number of binary logs to be kept

Recipes

Recipes provided are only provided as examples so, not use them in prduction.
Mysql server installed will used default password

mw_mysql::client

Installs mysql client command line

mw_mysql::default

Installs a mysql server with root password set as change me

Helpers

mw_mysql_server

This helper receives two arguments:

  • Mysql instance name
  • Hash with options where:
    • root_password: is the root password
    • port: specifies mysql instance tcp port. Defaults to 3306

Example usage

mw_mysql_server('main', root_password: 'some_password', port: 3307)
mw_mysql_server('other', root_password: 'some_password', port: 3308)

Will install two mysql instances: one named main which listens on port
3307 and other which listens on port 3308

mw_mysql_master_server

This helper receives only a hash with options, where the same options specified
for mw_mysql_server helper are supported, but other ones are available:

  • replication_password: password used for the replication user
  • server_id: id of the mysql instance

Example usage

mw_mysql_master_server root_password: 'master',
                       port: 3306,
                       replication_password: 'replication'

mw_mysql_slave_server

This helper receives only a hash with options, where the same options specified
for mw_mysql_server helper are supported, but other ones are available:

  • replication_password: password used for the replication user
  • server_id: id of the mysql instance
  • master_host: ip address of mysql master server. Required
  • master_port: port of mysql master server

Example usage

mw_mysql_slave_server root_password: 'slave',
                      port: 3307,
                      replication_password: 'replication',
                      master_host: '127.0.0.1'

Kitchen testing

Travis will use default .kitchen based on Docker driver.

If you prefer to test recipe for all platforms, run:

KITCHEN_LOCAL_YAML=.kitchen_vagrant.yml

Dependent cookbooks

mysql ~> 6.1.0
mysql_tuning ~> 0.4.0
chef-sugar >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

0.1.3 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.1.3 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.3 failed this metric

FC008: Generated cookbook metadata needs updating: mw_mysql/metadata.rb:2
FC008: Generated cookbook metadata needs updating: mw_mysql/metadata.rb:3
FC064: Ensure issues_url is set in metadata: mw_mysql/metadata.rb:1
FC065: Ensure source_url is set in metadata: mw_mysql/metadata.rb:1
FC066: Ensure chef_version is set in metadata: mw_mysql/metadata.rb:1
FC067: Ensure at least one platform supported in metadata: mw_mysql/metadata.rb:1
FC069: Ensure standardized license defined in metadata: mw_mysql/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.3 passed this metric

Testing File Metric
            

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