cfe-mariadb-cookbook
This installs MariaDB by default and initiates databases and users. It can also install a script that performs a backup of all those databases into a designated S3 bucket.
The server is assumed to be using an IAM role with S3 bucket read/write access, instead of a physical credentials file.
Supported Platforms
Ubuntu 14.04
Attributes
Key | Type | Description | Default |
---|---|---|---|
['cfe-mariadb']['db_map'] | Hash | A hash/array of hashes that enumerate the DB names, users, passwords, etc. of all databases to be set up. Please see the default attributes file for examples. | {} |
['cfe-mariadb']['replication'] | Boolean | Whether replication is enabled or not | false |
['cfe-mariadb']['backup']['s3_region'] | String | AWS S3 region | 'us-east-1' |
['cfe-mariadb']['backup']['s3_bucket'] | String | AWS S3 bucket name | 'example-bucket' |
['cfe-mariadb']['backup']['cron']['min'] | String | The backup cronjob 'minute' value | '0' |
['cfe-mariadb']['backup']['cron']['hour'] | String | The backup cronjob 'hour' value | '0' |
['cfe-mariadb']['backup']['cron']['day'] | String | The backup cronjob 'day of month' value | '*' |
['cfe-mariadb']['backup']['cron']['mon'] | String | The backup cronjob 'month' value | '*' |
['cfe-mariadb']['backup']['cron']['wday'] | String | The backup cronjob 'day of week' value | '*' |
Usage
cfe-mariadb::default
Include cfe-mariadb
in your node's run_list
:
{
"run_list": [
"recipe[cfe-mariadb]"
]
}
cfe-mariadb::backup2s3
This will install the backup script and also enable a cronjob to regularly run that script.
{
"run_list": [
"recipe[cfe-mariadb]",
"recipe[cfe-mariadb::backup2s3]"
]
}
License and Authors
Author:: Earth U. (sysadmin@chromedia.com)