All Projects → hfm → Puppet Mha

hfm / Puppet Mha

The MHA module handles installing, configuring, and running MHA for MySQL.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Puppet Mha

Phalcon Vm
Vagrant configuration for PHP7, Phalcon 3.x and Zephir development.
Stars: ✭ 43 (+760%)
Mutual labels:  puppet, mysql
Hospital Management System
"Health Care hospital" Management System is designed for manage details about hospital patient,employee and rooms(10). Designed by using HTML / CSS / JS / JQUERY/ PHP (procedural php) / MYSQL.
Stars: ✭ 5 (+0%)
Mutual labels:  mysql
Xorm
Simple and Powerful ORM for Go, support mysql,postgres,tidb,sqlite3,mssql,oracle, Moved to https://gitea.com/xorm/xorm
Stars: ✭ 6,464 (+129180%)
Mutual labels:  mysql
Schemats
Generate typescript interface definitions from SQL database schema
Stars: ✭ 799 (+15880%)
Mutual labels:  mysql
Funpyspidersearchengine
Word2vec 千人千面 个性化搜索 + Scrapy2.3.0(爬取数据) + ElasticSearch7.9.1(存储数据并提供对外Restful API) + Django3.1.1 搜索
Stars: ✭ 782 (+15540%)
Mutual labels:  mysql
Geek Framework
基于SpringBoot+Shiro+Redis+Jwt+Thymeleaf+MyBatis 开发的后台用户、角色、权限、会员管理、RestFul、Token和前台用户登录注册以及前后台用户分离的脚手架,技术交流请加QQ群:805442966
Stars: ✭ 804 (+15980%)
Mutual labels:  mysql
Dble
A High Scalability Middle-ware for MySQL Sharding
Stars: ✭ 774 (+15380%)
Mutual labels:  mysql
Diesel
A safe, extensible ORM and Query Builder for Rust
Stars: ✭ 7,702 (+153940%)
Mutual labels:  mysql
Sqltabs
Rich SQL client for Postgresql, MySQL, MS SQL, Amazon Redshift, Google Firebase (Firestore)
Stars: ✭ 809 (+16080%)
Mutual labels:  mysql
Kingbus
A distributed MySQL binlog storage system built on Raft
Stars: ✭ 798 (+15860%)
Mutual labels:  mysql
Mysqltools
一个用于快速构建大规模,高质量,全自动化的 mysql分布式集群环境的工具;包含mysql 安装、备份、监控、高可用、读写分离、优化、巡检、自行化运维
Stars: ✭ 795 (+15800%)
Mutual labels:  mysql
Fluentpdo
A PHP SQL query builder using PDO
Stars: ✭ 783 (+15560%)
Mutual labels:  mysql
Ezsql
PHP class to make interacting with a database ridiculusly easy
Stars: ✭ 804 (+15980%)
Mutual labels:  mysql
Pymysql
Pure Python MySQL Client
Stars: ✭ 6,694 (+133780%)
Mutual labels:  mysql
Dukes Forest
Port of dukes-forest to Wildfly 9 and MySql 5.6.
Stars: ✭ 5 (+0%)
Mutual labels:  mysql
Smartsql
SmartSql = MyBatis in C# + .NET Core+ Cache(Memory | Redis) + R/W Splitting + PropertyChangedTrack +Dynamic Repository + InvokeSync + Diagnostics
Stars: ✭ 775 (+15400%)
Mutual labels:  mysql
Ghchat
📱A chat application for GitHub. React + PWA + Node(koa2) + Typescripts + Mysql + Socket.io
Stars: ✭ 791 (+15720%)
Mutual labels:  mysql
Newbee Mall
🔥 🎉newbee-mall 项目(新蜂商城)是一套电商系统,包括 newbee-mall 商城系统及 newbee-mall-admin 商城后台管理系统,基于 Spring Boot 2.X 及相关技术栈开发。 前台商城系统包含首页门户、商品分类、新品上线、首页轮播、商品推荐、商品搜索、商品展示、购物车、订单结算、订单流程、个人订单管理、会员中心、帮助中心等模块。 后台管理系统包含数据面板、轮播图管理、商品管理、订单管理、会员管理、分类管理、设置等模块。
Stars: ✭ 8,319 (+166280%)
Mutual labels:  mysql
Puppet Strongswan
Manages StrongSwan on a host with Puppet
Stars: ✭ 5 (+0%)
Mutual labels:  puppet
Puppet Aptly
Puppet module to deploy and manage aptly, a Debian repository management tool http://www.aptly.info/
Stars: ✭ 5 (+0%)
Mutual labels:  puppet

puppet-mha

Build Status Puppet Forge

Table of Contents

  1. Description
  2. Setup - The basics of getting started with MHA
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. Limitations - OS compatibility, etc.
  6. Development - Guide for contributing to the module

Description

The MHA module handles installing, configuring, and running MHA for MySQL.

Setup

Setup Requirements

The MHA module requires the following puppet modules:

Beginning with MHA

To install the mha4mysql-manager with default parameters, declare the mha::manager class.

include '::mha::manager'

To install the mha4mysql-node with default parameters, declare the mha::node class.

include '::mha::node'

Usage

Configuring mha::manager

class { '::mha::manager':
  version       => '0.57-0',
  node_version  => '0.57-0',
  script_ensure => present,
}

Configuring mha::node

class { '::mha::node':
  user            => 'mha',
  password        => '[email protected][email protected]',
  repl_user       => 'replicator',
  repl_password   => '[email protected]',
  manager         => 'master-ha.example.com',
  nodes           => [
    {
      'hostname'         => 'node001.example.com',
      'candidate_master' => 1,
    },
    {
      'hostname'         => 'node002.example.com',
      'candidate_master' => 1,
    },
    {
      'hostname'         => 'node003.example.com',
    },
  ],
  ssh_private_key => '-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----',
  ssh_key_type    => 'ssh-rsa',
  ssh_public_key  => 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCtnFFI/ICCBmr4LY0gIgyF3Jex20KwTFT67aoNGxAvjRSsg9d+c0/sxq0oBZSdgLoRrlnSu226mvv89E6dnc61JFbJpWN6et8qTW75e2/cU/DIe2vS3nTBcBvgj23oF2c5Wv7Vy2FacdDXaLa7tKmAnetI7FT+0IwmR7FMCvREmOqn4eCTkoUNXdLHqkQ0f2SSYBUUyno68nUM1bXgc63bQU8T1tr8kZ2t3NHpAa8YEYraKbCltsBkyqr7FExe5o23RyML4NuKfa1UllJhZO3IrQgbiAXsIFZpEqbcL8tObQ55nQIrNzZEvHoDN7K7jZP4WdjfTF26xSqJ+LrlGsRV',
}

Configuring modules from Hiera

---
mha::manager::version: '0.57-0'
mha::manager::node_version: '0.57-0'

mha::node::user: 'mha'
mha::node::password: '[email protected][email protected]'
mha::node::repl_user: 'replicator'
mha::node::repl_password: '[email protected]'
mha::node::manager: 'master-ha.example.com'
mha::node::nodes:
  - hostname: 'node001.example.com'
    candidate_master: 1
  - hostname: 'node002.example.com'
    candidate_master: 1
  - hostname: 'node003.example.com'
mha::node::ssh_key_type: 'ssh-rsa'
mha::node::ssh_public_key: 'AAAAB3NzaC1yc2EAAAADAQABAAABAQCtnFFI/ICCBmr4LY0gIgyF3Jex20KwTFT67aoNGxAvjRSsg9d+c0/sxq0oBZSdgLoRrlnSu226mvv89E6dnc61JFbJpWN6et8qTW75e2/cU/DIe2vS3nTBcBvgj23oF2c5Wv7Vy2FacdDXaLa7tKmAnetI7FT+0IwmR7FMCvREmOqn4eCTkoUNXdLHqkQ0f2SSYBUUyno68nUM1bXgc63bQU8T1tr8kZ2t3NHpAa8YEYraKbCltsBkyqr7FExe5o23RyML4NuKfa1UllJhZO3IrQgbiAXsIFZpEqbcL8tObQ55nQIrNzZEvHoDN7K7jZP4WdjfTF26xSqJ+LrlGsRV'
mha::node::ssh_private_key: |
-----BEGIN RSA PRIVATE KEY-----
...
-----END RSA PRIVATE KEY-----

Reference

Public Classes

mha::manager

Install and configure mha4mysql-manager, and install the mysql_online_switch script.

  • version: Specify a mha4mysql-manager version. Valid values is 'x.y-z' like '0.57-0'.
  • node_version: Specify a mha4mysql-node version. Valid values is 'x.y-z' like '0.57-0'.
  • script_ensure: Whether the mysql_online_switch script should exist. Default to present.

mha::node

Install and configure mha4mysql-node, create grant permissions to access MySQL for administrator and replicator, configure the cron job to run purge_relay_logs script, and install a ssh key-pair.

  • manager: Specify the host for mha4mysql-manager. Default to undef.
  • version: Specify the mha4mysql-node version. Valid values is 'x.y-z' like '0.57-0'.
  • nodes: Specify The array of the target MySQL servers that include hostname or IP address, or candidate_master. Default to [].
  • user: The MySQL administrative database username (ref). Default: 'root'.
  • password: The MySQL password of the "$user" user (ref). Default to '' (empty).
  • repl_user: The MySQL replication username (ref). Default to 'repl'.
  • repl_password: The MySQL password of the repl user (ref). Default: '' (empty).
  • ssh_user: The user connecting to mha-node with ssh. Default to 'root'
  • ssh_key_type: The encryption type used (ref).
  • ssh_public_key: The public key itself as the same as Ssh_authorized_key key attributes.
  • ssh_key_path: The path to the private key to manage. Default to '/root/.ssh/id_mha'.
  • ssh_private_key: The private key itself. See also ./manifests/params.pp.
  • cron_ensure: Whether the cron job should be in. Default to present.
  • cron_user: The user who owns the cron job. This user must be allowed to run this job. Default to 'root'.
  • cron_minute: The minute at which to run the cron job. Default to '10'.
  • cron_hour: The hour at which to run the cron job. Default to '2-23/6'.

Private Classes

  • mha::node::grants: Create grant permissions to access MySQL for administrator and replicator.
  • mha::node::install: Install mha4mysql-node package.
  • mha::node::purge_relay_logs: Configure the cron job to run purge_relay_logs script.

Defined Types

mha::manager::app

Set up an application configuration file and configure mha4mysql-manager.

mha::node::grants::admin

Create grant permissions to access MySQL for administrator.

  • user: The MySQL administrative database username. Default: undef.
  • password: The MySQL password of the "$user" user. Default: undef.
  • host: The host to use as part of [email protected] for grants. Default is a resource name ($name).

mha::node::grants::repl

Create grant permissions to access MySQL for replicator.

  • user: The MySQL replication username. Default: undef.
  • password: The MySQL password of the repl user. Default: undef.
  • host: The host to use as part of [email protected] for grants. Default is a resource name ($name).

Limitations

This module has been tested on:

  • RedHat Enterprise Linux 5, 6, 7
  • CentOS 5, 6, 7
  • Scientific Linux 5, 6, 7

Development

Running tests

The MHA puppet module contains tests for both rspec-puppet (unit tests) and beaker-rspec (acceptance tests) to verify functionality. For detailed information on using these tools, please see their respective documentation.

Testing quickstart

  • Unit tests:
$ bundle install
$ bundle exec rake
  • Acceptance tests:
# Set your DOCKER_HOST variable
$ eval "$(docker-machine env default)"

# List available beaker nodesets
$ bundle exec rake beaker_nodes
centos6
centos7

# Run beaker acceptance tests
$ BEAKER_set=centos7 bundle exec rake beaker

Smoke tests

You can run smoke tests using Vagrant:

$ vagrant up <vm> --provision

Authors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].