MySQL DB 叢集管理平臺--orchestrator

东山絮柳仔發表於2024-09-25

一.orchestrator是什麼?

1.1 概述

orchestrator is a MySQL high availability and replication management tool, runs as a service and provides command line access, HTTP API and Web interface.

orchestrator採用go語言編寫,它能夠主動發現當前拓撲結構和主從複製狀態,支援MySQL主從複製拓撲關係的調整、支援MySQL主庫故障自動切換(failover)、手動主從切換(switchover)等功能。

orchestrator後臺依賴於MySQL儲存後設資料,能夠提供Web介面展示MySQL叢集的拓撲關係及例項狀態,可以透過Web介面可更改MySQL例項的部分配置資訊,同時也提供命令列和api介面,以便更加靈活的自動化運維管理。

1.2 功能

Discovery

orchestrator actively crawls through your topologies and maps them. It reads basic MySQL info such as replication status and configuration.

It provides you with slick【slɪk 流暢的;靈巧的;】 visualization of your topologies, including replication problems, even in the face of failures.

Refactoring

orchestrator understands replication rules. It knows about binlog file:position, GTID, Pseudo GTID, Binlog Servers.

Refactoring replication topologies can be a matter of drag & drop a replica under another master. Moving replicas around is safe: orchestrator will reject an illegal refactoring attempt.

Fine-grained control is achieved by various command line options.

Recovery

orchestrator uses a holistic approach to detect master and intermediate master failures. Based on information gained from the topology itself, it recognizes a variety of failure scenarios.

Configurable, it may choose to perform automated recovery (or allow the user to choose type of manual recovery). Intermediate master recovery achieved internally to orchestrator. Master failover supported by pre/post failure hooks.

Recovery process utilizes orchestrator's understanding of the topology and of its ability to perform refactoring. It is based on state as opposed to configuration: orchestrator picks the best recovery method by investigating/evaluating the topology at the time of recovery itself.

The interface

orchestrator supports:

  • Command line interface (love your debug messages, take control of automated scripting)
  • Web API (HTTP GET access)
  • Web interface, a slick one.
Additional perks(其它功能)
  • Highly available
  • Controlled master takeovers
  • Manual failovers
  • Failover auditing
  • Audited operations
  • Pseudo-GTID
  • Datacenter/physical location awareness
  • MySQL-Pool association
  • HTTP security/authentication methods
  • There is also an orchestrator-mysql Google groups forum to discuss topics related to orchestrator

二.豐富的AIP介面

豐富的介面,便於系統的整合和跨系統的呼叫,這也是比MHA強的地方。

https://gitcode.com/gh_mirrors/or/orchestrator/blob/master/go/http/api.go

這個網址上的AIP介面還是比較全面的。需要注意的是,如果某一個瀏覽器打不開,建議換一個試下。

三.部署安裝

1.下載安裝包

網址為:

https://github.com/openark/orchestrator/releases

例如下載最新版本3.2.6的tar包,下載包的路徑

https://github.com/openark/orchestrator/releases/download/v3.2.6/orchestrator-3.2.6-linux-amd64.tar.gz

2.2 部署安裝目錄設計

相關文章