Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (45 sloc) 2.36 KB

DESCRIPTION:

MySQL recipes for setting up clients, servers, and MySQL replication.

For replication, you only have to set the 'mysql/server/replication/role' attribute to either 'master', 'dualmaster', or 'slave' (depending on what sort of infrastructure you're looking for), and everything sets itself up as required. Automatic MySQL replication requires use of the Opscode Platform or an installation of chef-server.

If you don't plan on using automated MySQL replication, you can alternatively just apply the mysql::server or mysql::client roles, which should setup a plain box that can be configured for replication through other means.

This cookbook conflicts with the percona cookbook, since both this cookbook and the percona cookbook set the same attributes, plus they also don't play well together on the same box.

REQUIREMENTS:

Red Hat/CentOS preferred.

ATTRIBUTES:

attributes/replication.rb contains default, tunable attributes for MySQL replication. attributes/default.rb applies to all server types.

USAGE:

Create a node/role file, and make sure you have this general structure:

default_attributes "mysql" => {
                     "server" => {
                       "bindaddress" => "<ip>",
                       "datadir" => "/var/lib/mysql",
                       "logdir" => "/var/log/mysql",
                       "replication" => {
                         "role" => "master",
                         "user" => "replication",
                         "password" => "foobar"
                       }
                     }
                   }

LICENSE AND AUTHOR:

Author

Lee Huffman (<lee.huffman@blueboxgrp.com>) - mysql::client, mysql::default, mysql::server

Author

Christian Paredes (<christian.paredes@blueboxgrp.com>) - mysql::master, mysql::slave, mysql::dualmaster

Copyright

2010, Blue Box Group, LLC

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Jump to Line
Something went wrong with that request. Please try again.