Puppet Module to install/configure MariaDB client/cluster/server
Uses the puppetlabs/mysql module to provide install/config/service/types/etc management.
This module basically manages the official mariadb repo and wraps the mysql module with the correct params to switch to the maria packages.
For the cluster, it also provides management of the wsrep mysql user and galera/wsrep specific config in a separate file.
Also provided are wsrep var and status facts to monitor your cluster from your fav fact reporter ;)
The mariadb module provides some classes to install and configure:
only need to install the module
Minimal mariadb client install for command line use:
include mariadb::client
class { 'mariadb::server':
auth_pam => true,
}
class { 'mariadb::server':
manage_user => true,
uid => 494,
gid => 494,
shell => '/sbin/nologin',
}
class { 'mariadb::cluster':
wsrep_cluster_peers => delete(['192.168.1.1', '192.168.1.2', '192.168.1.3'], $::ipaddress),
wsrep_cluster_name => 'my_super_cluster',
wsrep_sst_password => 'super_secret_password',
wsrep_sst_method => 'xtrabackup-v2',
root_password => 'another_secret_password',
override_options => {
'mysqld' => {
'performance_schema' => undef,
'innodb_file_per_table' => 'OFF',
},
},
galera_override_options => {
'mysqld' => {
'wsrep_slave_threads' => '2',
'innodb_flush_log_at_trx_commit' => '0',
},
}
}
include mariadb::cluster
---
mariadb::cluster::manage_timezone: true
mariadb::cluster::wsrep_cluster_peers:
- 192.168.1.1
- 192.168.1.2
mariadb::cluster::wsrep_cluster_name: my_super_cluster
mariadb::cluster::wsrep_sst_method: rsync
mariadb::cluster::root_password: another_secret_password
mariadb::cluster::override_options:
mysqld:
performance_schema: OFF
innodb_file_per_table: OFF
mariadb::cluster::galera_override_options:
mysqld:
wsrep_slave_threads: 2
innodb_flush_log_at_trx_commit: 0
This module has been built on and tested against Puppet 3.8 and higher.
While I am sure other versions work, I have not tested them.
This module supports modern RedHat and Debian based systems.
No plans to support other versions (unless you add it :)..
Pull Requests welcome