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

mysqler (4) Versions 1.0.6

Installs and configures MySQL client and server

Berkshelf/Librarian
Policyfile
Knife
cookbook 'mysqler', '~> 1.0.6'
cookbook 'mysqler', '~> 1.0.6', :supermarket
knife cookbook site install mysqler
knife cookbook site download mysqler
README
Dependencies
Quality

A cookbook to install MySQL server and configure instances as needed.

Description

The cookbook allows you to install mysql server, configure several instances on the same machine based on parameters that should be configured for each server.

Supported Platforms

Debian

Chef

Production tested on chef 11.16.4 version.

Recipes

  • mysqler::default - The default recipe. Performes all basic installation and configuration of mysql server
  • mysqler::configure_server - Configures Mysql instance
  • mysqler::add_repository - Adds mysql repository
  • mysqler::build_replica_member - Creates replication member based on the configuration
  • mysqler::install_mysql_gem - Installs mysql gem for chef to allow connection and query on remote DB
  • mysqler::install_server - Installs mysql-server from the repository
  • mysqler::manage_users - manages system users for mysql
  • mysqler::poke - poke the servers to create data for replication. Uses test database and poke table.
Additional helper recipes
  • mysqler::handle_backward_compatibility - add backward compatibility to previously installed version of mysql - linking binaries to their previous location
  • mysqler::remove_backward_compatibility - remove previously setup backward compatibility

Important

We DO overwrite several attributes of percona cookbook

default["percona"]["skip_passwords"] = true

default["percona"]["apt_keyserver"] = "keyserver.ubuntu.com"

default["percona"]["backup"]["configure"] = false

Usage

Basic

Create a role for each of your mysql database schemas as following:

name "mysql_my_app"
description "mysql for my_app"
run_list('recipe[mysqler]')
default_attributes({
    'mysqler' => {
        'app_name' => 'my_app',
        'innodb_buffer_pool_size' => '4G' ,
            .
            .
            .
            .
        'mysql_rebuild' => {
            'xtra_bkp_src' => {
                'dc_name1' => 'hostname',
                'dc_name2' => {'host' => 'hostname2', 'master' => 1}
            },
            'dump_rebuild_src' => {
                'dc_name1' => 'hostname'

            }
        }
    }
})

Multi-Instance

Create the following roles:

  • mysql_parent for the physical server
  • mysql_[appname] for each instance

For the physical server - perform the mysql server installation and create fake chef nodes as needed. You can use our cookbook fake-chef-client for that purpose.

name "mysql_parent"
description "mysql parent server"
run_list('recipe[mysqler::install_server]', recipe[fake-chef-client])
default_attributes({
})

Create a role for each of your mysql database schemas as following:

name "mysql_my_app"
description "mysql parent server"
run_list('recipe[mysqler::configure_server]')
default_attributes({
    'mysqler' => {
        'app_name' => 'my_app',
        'innodb_buffer_pool_size' => '4G' ,
            .
            .
            .
            .
        'mysql_rebuild' => {
            'xtra_bkp_src' => {
                'dc_name1' => 'hostname',
                'dc_name2' => {'host' => 'hostname2', 'master' => 1}
            },
            'dump_rebuild_src' => {
                'dc_name1' => 'hostname'

            }
        }
    }
})

Databags

Databag examples can be found in databag_examples folder

Acknowledgements

This cookbook was forked from percona cookbook several years ago, and was changed since.

Supplementary Cookbook

fake-chef-client - <A>https://github.com/wix/fake-chef-client</a>

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: Wix.com

License: Apache 2.0

Dependent cookbooks

build-essential >= 0.0.0
logrotate >= 0.0.0
percona >= 0.0.0
magic_shell >= 0.0.0
openssl >= 0.0.0
apt >= 0.0.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

Collaborator Number Metric
            

1.0.6 failed this metric

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

Contributing File Metric
            

1.0.6 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
            

1.0.6 failed this metric

FC007: Ensure recipe dependencies are reflected in cookbook metadata: mysqler/recipes/add_repository.rb:1
FC064: Ensure issues_url is set in metadata: mysqler/metadata.rb:1
FC065: Ensure source_url is set in metadata: mysqler/metadata.rb:1
FC066: Ensure chef_version is set in metadata: mysqler/metadata.rb:1
FC069: Ensure standardized license defined in metadata: mysqler/metadata.rb:1
FC077: Metadata uses the deprecated "replaces" keyword: mysqler/metadata.rb:1
Run with Foodcritic Version 11.1.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

1.0.6 passed this metric

No Binaries Metric
            

1.0.6 passed this metric

Publish Metric
            

1.0.6 passed this metric

Supported Platforms Metric
            

1.0.6 passed this metric

Testing File Metric
            

1.0.6 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
            

1.0.6 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