For production deployments, see Orchestrator deployment. The following text walks you through the manual way of installation and the necessary configuration to make it work.
The following assumes you will be using the same machine for both the orchestrator binary and the MySQL backend.
If not, replace 127.0.0.1 with appropriate host name. Replace orch_backend_password with your own super secret password.
Each release publishes three package variants (as .deb, .rpm, and .tar.gz, for both amd64 and arm64):
orchestrator— the full server install. Contains theorchestratorbinary, the web UI resources, sample config files, and the systemd unit. This is what you want on the host(s) that will run theorchestratorservice with the HTTP API and web interface.orchestrator-cli— theorchestratorbinary only. Pick this when you want to runorchestratorfrom the command line (CLI mode) or as an HTTP API server without the web UI, and you do not need the sample configs or systemd unit.orchestrator-client— a thin bash wrapper around the HTTP API (see orchestrator-client). It is a single shell script that depends onjq; install it on ops/app boxes that need to talk to an already-runningorchestratorservice without shipping the Go binary. Because it is shell-only, the package is only a few KB — that is expected.
If you are unsure, install orchestrator.
-
Extract from tarball
Extract the archive you've downloaded from https://github.com/proxysql/orchestrator/tags For example, let's assume you wish to install
orchestratorunder/usr/local/orchestrator:sudo mkdir -p /usr/local sudo cd /usr/local sudo tar xzfv orchestrator-1.0.tar.gz -
Install from
RPMInstalls onto
/usr/local/orchestrator. Execute:sudo rpm -i orchestrator-1.0-1.x86_64.rpm -
Install from
DEBInstalls onto
/usr/local/orchestrator. Execute:sudo dpkg -i orchestrator_1.0_amd64.deb -
Install from repository
orchestratorpackages can be found in https://packagecloud.io/github/orchestrator
Setup a MySQL server for backend, and invoke the following:
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';
Orchestrator uses a configuration file, located in either /etc/orchestrator.conf.json or relative path to binary conf/orchestrator.conf.json or
orchestrator.conf.json.
Tip: the installed package includes a file called orchestrator.conf.json.sample with some basic settings which you can use as baseline for orchestrator.conf.json. It is found in /usr/local/orchestrator/orchestrator-sample.conf.json and you may also find /usr/local/orchestrator/orchestrator-sample-sqlite.conf.json which has a SQLite-oriented configuration. Those sample files are also available on the orchestrator repository.
Edit orchestrator.conf.json to match the above as follows:
...
"MySQLOrchestratorHost": "127.0.0.1",
"MySQLOrchestratorPort": 3306,
"MySQLOrchestratorDatabase": "orchestrator",
"MySQLOrchestratorUser": "orchestrator",
"MySQLOrchestratorPassword": "orch_backend_password",
...
For orchestrator to detect your replication topologies, it must also have an account on each and every topology. At this stage this has to be the
same account (same user, same password) for all topologies. On each of your masters, issue the following:
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
REPLICATION SLAVEis required forSHOW SLAVE HOSTS, and for scanning binary logs in favor of Pseudo GTIDRELOADrequired forRESET SLAVEoperationPROCESSrequired to see replica processes inSHOW PROCESSLISTOn MySQL 5.6 and above, and if usingmaster_info_repository = 'TABLE', let orchestrator have access to themysql.slave_master_infotable. This will allow orchestrator to grab replication credentials if need be.
Replace orch_host with hostname or orchestrator machine (or do your wildcards thing). Choose your password wisely. Edit orchestrator.conf.json to match:
"MySQLTopologyUser": "orchestrator",
"MySQLTopologyPassword": "orch_topology_password",
Consider moving conf/orchestrator.conf.json to /etc/orchestrator.conf.json (both locations are valid)
To execute orchestrator in command line mode or in HTTP API only, all you need is the orchestrator binary.
To enjoy the rich web interface, including topology visualizations and drag-and-drop topology changes, you will need
the resources directory and all that is underneath it. If you're unsure, don't touch; things are already in place.