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0.23
- 6.0.22
- 6.0.21
- 6.0.20
- 6.0.19
- 6.0.18
- 6.0.17
- 6.0.16
- 6.0.15
- 6.0.14
- 6.0.13
- 6.0.12
- 6.0.11
- 6.0.10
- 6.0.9
- 6.0.8
- 6.0.7
- 6.0.6
- 6.0.5
- 6.0.4
- 6.0.3
- 6.0.2
- 6.0.1
- 6.0.0
- 5.6.3
- 5.6.2
- 5.6.1
- 5.6.0
- 5.5.4
- 5.5.3
- 5.5.2
- 5.5.1
- 5.5.0
- 5.4.4
- 5.4.3
- 5.4.2
- 5.4.1
- 5.4.0
- 5.3.6
- 5.3.4
- 5.3.2
- 5.3.0
- 5.2.12
- 5.2.10
- 5.2.8
- 5.2.6
- 5.2.4
- 5.2.2
- 5.2.0
- 5.1.12
- 5.1.10
- 5.1.8
- 5.1.6
- 5.1.4
- 5.1.2
- 5.1.0
- 5.0.6
- 5.0.4
- 5.0.2
- 5.0.0
- 4.1.2
- 4.1.1
- 4.1.0
- 4.0.20
- 4.0.18
- 4.0.14
- 4.0.12
- 4.0.10
- 4.0.8
- 4.0.6
- 4.0.4
- 4.0.2
- 4.0.0
- 3.0.12
- 3.0.10
- 3.0.8
- 3.0.6
- 3.0.4
- 3.0.2
- 3.0.0
- 2.1.2
- 2.1.0
- 2.0.2
- 2.0.0
- 1.3.0
- 1.2.6
- 1.2.4
- 1.2.2
- 1.2.1
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.24.4
- 0.24.3
- 0.24.2
- 0.24.1
- 0.24.0
- 0.23.1
- 0.23.0
- 0.22.0
- 0.21.5
- 0.21.3
- 0.21.2
- 0.21.1
- 0.21.0
- 0.20.0
- 0.15.0
- 0.10.0
Provides mysql_service, mysql_config, and mysql_client resources
cookbook 'mysql', '= 2.0.2', :supermarket
knife supermarket install mysql
knife supermarket download mysql
Description
Installs and configures MySQL client or server.
Requirements
Chef 0.10.10+.
Platform
- Debian, Ubuntu
- CentOS, Red Hat, Fedora
- Mac OS X (Using homebrew)
Tested on:
- Debian 5.0, 6.0
- Ubuntu 10.04-12.04
- CentOS 5.5-5.8, 6.2-6.3
- Mac OS X 10.7.2
Cookbooks
Requires Opscode's openssl cookbook for secure password generation.
See Attributes and Usage for more information.
The RubyGem installation in the mysql::ruby
recipe requires a C
compiler and Ruby development headers to be installed in order to
build the mysql gem.
Requires homebrew
cookbook on Mac OS
X.
Resources and Providers
The LWRP that used to ship as part of this cookbook has been
refactored into the
database
cookbook. Please see the README for details on updated usage.
Attributes
See the attributes/server.rb
or attributes/client.rb
for default
values. Several attributes have values that vary based on the node's
platform and version.
-
node['mysql']['client']['packages']
- An array of package names that should be installed on "client" systems. This can be modified, e.g., to specify packages for Percona. node['mysql']['server']['packages']
- An array of package names
that should be installed on "server" systems. This can be modified,
e.g., to specify packages for Percona.node['mysql']['auto-increment-increment']
-
auto-increment-increment value in my.cnfnode['mysql']['auto-increment-offset]
- auto-increment-offset
value in my.cnfnode['mysql']['basedir']
- Base directory where MySQL is installednode['mysql']['bind_address']
- Listen address for MySQLdnode['mysql']['conf_dir']
- Location for mysql conf directorynode['mysql']['confd_dir']
- Location for mysql conf.d style
include directorynode['mysql']['data_dir']
- Location for mysql data directorynode['mysql']['ec2_path']
- location of mysql data_dir on EC2
nodesnode['mysql']['grants_path']
- Path where the grants.sql should be
writtennode['mysql']['mysqladmin_bin']
- Path to the mysqladmin binarynode['mysql']['old_passwords']
- Sets theold_passwords
value in
my.cnf.node['mysql']['pid_file']
- Path to the mysqld.pid filenode['mysql']['port']
- Liten port for MySQLdnode['mysql']['reload_action']
- Action to take when mysql conf
files are modified. Also allows "reload" and "none".node['mysql']['root_group']
- The default group of the "root" usernode['mysql']['service_name']
- The name of the mysqld servicenode['mysql']['socket']
- Path to the mysqld.sock filenode['mysql']['use_upstart']
- Whether to use upstart for the
service provider
Performance and other "tunable" attributes are under the
node['mysql']['tunable']
attribute, corresponding to the same-named
parameter in my.cnf, and the default values are used. See
attributes/server.rb
.
The following attributes are randomly generated passwords handled in
the mysql::server
recipe, using the OpenSSL cookbook's
secure_password
helper method. These are set using the set_unless
node attribute method, which allows them to be easily overridden e.g.
in a role.
-
node['mysql']['server_root_password']
- Set the server's root password -
node['mysql']['server_repl_password']
- Set the replication user 'repl' password -
node['mysql']['server_debian_password']
- Set the debian-sys-maint user password
Windows Specific
The following attributes are specific to Windows platforms.
-
node['mysql']['client']['version']
- The version of MySQL connector to install. -
node['mysql']['client']['arch']
- Force 32 bit to work with the mysql gem -
node['mysql']['client']['package_file']
- The MSI file for the mysql connector. -
node['mysql']['client']['url']
- URL to download the mysql connector. -
node['mysql']['client']['packages']
- Similar to other platforms, this is the name of the client package. -
node['mysql']['client']['basedir']
- Base installation location -
node['mysql']['client']['lib_dir']
- Libraries under the base location -
node['mysql']['client']['bin_dir']
- binary directory under base location -
node['mysql']['client']['ruby_dir']
- location where the Ruby binaries will be
Usage
On client nodes, use the client (or default) recipe:
{ "run_list": ["recipe[mysql::client]"] }
This will install the MySQL client libraries and development headers
on the system.
On nodes which may use the database
cookbook's mysql resources, also
use the ruby recipe. This installs the mysql RubyGem in the Ruby
environment Chef is using via chef_gem
.
{ "run_list": ["recipe[mysql::client]", "recipe[mysql::ruby]"] }
If you need to install the mysql Ruby library as a package for your
system, override the client packages attribute in your node or role.
For example, on an Ubuntu system:
{
"mysql": {
"client": {
"packages": ["mysql-client", "libmysqlclient-dev","ruby-mysql"]
}
}
}
This creates a resource object for the package and does the
installation before other recipes are parsed. You'll need to have the
C compiler and such (ie, build-essential on Ubuntu) before running the
recipes, but we already do that when installing Chef :-).
On server nodes, use the server recipe:
{ "run_list": ["recipe[mysql::server]"] }
On Debian and Ubuntu, this will preseed the mysql-server package with
the randomly generated root password in the recipe file. On other
platforms, it simply installs the required packages. It will also
create an SQL file, /etc/mysql/grants.sql
, that will be used to set up
grants for the root, repl and debian-sys-maint users.
The recipe will perform a node.save
unless it is run under
chef-solo
after the password attributes are used to ensure that in
the event of a failed run, the saved attributes would be used.
On EC2 nodes, use the server_ec2
recipe and the mysql data dir will
be set up in the ephmeral storage.
{ "run_list": ["recipe[mysql::server_ec2]"] }
When the ec2_path
doesn't exist we look for a mounted filesystem
(eg, EBS) and move the data_dir there.
The client recipe is already included by server and 'default' recipes.
For more infromation on the compile vs execution phase of a Chef run:
Chef Solo Note
These node attributes are stored on the Chef
server when using chef-client
. Because chef-solo
does not
connect to a server or save the node object at all, to have the same
passwords persist across chef-solo
runs, you must specify them in
the json_attribs
file used. For example:
{
"mysql": {
"server_root_password": "iloverandompasswordsbutthiswilldo",
"server_repl_password": "iloverandompasswordsbutthiswilldo",
"server_debian_password": "iloverandompasswordsbutthiswilldo"
},
"run_list":["recipe[mysql::server]"]
}
License and Author
- Author:: Joshua Timberman (joshua@opscode.com)
- Author:: AJ Christensen (aj@opscode.com)
- Author:: Seth Chisamore (schisamo@opscode.com)
- Author:: Brian Bianco (brian.bianco@gmail.com)
- Author:: Jesse Howarth (him@jessehowarth.com)
- Author:: Andrew Crump (andrew@kotirisoftware.com)
Copyright:: 2009-2012 Opscode, Inc
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.