Skip to content

Add comprehensive documentation: quick start, tutorials, user manual, reference#63

Merged
renecannao merged 2 commits intomasterfrom
docs-reference-manual
Mar 24, 2026
Merged

Add comprehensive documentation: quick start, tutorials, user manual, reference#63
renecannao merged 2 commits intomasterfrom
docs-reference-manual

Conversation

@renecannao
Copy link
Copy Markdown

@renecannao renecannao commented Mar 24, 2026

Comprehensive Documentation

3,144 lines of new documentation covering every aspect of orchestrator.

New documents

Document Lines Content
docs/quickstart.md 132 5-minute quick start: build, configure, discover, view
docs/tutorials.md 499 4 tutorials: MySQL setup, ProxySQL hooks, Prometheus, API v2
docs/user-manual.md 1,148 10-chapter manual: installation through troubleshooting
docs/reference.md 1,365 Every config field, ~80 CLI commands, ~170 API endpoints

Quick Start Guide

Build → configure with SQLite → start → discover → view in web UI. Copy-paste ready.

Tutorials

  1. Setting up orchestrator with a MySQL topology
  2. Configuring ProxySQL failover hooks
  3. Monitoring with Prometheus (scrape config, PromQL queries, alert rules)
  4. Using the API v2 (all endpoints, scripting with jq)

User Manual (10 chapters)

Introduction, Installation, Discovery, Failure Detection, Recovery, ProxySQL Integration, Observability, High Availability, API Usage, Troubleshooting

Reference Manual

  • 32 configuration sections (every field from config.go)
  • 21 CLI command sections (~80 commands from cli.go)
  • 25 API v1 sections (~170 endpoints from api.go)
  • 9 API v2 endpoints
  • ProxySQL and observability reference

Updated

  • docs/toc.md + docs/README.md — new "Getting Started" section at the top

Summary by CodeRabbit

  • Documentation
    • Added Quick Start Guide for initial setup and configuration
    • Added comprehensive Reference Manual covering configuration settings, CLI commands, and API endpoints (v1 and v2)
    • Added four tutorials: deployment workflow, ProxySQL failover hooks, Prometheus monitoring, and API v2 usage
    • Added detailed User Manual with chapters on architecture, discovery, failure detection, recovery, ProxySQL integration, high availability, monitoring, and troubleshooting

Complete reference covering every Configuration struct field with types
and defaults, all CLI commands grouped by section, all v1 API endpoints,
all v2 API endpoints, ProxySQL integration details, and observability
(Prometheus metrics, health endpoints, Graphite).
… reference

New documentation (3,144 lines total):

- docs/quickstart.md (132 lines) — 5-minute quick start guide
- docs/tutorials.md (499 lines) — 4 step-by-step tutorials:
  1. Setting up orchestrator with MySQL topology
  2. Configuring ProxySQL failover hooks
  3. Monitoring with Prometheus
  4. Using the API v2
- docs/user-manual.md (1,148 lines) — 10-chapter user manual covering
  installation, discovery, failure detection, recovery, ProxySQL,
  observability, HA deployment, API usage, and troubleshooting
- docs/reference.md (1,365 lines) — complete reference for every
  config field, CLI command, and API endpoint

Updated docs/toc.md with "Getting Started" section linking all new docs.
Copilot AI review requested due to automatic review settings March 24, 2026 15:51
@renecannao renecannao merged commit 8e4b9f1 into master Mar 24, 2026
4 of 6 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d9d33ded-a6ca-40e5-82f5-120ad0232f74

📥 Commits

Reviewing files that changed from the base of the PR and between 501fc2b and c41b9cf.

📒 Files selected for processing (4)
  • docs/quickstart.md
  • docs/reference.md
  • docs/tutorials.md
  • docs/user-manual.md

📝 Walkthrough

Walkthrough

Four new comprehensive documentation files were added to the docs directory: a quick start guide for initial setup, a reference manual covering configuration and API endpoints, step-by-step tutorials for common workflows, and a complete user manual covering architecture, deployment, and operations.

Changes

Cohort / File(s) Summary
Documentation Additions
docs/quickstart.md, docs/reference.md, docs/tutorials.md, docs/user-manual.md
Added four comprehensive documentation files: quickstart guide (prerequisites, build, basic configuration and usage), reference manual (configuration fields, CLI commands, HTTP API v1/v2 endpoints), tutorials (deployment, ProxySQL failover, Prometheus monitoring, API v2 usage), and user manual (architecture, discovery, failure detection, recovery, ProxySQL integration, observability, HA deployment, API usage, troubleshooting).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Four scrolls have arrived at the warren's great door,
Quick starts and references, tutorials galore!
A manual so complete, it guides through the way,
Now Orchestrator's secrets are clear as the day! 📚✨

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-reference-manual

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a substantial amount of new documentation to the project, significantly enhancing the resources available to users. The additions aim to streamline the onboarding process for new users and provide in-depth information for experienced operators, covering everything from initial setup and practical workflows to detailed configuration and API references. This comprehensive documentation suite will improve the overall user experience and reduce the learning curve for interacting with orchestrator.

Highlights

  • Quick Start Guide: A new quickstart.md document has been added, providing a 5-minute guide to building, configuring, discovering, and viewing an orchestrator instance.
  • Tutorials: A new tutorials.md document introduces four step-by-step guides covering MySQL setup, ProxySQL hooks, Prometheus monitoring, and API v2 usage.
  • User Manual: A comprehensive user-manual.md has been added, detailing orchestrator's introduction, installation, discovery, failure detection, recovery, ProxySQL integration, observability, high availability, API usage, and troubleshooting across 10 chapters.
  • Reference Manual: A new reference.md document provides an exhaustive guide to orchestrator's configuration fields, CLI commands (~80), and API endpoints (~170 v1, 9 v2).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a large set of new Markdown documentation intended to provide a Quick Start, tutorials, a user manual, and a comprehensive reference for orchestrator’s configuration/CLI/API surface area.

Changes:

  • Added a new Quick Start Guide for building, configuring (SQLite), running, discovering, and viewing a topology.
  • Added Tutorials for common workflows (MySQL setup, ProxySQL hooks, Prometheus, API v2).
  • Added a long-form User Manual and an extensive Reference Manual covering config fields, CLI commands, and API v1/v2 endpoints.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
docs/quickstart.md New “5-minute” getting-started guide with build + minimal config + discovery steps.
docs/tutorials.md New step-by-step tutorials for setup, ProxySQL integration, Prometheus, and API v2 usage.
docs/user-manual.md New multi-chapter manual spanning install/config through operations and troubleshooting.
docs/reference.md New consolidated reference for configuration, CLI commands, and API endpoints.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/quickstart.md
"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.
Comment thread docs/user-manual.md
{
"Debug": false,
"ListenAddress": ":3000",
"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.

This minimal config example uses "BackendDB": "sqlite", but the code/config comments describe supported values as "mysql" or "sqlite3". Please switch this example to "BackendDB": "sqlite3" to match go/config/config.go and the reference manual and to reduce confusion for users.

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

Copilot uses AI. Check for mistakes.
Comment thread docs/user-manual.md
Comment on lines +133 to +137
```json
{
"BackendDB": "sqlite",
"SQLite3DataFile": "/var/lib/orchestrator/orchestrator.db"
}
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.

This SQLite backend example uses "BackendDB": "sqlite", while the code/config comments document the value as sqlite3. Please update the example to "BackendDB": "sqlite3" for consistency with go/config/config.go and docs/reference.md.

Copilot uses AI. Check for mistakes.
Comment thread docs/user-manual.md
Comment on lines +213 to +217
To disable the continuous polling (for development/testing only):

```bash
orchestrator --discovery=false http
```
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.

--discovery=false disables the entire logic.ContinuousDiscovery() loop (instance polling, analysis/recovery ticks, etc.), not just continuous polling. As written, this can mislead readers into thinking only polling stops while other orchestrator behavior continues. Please clarify what actually stops (and what still works) when running http mode with --discovery=false.

Copilot uses AI. Check for mistakes.
Comment thread docs/tutorials.md
Comment on lines +341 to +354
```yaml
livenessProbe:
httpGet:
path: /api/status
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/status
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
```
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.

This section says to use the built-in Kubernetes health endpoints, but the probe examples use /api/status. /api/status runs a full process.HealthTest() (heavier, can fail on transient backend issues) and is not the lightweight liveness/readiness split provided by /health/live and /health/ready. Please update the examples to use /health/live for liveness and /health/ready for readiness (and optionally /health/leader where appropriate).

Copilot uses AI. Check for mistakes.
Comment thread docs/reference.md
Comment on lines +1114 to +1122
All v2 responses use this structure:

```json
{
"status": "ok",
"data": { ... },
"message": ""
}
```
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.

The v2 response envelope example shows a message field always present, but in V2APIResponse it is omitempty and respondOK does not set it. In practice, successful responses will typically be {status, data} without message. Please adjust the example to either omit message or explicitly note that it is optional and only present when set.

Copilot uses AI. Check for mistakes.
Comment thread docs/reference.md

Complete reference for orchestrator configuration, CLI commands, and HTTP API endpoints.

**Source of truth:** This document is generated from the orchestrator source code. Configuration fields come from the `Configuration` struct in `go/config/config.go`. CLI commands come from `go/app/cli.go`. API endpoints come from `go/http/api.go` and `go/http/apiv2.go`.
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.

The header claims this reference is "generated from the orchestrator source code", but there doesn’t appear to be a generator script/check in the repo that ensures this file stays in sync. Unless there is an automated generation step being added elsewhere in this PR, please reword this to avoid implying an enforced source-of-truth relationship, or add a brief pointer to the generation process (script/command) so readers can reproduce it.

Suggested change
**Source of truth:** This document is generated from the orchestrator source code. Configuration fields come from the `Configuration` struct in `go/config/config.go`. CLI commands come from `go/app/cli.go`. API endpoints come from `go/http/api.go` and `go/http/apiv2.go`.
**Reference note:** This document is based on the orchestrator source code. Configuration fields correspond to the `Configuration` struct in `go/config/config.go`. CLI commands correspond to `go/app/cli.go`. API endpoints correspond to `go/http/api.go` and `go/http/apiv2.go`.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces significant updates and new content to the Orchestrator documentation, including quick start guides, a comprehensive reference manual, tutorials, and a user manual. The review comments highlight several areas for improvement, such as correcting the Go version requirement from a future release to a current stable one, adding explicit security warnings for example passwords used in tutorials, fixing a broken link to the full configuration guide, addressing a typo in a configuration key (Concensus), improving consistency in API v1 documentation regarding legacy slave terminology, updating Kubernetes health probe examples to use the new /health/live and /health/ready endpoints, and standardizing go build command syntax across the documentation.

Comment thread docs/quickstart.md

## 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)

Comment thread docs/quickstart.md
Comment on lines +68 to +69
CREATE USER 'orc_client_user'@'%' IDENTIFIED BY 'orc_client_password';
GRANT SUPER, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'orc_client_user'@'%';
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.

Comment thread docs/quickstart.md

## 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

Comment thread docs/reference.md
| `RaftDataDir` | string | `""` | Directory for raft data storage (required when `RaftEnabled` is true) |
| `DefaultRaftPort` | int | `10008` | Default port for `RaftNodes` entries that don't specify a port |
| `RaftNodes` | []string | `[]` | Raft nodes to make initial connection with |
| `ExpectFailureAnalysisConcensus` | bool | `true` | Expect failure analysis consensus before recovery |
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 configuration key ExpectFailureAnalysisConcensus appears to have a typo (Concensus is misspelled). While this documentation correctly reflects the key from the source code, this could be confusing. It is recommended to fix this in the source code for better clarity and consistency, and then update the documentation.

Comment thread docs/reference.md

---

## 3. API v1 Reference
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 CLI command reference includes a helpful "Command Synonyms" section that maps legacy terms like slave to replica. The API v1 reference also uses these legacy terms in many endpoints (e.g., /api/relocate-slaves/...) but lacks a similar explanatory note. For consistency and clarity, please consider adding a note to this section to inform users about the legacy terminology and its modern equivalent.

Comment thread docs/tutorials.md
### What you will need

- A running MySQL master with one or more replicas (MySQL 5.7+ or 8.0+)
- Go 1.25+ installed
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+ installed
- Go 1.22+ installed

Comment thread docs/tutorials.md
Comment on lines +30 to +31
CREATE USER 'orc_topology'@'orchestrator-host' IDENTIFIED BY 'a_secure_password';
GRANT SUPER, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'orc_topology'@'orchestrator-host';
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

This tutorial uses example passwords like 'a_secure_password'. While convenient for a tutorial, it's important to explicitly warn users against using these weak, hardcoded credentials in production environments. Please add a security note advising users to generate and use strong, unique passwords.

Comment thread docs/tutorials.md
Comment on lines +342 to +354
livenessProbe:
httpGet:
path: /api/status
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/status
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
```
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

This tutorial suggests using /api/status for Kubernetes liveness and readiness probes. However, the reference.md and user-manual.md documents introduce newer, more specific health endpoints: /health/live for liveness and /health/ready for readiness. To ensure users follow best practices, please update this example to use the new endpoints.

Suggested change
livenessProbe:
httpGet:
path: /api/status
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /api/status
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
```
livenessProbe:
httpGet:
path: /health/live
port: 3000
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
httpGet:
path: /health/ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 5

Comment thread docs/user-manual.md
# Binary is output to bin/orchestrator

# Or build directly with go:
go build -o bin/orchestrator go/cmd/orchestrator/main.go
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 go build command here is go build -o bin/orchestrator go/cmd/orchestrator/main.go. Other documentation files in this PR (like quickstart.md) use go build -o bin/orchestrator ./go/cmd/orchestrator. While both work, using the directory path is more common and idiomatic. For consistency across the documentation, please consider using the directory path form.

Suggested change
go build -o bin/orchestrator go/cmd/orchestrator/main.go
go build -o bin/orchestrator ./go/cmd/orchestrator

Comment thread docs/user-manual.md
Comment on lines +224 to +225
CREATE USER 'orchestrator'@'orc_host' IDENTIFIED BY 'orc_topology_password';
GRANT SUPER, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT, RELOAD ON *.* TO 'orchestrator'@'orc_host';
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

This documentation uses an example password 'orc_topology_password'. While this is for documentation purposes, it's a security best practice to explicitly warn users not to use these examples in production. Please add a note advising the use of strong, generated passwords.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants