Forge Home

mha

Manage MHA for MySQL install and configuration

9,133 downloads

8,990 latest version

4.6 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.1 (latest)
  • 0.1.0 (deleted)
released Mar 27th 2015
This version is compatible with:

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'trovit-mha', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add trovit-mha
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install trovit-mha --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download

Documentation

trovit/mha — version 0.1.1 Mar 27th 2015

mha

Table of Contents

  1. Overview
  2. Module Description
  3. Usage
  4. Limitations
  5. Development

Overview

puppet-mha installs and configures a MHA (Mysql High Availability) cluster

Module Description

This module is composed by the manager and the node. The node class is really simple, it just installs some helper on the mysqld machine, while the manager is where the magic happens. puppet-mha helps you installing all the packages, configuring multiple MHA instances, giving SSH access to the nodes etc.

Usage

How to install a manager

  $servers_hash = { 'server01' => { 'hostname' => 'my-server-01' },
                    'server02' => { 'hostname' => 'my-server-02',
                                    'skip_reset_slave' => 1 }
                  } 
  mha::instance { 'my_cluster':
    servers              => $servers_hash,
    mysql_password       => 'foo',
    mysql_repl_password  => 'bar',
    ssh_key_priv         => 'ashdkshaksahdkj',
    ssh_key_pub          => '3j234324jn',
    online_change_script => 'profiles/mha/mha_online_change.sh.erb'
  }

Keep in mind that online_change_script and all the other scripts parameters must point to a template YOU have to implement. MHA gives you 100% flexibility about that and so do we.

How to install a node

  include mha::node

Bottom line

This module is thought with the Hiera/create_resource pattern in mind, but you can use it happily without hiera and doing all the dirty work in your manifest.

Limitations

This module is tested only on Debian 7 Wheezy and expects Puppet 3.7

Development

If you have some new cool feature or bugfix, just open a PR and we will take a look at it for sure! Feel free to open any issue you find too (but a PR is always better :P )

Release Notes/Contributors/Etc

Release 0.1.0

Author: Jordi Clariana jordiclariana@gmail.com

Contributors: