MySQL HA (High Availability) database high availability tool Orchestrator installation

This article mainly introduces how to install the MySQL HA (High Availability) database high availability tool Orchestrator locally.

1. Download the installation package

Download address

Next, unzip the installation package

For example, install orchestrator to the directory /usr/local/orchestrator

mkdir -p /usr/local
cd /usr/local
tar xzfv orchestrator-1.0.tar.gz

2. Install backend MySQL server

The orchestrator uses backend db to store some meta-information, including the instance to be detected, cluster name, etc.

In this article, MySQL server is used as the backend.

First install MySQL server, please refer to the official documentation .

After the installation is complete, create a user to access the backend.

CREATE DATABASE IF NOT EXISTS orchestrator;
CREATE USER 'orchestrator'@'127.0.0.1' IDENTIFIED BY 'orch_backend_password';
GRANT ALL PRIVILEGES ON `orchestrator`.* TO 'orchestrator'@'127.0.0.1';

OrchestratorThe configuration file used /etc/orchestrator.conf.jsonis in the directory of the executable file conf/orchestrator.conf.jsonororchestrator.conf.json

It comes with the installation package orchestrator.conf.json.sampleand is located in the path/usr/local/orchestrator/orchestrator-sample.conf.json

You can refer to this file to customize the configuration file content. You can also refer to the official website link .

Modify the configuration content as follows:

...
"MySQLOrchestratorHost": "127.0.0.1",
"MySQLOrchestratorPort": 3306,
"MySQLOrchestratorDatabase": "orchestrator",
"MySQLOrchestratorUser": "orchestrator",
"MySQLOrchestratorPassword": "orch_backend_password",
...

3. Authorize on the MySQL instance

Orchestrator will detect the replication topology of the MySQL instance and requires some permissions:

CREATE USER 'orchestrator'@'orch_host' IDENTIFIED BY 'orch_topology_password';
GRANT SUPER, PROCESS, REPLICATION SLAVE, RELOAD ON *.* TO 'orchestrator'@'orch_host';
GRANT SELECT ON mysql.slave_master_info TO 'orchestrator'@'orch_host';
GRANT SELECT ON ndbinfo.processes TO 'orchestrator'@'orch_host'; -- Only for NDB Cluster

orch_hostReplace with the appropriate machine as needed , for example %, 10.%, xx.xx.xx.xxetc.

And in orchestrator.conf.jsonthe file, modify:

"MySQLTopologyUser": "orchestrator",
"MySQLTopologyPassword": "orch_topology_password",

4. Start the orchestrator service

If the orchestrator installation directory is there /usr/local/orchestrator, execute:

cd /usr/local/orchestrator && ./orchestrator http

After the orchestrator service is started, it listens on port 3000.
Open page in browserhttp://your.host:3000/

If you want to start the service locally, you can usehttp://127.0.0.1:3000/

If you need debugging information, you can execute:

cd /usr/local/orchestrator && ./orchestrator --debug http

For more debug information, you can execute:

cd /usr/local/orchestrator && ./orchestrator --debug --stack http

In the above startup method, if the configuration file is not specified in the parameters, the configuration file will be found in the following locations:
/etc/orchestrator.conf.json, conf/orchestrator.conf.json, orchestrator.conf.json.

You can also specify a specific configuration file:

cd /usr/local/orchestrator && ./orchestrator --debug --config=/path/to/config.file http

If you are debugging based on local code, you can execute:

go run go/cmd/orchestrator/main.go http

Above, this article mainly introduces how to install and use Orchestrator locally. I will introduce the installation in a production environment later when I have time.

5.Reference

orchestrator docs

Guess you like

Origin blog.csdn.net/lanyang123456/article/details/128757681