In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about how to use Orchestrator, a highly available replication management tool for MySQL. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article.
Background
In the MySQL high-availability architecture, Percona's PXC,Galera and MGR after MySQL 5.7 are widely used, and others are MHA. Today, we introduce another useful MySQL high-availability replication management tool: Orchestrator (orch).
Orchestrator
This is a MySQL high availability and replication topology management tool written by go, which supports replication topology adjustment, automatic failover and manual master-slave switching. The back-end database uses MySQL or SQLite to store metadata, and provides Web interface to display the topological relationship and status of MySQL replication. Through Web, you can change the replication relationship and some configuration information of MySQL instances. Command line and api interfaces are also provided to facilitate operation and maintenance.
Compared with MHA, the most important thing is to solve the single point problem of the management node, which ensures its high availability through the raft protocol. Part of the management of GitHub is also being managed with this tool.
The general features of Orchestrator are:
① automatically discovers the replication topology of MySQL and presents it on web.
② reconstructs the replication relationship, and you can drag the graph in web to make replication relationship changes.
③ detects master exceptions and can recover them automatically or manually, customizing scripts through Hooks.
④ supports command line and web interface to manage replication.
Installation
Download the appropriate package to install as needed. After downloading the deb package, you need to install the apt-get install jq of jq. After the installation is complete, the corresponding directory is:
/ usr/local/orchestrator-rwxr-xr-x 1 root root 20m January 16 21:49 orchestrator- rw-r--r-- 1 root root 5.1K January 16 21:49 orchestrator-sample.conf.json-rw-r--r-- 1 root root 4.4K January 16 21:49 orchestrator-sample-sqlite.conf.json drwxr-xr-x 7 root root 4.0K February 15 19:03 resources
Orchestrator: application
* .json: default configuration template
Resources:orchestrator related files: client, web, pseudo GTID and other related files.
Configuration
Here are some of the more important parameters:
Http port of ListenAddress:web interfac
MySQLOrchestratorHost:orch backend database address
MySQLOrchestratorPort:orch backend database port
MySQLOrchestratorDatabase:orch backend database name
MySQLOrchestratorUser:orch backend database user name (clear text)
MySQLOrchestratorPassword:orch backend database password (clear text)
MySQLOrchestratorCredentialsConfigFile: configuration file "" MySQLOrchestratorCredentialsConfigFile ":" / etc/mysql/orchestrator-backend.cnf "for username and password of backend database, format:
[client] user=orchestrator_srv password=$ {ORCHESTRATOR_PASSWORD}
The user permissions for the backend MySQL database need to be:
CREATE USER 'orchestrator_srv'@'orc_host' IDENTIFIED BY' orc_server_password'; GRANT ALL ON orchestrator.* TO 'orchestrator_srv'@'orc_host'
MySQLTopologyUser: the user of the managed MySQL (clear text)
MySQLTopologyPassword: password of the managed MySQL (ciphertext)
MySQLTopologyCredentialsConfigFile: the user password profile "" / etc/mysql/orchestrator-topology.cnf "of the managed MySQL in the format:
[client] user=orchestrator_srv password=$ {ORCHESTRATOR_PASSWORD}
The user permissions for the managed MySQL database need to be:
CREATE USER 'orchestrator'@'orc_host' IDENTIFIED BY' orc_topology_password'; GRANT SUPER, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT, RELOAD ON *. * TO 'orchestrator'@'orc_host'; GRANT SELECT ON meta.* TO' orchestrator'@'orc_host'; GRANT SELECT ON ndbinfo.processes TO 'orchestrator'@'orc_host';-- Only for NDB Cluster operational deployment
1. Turn on orchestrator
. / orchestrator-debug-config=/etc/orchestrator.conf.json http
two。 Add the configured replication instance to orchestrator, because orch can automatically discover all instances of the entire topology, so you only need to add any instance, and if you don't find it, you can add it again.
Add to web (Clusters-> Discover in navigation)
Add completed
The above is how to use Orchestrator, a highly available replication management tool for MySQL. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.