incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

[Feature] Add a Hubble Compose add-on to attach the dashboard to a running cluster

Open bitflicker64 opened this issue 3 months ago • 0 comments

Feature Description

The docker/ directory ships three Compose deployments. The single-node file already includes Hubble; the distributed docker-compose-3pd-3store-3server.yml does not.

Today, an operator running the distributed topology who wants the dashboard has to clone apache/hugegraph-toolchain, build the Hubble image from source, and hand-wire it to the cluster. That is not a realistic path for end users.

Two concrete gaps:

  • No Hubble service definition can be attached to the distributed Compose deployment.
  • The 3PD+3Store+3Server file lacks the Server settings Hubble needs to work through PD (cluster registration, REST URL, auth token secret, admin password) — so merely adding a Hubble container is not enough.

Proposal

Add a small additive file, docker/docker-compose-hubble.yml, defining only the Hubble service:

  • Joins the running cluster's Docker network (external network name via an environment variable with a sane default). It never defines or recreates PD, Store, or Server — attaching or upgrading Hubble must not restart the cluster.
  • One shared version variable selects matching cluster and Hubble images. Until the next release is published the file uses latest with an inline note to pin the released version.
  • Uses the published hugegraph/hubble image as-is; the toolchain repository changes only if the image cannot accept required runtime configuration.

Also extend docker-compose-3pd-3store-3server.yml with the missing Server PD-registration and auth settings, and document three flows in docker/README.md:

  1. Attach Hubble to an already-running compatible cluster with one docker compose -f docker-compose-hubble.yml up -d command.
  2. Start a fresh distributed cluster plus dashboard using both files together.
  3. Override the Hubble image locally for development without touching the cluster.

Validation already done

I have already run this shape live before filing this issue:

  • A Hubble overlay attached to a real 3PD+3Store+3Server Compose cluster: all ten containers healthy, Hubble authenticating through PD, and the operations view showing the full topology (3 PD, 3 Store, 1 logical Server) as UP.
  • The same checks on a 1PD+1Store+1Server deployment.

The missing Server settings listed above come directly from that working overlay, so the proposal is a matter of upstreaming a verified configuration, not an experiment.

Research: how comparable projects ship their dashboards

  • Elasticsearch + Kibana — closest precedent. Kibana is a separate image from a separate repo, but the database repo owns the Compose examples; the documented way to add Kibana to a running Elasticsearch is a new container joining the shared Docker network, with versions matched through a single variable. This proposal is the same pattern.
  • TiDB — the dashboard lives in its own repo and, since v6.5, can be deployed standalone via TiDB Operator's TidbDashboard resource, which binds it to an existing cluster without redeploying anything. That is the attach model proposed here, on Kubernetes.
  • CockroachDB / ArangoDB / Neo4j / YugabyteDB — embed the UI in the server binary. Zero-friction, but not applicable to Hubble, which is a standalone application.
  • Dgraph Ratel — the cautionary tale: a separate UI shipped as unpinned latest with no compatibility matrix, and a history of breakage reports. Hence the matched-version policy above.

Completion criteria

  • Single-node and distributed Compose paths both come up healthy, with Hubble able to log in and show the cluster topology.
  • Attaching Hubble to an already-running distributed cluster recreates no cluster containers.
  • No credentials committed to the repository.

A Kubernetes counterpart (Hubble as an independently upgradable attach-style component in the Helm chart) is tracked as a TODO in #3132 and can build on the same design.

bitflicker64 avatar Aug 09 '26 19:08 bitflicker64