167 lines
16 KiB
JSON
167 lines
16 KiB
JSON
{
|
|
"name": "mysql",
|
|
"version": "4.1.2",
|
|
"description": "Installs and configures mysql for client or server",
|
|
"long_description": "mysql Cookbook\n==============\n[](http://travis-ci.org/opscode-cookbooks/mysql)\n\nInstalls and configures MySQL client or server.\n\nRequirements\n------------\nChef 0.10.10+.\n\nPlatform\n--------\n- Debian, Ubuntu\n- CentOS, Red Hat, Fedora\n- Mac OS X (Using homebrew)\n\nTested on:\n\n- Ubuntu 10.04, 12.04\n- CentOS 5.9, 6.5\n\nSee TESTING.md for information about running tests in Opscode's Test Kitchen.\n\n\nCookbooks\n---------\nRequires Opscode's openssl cookbook for secure password generation. See _Attributes_ and _Usage_ for more information.\n\nThe 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.\n\nRequires `homebrew` [cookbook](http://community.opscode.com/cookbooks/homebrew) on Mac OS X.\n\n\nResources and Providers\n-----------------------\nThe LWRP that used to ship as part of this cookbook has been refactored into the\n[database](http://community.opscode.com/cookbooks/database) cookbook. Please see the README for details on updated usage.\n\n\nAttributes\n----------\nSee 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.\n\n* `node['mysql']['port']` - Listen port for MySQLd\n* `node['mysql']['data_dir']` - Location for mysql data directory. `WARNING` This will only on initial converge. It will not move data around if you change it.\n\n* `node['mysql']['client']['packages']` - An array of package names\n that should be installed on \"client\" systems. This can be modified,\n e.g., to specify packages for Percona.\n* `node['mysql']['server']['packages']` - An array of package names\n that should be installed on \"server\" systems. This can be modified,\n e.g., to specify packages for Percona.\n* `node['mysql']['auto-increment-increment']` -\n auto-increment-increment value in my.cnf\n* `node['mysql']['auto-increment-offset]` - auto-increment-offset value in my.cnf\n* `node['mysql']['server']['basedir']` - Base directory where MySQL is installed\n* `node['mysql']['bind_address']` - Listen address for MySQLd\n* `node['mysql']['ec2_path']` - location of mysql data_dir on EC2 nodes\n* `node['mysql']['grants_path']` - Path where the grants.sql should be written\n* `node['mysql']['mysqladmin_bin']` - Path to the mysqladmin binary\n* `node['mysql']['server']['old_passwords']` - Sets the `old_passwords` value in my.cnf.\n* `node['mysql']['server']['pid_file']` - Path to the mysqld.pid file\n\n* `node['mysql']['server']['reload_action']` - Action to take when mysql conf\n files are modified. Also allows \"reload\" and \"none\".\n* `node['mysql']['server']['root_group']` - The default group of the \"root\" user\n* `node['mysql']['server']['service_name']` - The name of the mysqld service\n* `node['mysql']['server']['socket']` - Path to the mysqld.sock file\n* `mysql['root_network_acl']` - Set define the network the root user will be able to login from, default is nil\n\nPerformance 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`.\n\nBy default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment.\n\n* `node['mysql']['remove_anonymous_users']` - Remove anonymous users\n\nNormally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network.\n\n* `node['mysql']['allow_remote_root']` - If true Sets root access from '%'. If false deletes any non-localhost root users.\n\nBy default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. This will also drop any user privileges to the test database and any DB named test_% .\n\n* `node['mysql']['remove_test_database']` - Delete the test database and access to it.\n\nThe 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.\nin a role.\n\n* `node['mysql']['server_root_password']` - Set the server's root\n password\n* `node['mysql']['server_repl_password']` - Set the replication user\n 'repl' password\n* `node['mysql']['server_debian_password']` - Set the debian-sys-maint\n user password\n\n### Windows Specific\n\nThe following attributes are specific to Windows platforms.\n\n* `node['mysql']['client']['version']` - The version of MySQL\n connector to install.\n* `node['mysql']['client']['arch']` - Force 32 bit to work with the\n mysql gem\n* `node['mysql']['client']['package_file']` - The MSI file for the\n mysql connector.\n* `node['mysql']['client']['url']` - URL to download the mysql\n connector.\n* `node['mysql']['client']['packages']` - Similar to other platforms,\n this is the name of the client package.\n* `node['mysql']['client']['basedir']` - Base installation location\n* `node['mysql']['client']['lib_dir']` - Libraries under the base location\n* `node['mysql']['client']['bin_dir']` - binary directory under base location\n* `node['mysql']['client']['ruby_dir']` - location where the Ruby\n binaries will be\n\n## Security Options\n\nFurther information is already available at [Symantec](http://www.symantec.com/connect/articles/securing-mysql-step-step) and [Deutsche Telekom (German)](http://www.telekom.com/static/-/155996/7/technische-sicherheitsanforderungen-si)\n\n* default['mysql']['security']['chroot'] - [chroot](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_chroot)\n* default['mysql']['security']['safe_user_create'] - [safe-user-create](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_safe-user-create)\n* default['mysql']['security']['secure_auth'] - [secure-auth](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_secure-auth)\n* default['mysql']['security']['skip_symbolic_links'] - [skip-symbolic-links](http://dev.mysql.com/doc/refman/5.7/en/server-\noptions.html#option_mysqld_symbolic-links)\n* default['mysql']['security']['skip_show_database'] - [skip-show-database](http://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_skip-show-database)\n* default['mysql']['security']['local_infile'] - [local-infile](http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_local_infile)\n\nUsage\n-----\nOn client nodes, use the client (or default) recipe:\n\n```javascript\n{ \"run_list\": [\"recipe[mysql::client]\"] }\n```\n\nThis will install the MySQL client libraries and development headers on the system.\n\nOn 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`.\n\n```javascript\n{ \"run_list\": [\"recipe[mysql::client]\", \"recipe[mysql::ruby]\"] }\n```\n\nIf 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:\n\n```javascript\n{\n \"mysql\": {\n \"client\": {\n \"packages\": [\"mysql-client\", \"libmysqlclient-dev\",\"ruby-mysql\"]\n }\n }\n}\n```\n\nThis 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 :-).\n\nOn server nodes, use the server recipe:\n\n```javascript\n{ \"run_list\": [\"recipe[mysql::server]\"] }\n```\n\nOn 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.\n\nThe 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.\n\nOn EC2 nodes, use the `server_ec2` recipe and the mysql data dir will be set up in the ephmeral storage.\n\n```javascript\n{ \"run_list\": [\"recipe[mysql::server_ec2]\"] }\n```\n\nWhen the `ec2_path` doesn't exist we look for a mounted filesystem (eg, EBS) and move the data_dir there.\n\nThe client recipe is already included by server and 'default' recipes.\n\nFor more infromation on the compile vs execution phase of a Chef run:\n\n- http://wiki.opscode.com/display/chef/Anatomy+of+a+Chef+Run\n\n\nChef Solo Note\n--------------\nThese 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:\n\n```javascript\n{\n \"mysql\": {\n \"server_root_password\": \"iloverandompasswordsbutthiswilldo\",\n \"server_repl_password\": \"iloverandompasswordsbutthiswilldo\",\n \"server_debian_password\": \"iloverandompasswordsbutthiswilldo\"\n },\n \"run_list\":[\"recipe[mysql::server]\"]\n}\n```\n\n\nLicense & Authors\n-----------------\n- Author:: Joshua Timberman (<joshua@opscode.com>)\n- Author:: AJ Christensen (<aj@opscode.com>)\n- Author:: Seth Chisamore (<schisamo@opscode.com>)\n- Author:: Brian Bianco (<brian.bianco@gmail.com>)\n- Author:: Jesse Howarth (<him@jessehowarth.com>)\n- Author:: Andrew Crump (<andrew@kotirisoftware.com>)\n- Author:: Christoph Hartmann (<chris@lollyrock.com>)\n- Author:: Sean OMeara (<someara@opscode.com>)\n\n```text\nCopyright:: 2009-2013 Opscode, Inc\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n",
|
|
"maintainer": "Opscode, Inc.",
|
|
"maintainer_email": "cookbooks@opscode.com",
|
|
"license": "Apache 2.0",
|
|
"platforms": {
|
|
"redhat": ">= 0.0.0",
|
|
"amazon": ">= 0.0.0",
|
|
"centos": ">= 0.0.0",
|
|
"debian": ">= 0.0.0",
|
|
"ubuntu": ">= 0.0.0",
|
|
"freebsd": ">= 0.0.0",
|
|
"mac_os_x": ">= 0.0.0",
|
|
"scientific": ">= 0.0.0",
|
|
"suse": ">= 0.0.0",
|
|
"windows": ">= 0.0.0"
|
|
},
|
|
"dependencies": {
|
|
"openssl": "~> 1.1",
|
|
"build-essential": "~> 1.4",
|
|
"homebrew": ">= 0.0.0",
|
|
"windows": ">= 0.0.0"
|
|
},
|
|
"recommendations": {
|
|
},
|
|
"suggestions": {
|
|
},
|
|
"conflicting": {
|
|
},
|
|
"providing": {
|
|
},
|
|
"replacing": {
|
|
},
|
|
"attributes": {
|
|
"mysql/server_root_password": {
|
|
"display_name": "MySQL Server Root Password",
|
|
"description": "Randomly generated password for the mysqld root user",
|
|
"default": "randomly generated"
|
|
},
|
|
"mysql/bind_address": {
|
|
"display_name": "MySQL Bind Address",
|
|
"description": "Address that mysqld should listen on",
|
|
"default": "ipaddress"
|
|
},
|
|
"mysql/data_dir": {
|
|
"display_name": "MySQL Data Directory",
|
|
"description": "Location of mysql databases",
|
|
"default": "/var/lib/mysql"
|
|
},
|
|
"mysql/conf_dir": {
|
|
"display_name": "MySQL Conf Directory",
|
|
"description": "Location of mysql conf files",
|
|
"default": "/etc/mysql"
|
|
},
|
|
"mysql/ec2_path": {
|
|
"display_name": "MySQL EC2 Path",
|
|
"description": "Location of mysql directory on EC2 instance EBS volumes",
|
|
"default": "/mnt/mysql"
|
|
},
|
|
"mysql/reload_action": {
|
|
"display_name": "MySQL conf file reload action",
|
|
"description": "Action to take when mysql conf files are modified",
|
|
"default": "reload"
|
|
},
|
|
"mysql/tunable": {
|
|
"display_name": "MySQL Tunables",
|
|
"description": "Hash of MySQL tunable attributes",
|
|
"type": "hash"
|
|
},
|
|
"mysql/tunable/key_buffer": {
|
|
"display_name": "MySQL Tuntable Key Buffer",
|
|
"default": "250M"
|
|
},
|
|
"mysql/tunable/max_connections": {
|
|
"display_name": "MySQL Tunable Max Connections",
|
|
"default": "800"
|
|
},
|
|
"mysql/tunable/wait_timeout": {
|
|
"display_name": "MySQL Tunable Wait Timeout",
|
|
"default": "180"
|
|
},
|
|
"mysql/tunable/net_read_timeout": {
|
|
"display_name": "MySQL Tunable Net Read Timeout",
|
|
"default": "30"
|
|
},
|
|
"mysql/tunable/net_write_timeout": {
|
|
"display_name": "MySQL Tunable Net Write Timeout",
|
|
"default": "30"
|
|
},
|
|
"mysql/tunable/back_log": {
|
|
"display_name": "MySQL Tunable Back Log",
|
|
"default": "128"
|
|
},
|
|
"mysql/tunable/table_cache": {
|
|
"display_name": "MySQL Tunable Table Cache for MySQL < 5.1.3",
|
|
"default": "128"
|
|
},
|
|
"mysql/tunable/table_open_cache": {
|
|
"display_name": "MySQL Tunable Table Cache for MySQL >= 5.1.3",
|
|
"default": "128"
|
|
},
|
|
"mysql/tunable/max_heap_table_size": {
|
|
"display_name": "MySQL Tunable Max Heap Table Size",
|
|
"default": "32M"
|
|
},
|
|
"mysql/tunable/expire_logs_days": {
|
|
"display_name": "MySQL Exipre Log Days",
|
|
"default": "10"
|
|
},
|
|
"mysql/tunable/max_binlog_size": {
|
|
"display_name": "MySQL Max Binlog Size",
|
|
"default": "100M"
|
|
},
|
|
"mysql/client": {
|
|
"display_name": "MySQL Connector/C Client",
|
|
"description": "Hash of MySQL client attributes",
|
|
"type": "hash"
|
|
},
|
|
"mysql/client/version": {
|
|
"display_name": "MySQL Connector/C Version",
|
|
"default": "6.0.2"
|
|
},
|
|
"mysql/client/arch": {
|
|
"display_name": "MySQL Connector/C Architecture",
|
|
"default": "win32"
|
|
},
|
|
"mysql/client/package_file": {
|
|
"display_name": "MySQL Connector/C Package File Name",
|
|
"default": "mysql-connector-c-6.0.2-win32.msi"
|
|
},
|
|
"mysql/client/url": {
|
|
"display_name": "MySQL Connector/C Download URL",
|
|
"default": "http://www.mysql.com/get/Downloads/Connector-C/mysql-connector-c-6.0.2-win32.msi/from/http://mysql.mirrors.pair.com/"
|
|
},
|
|
"mysql/client/package_name": {
|
|
"display_name": "MySQL Connector/C Registry DisplayName",
|
|
"default": "MySQL Connector C 6.0.2"
|
|
},
|
|
"mysql/client/basedir": {
|
|
"display_name": "MySQL Connector/C Base Install Directory",
|
|
"default": "C:\\Program Files (x86)\\MySQL\\Connector C 6.0.2"
|
|
},
|
|
"mysql/client/lib_dir": {
|
|
"display_name": "MySQL Connector/C Library Directory (containing libmysql.dll)",
|
|
"default": "C:\\Program Files (x86)\\MySQL\\Connector C 6.0.2\\lib\\opt"
|
|
},
|
|
"mysql/client/bin_dir": {
|
|
"display_name": "MySQL Connector/C Executable Directory",
|
|
"default": "C:\\Program Files (x86)\\MySQL\\Connector C 6.0.2\\bin"
|
|
},
|
|
"mysql/client/ruby_dir": {
|
|
"display_name": "Ruby Executable Directory which should gain MySQL support",
|
|
"default": "system ruby"
|
|
}
|
|
},
|
|
"groupings": {
|
|
},
|
|
"recipes": {
|
|
"mysql": "Includes the client recipe to configure a client",
|
|
"mysql::client": "Installs packages required for mysql clients using run_action magic",
|
|
"mysql::server": "Installs packages required for mysql servers w/o manual intervention",
|
|
"mysql::server_ec2": "Performs EC2-specific mountpoint manipulation"
|
|
}
|
|
} |