mariadb

pdk
Puppet Module for managing MariaDB

Chris Edester

edestecd

12,028 downloads

1,168 latest version

5.0 quality score

Version information

  • 2.1.1 (latest)
  • 2.1.0
  • 2.0.1
  • 2.0.0
  • 1.1.1
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0
  • 0.6.0
  • 0.5.0
released Aug 26th 2020
This version is compatible with:
  • Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x, 2017.3.x, 2017.2.x, 2017.1.x, 2016.5.x, 2016.4.x
  • Puppet >= 4.7.0 < 7.0.0
  • RedHat
    ,
    CentOS
    ,
    Debian
    ,
    Ubuntu

Start using this module

Documentation

edestecd/mariadb — version 2.1.1 Aug 26th 2020

mariadb

Build Status Puppet Forge Puppet Forge Downloads Puppet Forge Score

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with mariadb
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module
  8. Contributors

Overview

Puppet Module to install/configure MariaDB client/cluster/server

Module Description

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:

  • MariaDB Client
  • MariaDB Galera Cluster
  • MariaDB Server
  • MariaDB Repo

Setup

What mariadb affects

  • mariadb package install
  • mariadb config files
  • mariadb services
  • mariadb user/group (optional)

Setup Requirements

only need to install the module

Beginning with mariadb

Minimal mariadb client install for command line use:

include mariadb::client

Usage

Manage the server with pam authentication

class { 'mariadb::server':
  auth_pam => true,
}

Also manage the server user and group

class { 'mariadb::server':
  manage_user => true,
  uid         => 494,
  gid         => 494,
  shell       => '/sbin/nologin',
}

Customize the cluster config

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',
    },
  }
}

Configure with hiera yaml

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

Reference

Classes

  • mariadb::client
  • mariadb::cluster
  • mariadb::server
  • mariadb::repo

Limitations

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 :)..

Development

Pull Requests welcome