Update README

Edits sentences for spelling, capitalization, and grammar. Edits sentences for contextual consistency and clarity. Adds some missing descriptions.
This commit is contained in:
Lauren Rother 2014-01-08 13:48:19 -08:00
parent e667d52c91
commit c752a3da8f

113
README.md
View file

@ -15,42 +15,40 @@
##Overview ##Overview
The MySQL module installs, configures, and manages the MySQL service. The mysql module installs, configures, and manages the MySQL service.
##Module Description ##Module Description
The MySQL module manages both the installation and configuration of MySQL as The mysql module manages both the installation and configuration of MySQL as
well as extends Puppet to allow management of MySQL resources, such as well as extends Puppet to allow management of MySQL resources, such as
databases, users, and grants. databases, users, and grants.
##Backwards Compatibility ##Backwards Compatibility
This module has just undergone a very large rewrite. As a result it will no This module has just undergone a very large rewrite. Some new classes have been added, and many previous classes and configurations work differently than before. We've attempted to handle backwards compatibility automatically by adding a
longer work with the previous classes and configuration as before. We've
attempted to handle backwards compatibility automatically by adding a
`attempt_compatibility_mode` parameter to the main mysql class. If you set `attempt_compatibility_mode` parameter to the main mysql class. If you set
this to true it will attempt to map your previous parameters into the new this to 'true' it will attempt to map your previous parameters into the new
`mysql::server` class. `mysql::server` class.
###WARNING #####WARNING
This may fail. It may eat your MySQL server. PLEASE test it before running it Compatibility mode may fail. It may eat your MySQL server. PLEASE test it before running it live, even if the test is just a no-op and manual comparison. Please be careful!
live. Even if it's just a no-op and a manual comparison. Please be careful!
##Setup ##Setup
###What MySQL affects ###What MySQL affects
* MySQL package. * MySQL package
* MySQL configuration files. * MySQL configuration files
* MySQL service. * MySQL service
###Beginning with MySQL ###Beginning with MySQL
If you just want a server installing with the default options you can run If you just want a server installed with the default options you can run
`include '::mysql::server'`. If you need to customize options, such as the root `include '::mysql::server'`.
password or /etc/my.cnf settings then you can also include `mysql::server` and
pass in an override hash as seen below: If you need to customize options, such as the root
password or `/etc/my.cnf` settings, then you must also pass in an override hash:
```puppet ```puppet
class { '::mysql::server': class { '::mysql::server':
@ -81,13 +79,12 @@ For items that you would traditionally represent as:
<pre> <pre>
[section] [section]
thing thing = X
</pre> </pre>
You can just make an entry like `thing => true` in the hash. MySQL doesn't You can just make an entry like `thing => true` or `thing => value` in the hash. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both.
care if thing is alone or set to a value, it'll happily accept both.
If an option need multiple instances, you can pass an Array. For example : If an option needs multiple instances, you can pass an array. For example
```puppet ```puppet
$override_options = { $override_options = {
@ -97,7 +94,7 @@ $override_options = {
} }
``` ```
will produce : will produce
<pre> <pre>
[mysql] [mysql]
@ -107,10 +104,8 @@ replicate-do-db = base2
###Custom configuration ###Custom configuration
To add custom mysql configuration you can drop additional files into To add custom MySQL configuration, drop additional files into
`/etc/mysql/conf.d/` in order to override settings or add additional ones (if you `/etc/mysql/conf.d/`. Dropping files into conf.d allows you to override settings or add additional ones, which is helpful if you choose not to use `override_options` in `mysql::server`. The conf.d location is hardcoded into the my.cnf template file.
choose not to use override_options in `mysql::server`). This location is
hardcoded into the my.cnf template file.
##Reference ##Reference
@ -143,16 +138,16 @@ hardcoded into the my.cnf template file.
#####`root_password` #####`root_password`
What is the MySQL root password. Puppet will attempt to set it to this and update `/root/.my.cnf`. The MySQL root password. Puppet will attempt to set the root password and update `/root/.my.cnf` with it.
#####`old_root_password` #####`old_root_password`
What was the previous root password (REQUIRED if you wish to change the root password via Puppet.) The previous root password (**REQUIRED** if you wish to change the root password via Puppet.)
#####`override_options` #####`override_options`
This is the hash of override options to pass into MySQL. It can be visualized The hash of override options to pass into MySQL. It can be structured
like a hash of the my.cnf file, so that entries look like: like a hash in the my.cnf file, so entries look like
```puppet ```puppet
$override_options = { $override_options = {
@ -166,11 +161,10 @@ For items that you would traditionally represent as:
<pre> <pre>
[section] [section]
thing thing = X
</pre> </pre>
You can just make an entry like `thing => true` in the hash. MySQL doesn't You can just make an entry like `thing => true` or `thing => value` in the hash. MySQL doesn't care if 'thing' is alone or set to a value; it'll happily accept both.
care if thing is alone or set to a value, it'll happily accept both.
#####`config_file` #####`config_file`
@ -178,15 +172,15 @@ The location of the MySQL configuration file.
#####`manage_config_file` #####`manage_config_file`
Should we manage the MySQL configuration file. Whether the MySQL configuration file should be managed.
#####`purge_conf_dir` #####`purge_conf_dir`
Should we purge the conf.d directory? Whether the conf.d directory should be purged.
#####`restart` #####`restart`
Should the service be restarted when things change? Whether the service should be restarted when things change.
#####`root_group` #####`root_group`
@ -194,11 +188,11 @@ What is the group used for root?
#####`package_ensure` #####`package_ensure`
What to set the package to. Can be present, absent, or version. What to set the package to. Can be 'present', 'absent', or '[version]'.
#####`package_name` #####`package_name`
What is the name of the mysql server package to install. The name of the mysql server package to install.
#####`remove_default_accounts` #####`remove_default_accounts`
@ -215,15 +209,16 @@ Boolean to decide if the service should be managed.
#####`service_name` #####`service_name`
What is the name of the mysql server service. The name of the mysql server service.
#####`service_provider` #####`service_provider`
Which provider to use to manage the service. The provider to use to manage the service.
#####`users` #####`users`
Optional hash of users to create, which are passed to [mysql_user](#mysql_user). Example: Optional hash of users to create, which are passed to [mysql_user](#mysql_user).
```puppet ```puppet
$users = { $users = {
'someuser@localhost' => { 'someuser@localhost' => {
@ -239,7 +234,8 @@ $users = {
#####`grants` #####`grants`
Optional hash of grants, which are passed to [mysql_grant](#mysql_grant). Example: Optional hash of grants, which are passed to [mysql_grant](#mysql_grant).
```puppet ```puppet
$grants = { $grants = {
'someuser@localhost/somedb.*' => { 'someuser@localhost/somedb.*' => {
@ -254,7 +250,8 @@ $grants = {
#####`databases` #####`databases`
Optional hash of databases to create, which are passed to [mysql_database](#mysql_database). Example: Optional hash of databases to create, which are passed to [mysql_database](#mysql_database).
```puppet ```puppet
$databases = { $databases = {
'somedb' => { 'somedb' => {
@ -266,11 +263,13 @@ $databases = {
#####`service_provider` #####`service_provider`
The provider for the service
####mysql::server::backup ####mysql::server::backup
#####`backupuser` #####`backupuser`
MySQL user to create for backing up. MySQL user to create for backups.
#####`backuppassword` #####`backuppassword`
@ -278,7 +277,7 @@ MySQL user password for backups.
#####`backupdir` #####`backupdir`
Directory to backup into. Directory to back up into.
#####`backupdirmode` #####`backupdirmode`
@ -309,19 +308,19 @@ Boolean to determine if you should cleanup before backing up or after.
#####`backupdatabases` #####`backupdatabases`
Array of databases to specifically backup. Array of databases to specifically back up.
#####`file_per_database` #####`file_per_database`
Should a separate file be used per database. Whether a separate file be used per database.
#####`ensure` #####`ensure`
Present or absent, allows you to remove the backup scripts. Allows you to remove the backup scripts. Can be 'present' or 'absent'.
#####`time` #####`time`
An array of two elements to set the time to backup. Allows ['23', '5'] or ['3', '45'] for HH:MM times. An array of two elements to set the backup time. Allows ['23', '5'] or ['3', '45'] for HH:MM times.
####mysql::server::monitor ####mysql::server::monitor
@ -361,7 +360,7 @@ Boolean to decide if the Ruby bindings should be installed.
#####`java_package_ensure` #####`java_package_ensure`
What to set the package to. Can be present, absent, or version. What to set the package to. Can be 'present', 'absent', or '[version]'.
#####`java_package_name` #####`java_package_name`
@ -373,7 +372,7 @@ What provider should be used to install the package.
#####`perl_package_ensure` #####`perl_package_ensure`
What to set the package to. Can be present, absent, or version. What to set the package to. Can be 'present', 'absent', or '[version]'.
#####`perl_package_name` #####`perl_package_name`
@ -385,7 +384,7 @@ What provider should be used to install the package.
#####`python_package_ensure` #####`python_package_ensure`
What to set the package to. Can be present, absent, or version. What to set the package to. Can be 'present', 'absent', or '[version]'.
#####`python_package_name` #####`python_package_name`
@ -397,7 +396,7 @@ What provider should be used to install the package.
#####`ruby_package_ensure` #####`ruby_package_ensure`
What to set the package to. Can be present, absent, or version. What to set the package to. Can be 'present', 'absent', or '[version]'.
#####`ruby_package_name` #####`ruby_package_name`
@ -415,7 +414,7 @@ Boolean to automatically install all bindings.
#####`package_ensure` #####`package_ensure`
What to set the package to. Can be present, absent, or version. What to set the package to. Can be 'present', 'absent', or '[version]'.
#####`package_name` #####`package_name`
@ -425,7 +424,7 @@ What is the name of the mysql client package to install.
####mysql::db ####mysql::db
Creates a database with a user and assign some privileges. Creates a database with a user and assigns some privileges.
```puppet ```puppet
mysql::db { 'mydb': mysql::db { 'mydb':
@ -440,7 +439,7 @@ Creates a database with a user and assign some privileges.
####mysql_database ####mysql_database
mysql_database can be used to create and manage databases within MySQL: `mysql_database` can be used to create and manage databases within MySQL.
```puppet ```puppet
mysql_database { 'information_schema': mysql_database { 'information_schema':
@ -457,7 +456,7 @@ mysql_database { 'mysql':
####mysql_user ####mysql_user
mysql_user can be used to create and manage user grants within MySQL: `mysql_user` can be used to create and manage user grants within MySQL.
```puppet ```puppet
mysql_user { 'root@127.0.0.1': mysql_user { 'root@127.0.0.1':
@ -471,7 +470,7 @@ mysql_user { 'root@127.0.0.1':
####mysql_grant ####mysql_grant
mysql_grant can be used to create grant permissions to access databases within `mysql_grant` can be used to create grant permissions to access databases within
MySQL. To use it you must create the title of the resource as shown below, MySQL. To use it you must create the title of the resource as shown below,
following the pattern of `username@hostname/database.table`: following the pattern of `username@hostname/database.table`: