Introduction
In MySQL high availability architecture, currently used more is Percona of PXC, Galera and MySQL MGR etc. after 5.7, there are other of MHA , introduce another relatively easy availability of MySQL replication management tool today: Orchestrator ( orch).
Orchestrator (ORCH): written go MySQL high availability and replication topology management tools to support the replication topology adjustment, automatic failover and manual master-slave switching. Back-end database using MySQL or SQLite store metadata and provide Web interface topology and status display MySQL replicated by replication relationship and can change the configuration of the Web portion MySQL instance, and also provides a command line interface to api, facilitating operation and maintenance management. Relatively the most important point of view than the MHA is to solve the problem of a single point of management node, which ensure high availability protocol itself by raft. GitHub is also part of management to manage with this tool. About Orchestrator more detail can look at the introduction, roughly Github features are:
① MySQL replication topology auto-discovery, and displayed on the web.
② reconstruction replication relationship, you can drag the map in the web to replicate the relationship changes.
③ main abnormality detection and recovery can be automatically or manually performed by custom scripts Hooks.
④ supports command line interface management and web copy.
Deployment follows
Test Environment
mysql server Orchestrator & Master: 10.72 . 16.112 slave1: 10.72 . 16.50 slave2: 10.72 . 16.59
1, the installation orchestrator
orchestrator-cli-3.0.11-1.x86_64.rpm Setup relies package, installation dependencies jq-1.5, oniguruma-5.9.5
And preferably 7 redhat operating system installation.
yum the install orchestrator- 3.1 . 2 - . 1 .x86_64.rpm JQ- for 1.5 - . 1 .el7.x86_64.rpm oniguruma- 5.9 . . 5 - . 3 .el7.x86_64.rpm After installation, the directory / usr / local / orchestrator
2, the host configuration parse
[root@hchtest4 ~]# cat /etc/hosts 10.72.16.112 hchtest4 10.72.16.50 hchtest3 10.72.16.59 hchtest-elk
3,3 omitted from the copy master station MySQL
4, orchestrator background rights management side configuration database (performed on 112)
在orch后端数据库112上: CREATE DATABASE IF NOT EXISTS orchestrator; CREATE USER 'orchestrator'@'%' IDENTIFIED BY 'hch123'; GRANT ALL PRIVILEGES ON orchestrator.* TO 'root'@'%';
5,3 orch on stage cluster database management, database rights and execution (three database execution)
CREATE USER 'orchestrator'@'%' IDENTIFIED BY 'hch123'; GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD ON *.* TO 'orchestrator'@'%'; GRANT SELECT ON mysql.slave_master_info TO 'orchestrator'@'%'; CREATE DATABASE IF NOT EXISTS meta; GRANT SELECT ON meta.* TO 'orchestrator'@'%';
6, modify the configuration file
cp /usr/local/orchestrator/conf/orchestrator-sample.conf.json / etc / orchestrator.conf.json vim / etc / orchestrator.conf.json # account password is user rights database management MySQL database " MySQLTopologyUser " : " root " , " MySQLTopologyPassword " : " hch123 " , #orchestrator management background database account password " MySQLOrchestratorHost " : " 10.72.16.112 " , " MySQLOrchestratorPort " : 3306 , "MySQLOrchestratorDatabase": "orchestrator", "MySQLOrchestratorUser": "orchestrator", "MySQLOrchestratorPassword": "hch123", "DiscoverByShowSlaveHosts": false,
"DiscoverByShowSlaveHosts: Under ture this case, you must configure report_host
$ vim /etc/my_3306.cnf
report_host = 192.168.225.128 // ip ip for their own
Description: without report_host, show slave hosts will not show host, will lead the program error
report_host is read-only parameter, you must restart to become effective
Description:
DiscoverByShowSlaveHosts ": false can be, so you need to set up report_host
7, create a soft link command
ln -s /usr/local/orchestrator/orchestrator /usr/bin/
8, start orchestrator
orchestrator --debug --config=/etc/orchestrator.conf.json http 查看端口 [root@orchestrator ~]# netstat -tnpl |grep :3000 tcp6 0 0 :::3000 :::* LISTEN 6084/orchestrator
8, found the command line:
orchestrator -c discover -i 10.72.16.50 orchestrator -c discover -i 10.72.16.59 orchestrator -c clusters ----查看集群
9, access web pages
http://10.72.16.51:3000
10, Orchestrator use
reference
Orchestrator deployment configuration - qq_26496673's blog - CSDN blog https://blog.csdn.net/qq_26496673/article/details/82810671
MySQL high availability replication management tool - Orchestrator Introduction - jyzhou - blog https://www.cnblogs.com/zhoujinyi/p/10387581.html Park
MySQL high availability replication management tool - Orchestrator use - jyzhou - blog Park https://www.cnblogs.com/zhoujinyi/p/10394389.html
orchestrator installation? parameter? VIP script? - wangxin3618's blog - CSDN blog https://blog.csdn.net/wangxin3618/article/details/97013376
orchestrator Profile - fearless11's blog - CSDN blog https://blog.csdn.net/fearless11/article/details/77170764
Orchestrator management mysql replication - Personal article - SegmentFault think No https://segmentfault.com/a/1190000017838535?utm_source=tag-newest
MySQL replication topology management tools Orchestrator - Jane book https://www.jianshu.com/p/62e95a131028
orchestrator explore the availability of MySQL | Yangtze River's https://riverdba.github.io/2019/03/19/orchestrator/ blog