Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions docs/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# Quick Start Guide

Orchestrator is a MySQL high availability and replication management tool that discovers replication topologies, enables refactoring of replica trees, and performs automated or manual failover. It runs as a service with a web UI, HTTP API, and CLI.

This guide gets you from zero to a running orchestrator instance in under 5 minutes.

## Prerequisites

- **Go 1.25+** (for building from source)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The required Go version is listed as 1.25+, which is a future version and not yet released. This is likely a typo. Please update it to a recent stable version, for example 1.22+.

Suggested change
- **Go 1.25+** (for building from source)
- **Go 1.22+** (for building from source)

- **gcc** (required by the SQLite driver via cgo)
- **MySQL 5.6+ or 8.0+** replication topology to manage (optional for initial setup)
- No external database required -- orchestrator can use a built-in SQLite backend

## Step 1: Build from source

```bash
git clone https://github.com/proxysql/orchestrator.git
cd orchestrator
go build -o bin/orchestrator ./go/cmd/orchestrator
```

Verify the build:

```bash
bin/orchestrator --help
```

## Step 2: Create a minimal configuration

Create a file called `orchestrator.conf.json` in the project root:

```json
{
"Debug": true,
"ListenAddress": ":3000",
"MySQLTopologyUser": "orc_client_user",
"MySQLTopologyPassword": "orc_client_password",
"MySQLOrchestratorHost": "",
"MySQLOrchestratorPort": 0,
"MySQLOrchestratorDatabase": "",
"BackendDB": "sqlite",
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In config examples, BackendDB is set to "sqlite", but the configuration struct documents the supported values as "mysql" or "sqlite3" (and error messages refer to sqlite3). To avoid confusing users (and to align with the reference/config.go), use "BackendDB": "sqlite3" in this example (and in any other SQLite examples in these new docs).

Suggested change
"BackendDB": "sqlite",
"BackendDB": "sqlite3",

Copilot uses AI. Check for mistakes.
"SQLite3DataFile": "/tmp/orchestrator.sqlite3",
"DefaultInstancePort": 3306,
"DiscoverByShowSlaveHosts": true,
"InstancePollSeconds": 5,
"RecoverMasterClusterFilters": ["*"],
"RecoverIntermediateMasterClusterFilters": ["*"]
}
```

**Key fields explained:**

| Field | Purpose |
|-------|---------|
| `ListenAddress` | HTTP listen address. `:3000` means all interfaces, port 3000. |
| `MySQLTopologyUser` / `Password` | Credentials orchestrator uses to connect to your MySQL instances. This user needs `SUPER`, `PROCESS`, `REPLICATION SLAVE`, and `REPLICATION CLIENT` privileges. |
| `BackendDB` / `SQLite3DataFile` | Use SQLite as orchestrator's own backend -- no external database needed. |
| `InstancePollSeconds` | How often orchestrator polls each MySQL instance. |
| `RecoverMasterClusterFilters` | Which clusters are eligible for automatic master recovery. `["*"]` enables all. |

> **Tip:** For production deployments, use a MySQL backend instead of SQLite. See the [full configuration docs](configuration.md) for details.

## Step 3: Create a MySQL user on your topology

On your MySQL master (this will replicate to all replicas):

```sql
CREATE USER 'orc_client_user'@'%' IDENTIFIED BY 'orc_client_password';
GRANT SUPER, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'orc_client_user'@'%';
Comment on lines +68 to +69
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The example user creation statement uses a weak, hardcoded password ('orc_client_password'). For security, it's important to advise users to replace this with a strong, generated password in any real environment. Please consider adding a note about this.

```

## Step 4: Start orchestrator

```bash
bin/orchestrator -config orchestrator.conf.json http
```

You should see output indicating the service has started and is listening on port 3000.

## Step 5: Discover your topology

Tell orchestrator about your MySQL master. Replace `your-master-host` with the actual hostname or IP:

```bash
curl http://localhost:3000/api/discover/your-master-host/3306
```

Orchestrator will connect to this instance, discover its replicas, and recursively crawl the entire topology.

## Step 6: View in the web UI

Open your browser to:

```
http://localhost:3000
```

You will see your MySQL replication topology visualized as an interactive tree. From here you can:

- Click on instances to see their details
- Drag and drop replicas to move them between masters
- View replication lag and errors at a glance

## Step 7: Verify via CLI

List discovered clusters:

```bash
curl http://localhost:3000/api/clusters
```

View the topology as ASCII art:

```bash
curl http://localhost:3000/api/topology/your-master-host/3306
```

Check cluster health:

```bash
curl http://localhost:3000/api/replication-analysis
```

## Next steps

- [Full configuration guide](configuration.md) -- backend database options, discovery tuning, security, and more
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The link to [Full configuration guide](configuration.md) appears to be broken as configuration.md is a table of contents. The new reference.md file contains the detailed configuration reference. Please update the link to point to the correct section in reference.md.

Suggested change
- [Full configuration guide](configuration.md) -- backend database options, discovery tuning, security, and more
- [Full configuration guide](reference.md#1-configuration-reference) -- backend database options, discovery tuning, security, and more

- [ProxySQL integration](proxysql-hooks.md) -- built-in failover hooks for ProxySQL
- [API v2 reference](api-v2.md) -- structured REST API with proper HTTP status codes
- [Failure detection & recovery](failure-detection.md) -- how orchestrator detects and recovers from failures
- [High availability](high-availability.md) -- running orchestrator itself in an HA configuration
- [First steps](first-steps.md) -- deeper walkthrough of CLI commands and topology operations
- [Tutorials](tutorials.md) -- step-by-step guides for common workflows
Loading
Loading