CMHA is a rock solid MySQL high availability cluster solution for mission critical use case like financial service and telco.
- Written in Golang, light weight and very easy to deploy as well as upgrade.
- No single point of failure design and strong data consistence, no data lose, no transaction mess.
- Consul cluster maintains multiple HA groups for different applications.
- Prevent network partition and MySQL nodes brain-split.
- Stateless agent design with Run-As-Needed failure handler and health monitoring handler.
- Interactive command line(CLI) console for DBA's troubleshooting and maintenance.
- Clear and elegant web UI for status monitoring (embedded web service, no need for additional web server).
- RESTFul interface for external automation ops tools/platform.
- User-friendly and customizable deployment scripting
- Upgrading on the fly
###1. Prerequisities
- 7 nodes for production (physical or VM)
- OS Supported : CentoS 6.x/7.x, RHEL 6.x/7.x
- Local YUM Repository
- Disable SELinux
- SSHD enabled
- NTP enabled (not necessary but suggested)
- Disable iptables
- Configure /etc/hosts on each node for
###2. Role of cluster nodes
CS: Consul server for cluster coordinator ( 1 node for testing purpose, 3 nodes for production)
CHAP: Application access node (1 node for testing purpose,2 nodes for production)
DB: MySQL instance node (2 nodes for Master-Master configuration)
###3. Install from binary
- download pre-built binary installer(with auto-deployment in the file name) from https://github.com/upmio/cmha/releases/latest
- extract the package to any Linux node as the deployment node (can be one of the cluster or additional node for temporary use only)
- deployment node require "expect" package installed
- install "openssl" package on CHAP nodes
- edit auto-deployment.ini in the extracted directory of the binary installer, follow the inline instruction
- execute deployment-check.sh script to verify the environment and necessary packages
- run the installer to auto deploy the cluster:
#sudo auto-deployment.sh cs
#sudo auto-deployment.sh ca
#sudo auto-deployment.sh db
#sudo auto-deployment.sh chap
- installation verification, use favorite brower, visit http://CS_IP:8500/ui to check the cluster status, see more details from the project wiki page (https://github.com/upmio/cmha/wiki)
- Fork it!
- Create your feature branch: git checkout -b my-new-feature
- Commit your changes: git commit -am 'Add some feature'
- Push to the branch: git push origin my-new-feature
- Submit a pull request :D
Please use our github issues(https://github.com/upmio/cmha/issues) for bugs, feature requests or questions !
CMHA is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.