feat(docker): add attachable Hubble Compose add-on for the 3-node cluster - #3149
Open
bitflicker64 wants to merge 2 commits into
Open
feat(docker): add attachable Hubble Compose add-on for the 3-node cluster#3149bitflicker64 wants to merge 2 commits into
bitflicker64 wants to merge 2 commits into
Conversation
…ster Add docker-compose-hubble.yml, a Hubble-only add-on that joins the cluster's pre-created external network (HUGEGRAPH_NETWORK, default hugegraph-net) with no depends_on, so attaching, upgrading, or removing Hubble never recreates PD, Store, or Server containers. Attach flow uses an explicit project (-p hugegraph-hubble); the fresh flow brings up cluster plus Hubble in one command with both -f flags. Give the 3-node cluster the Server settings Hubble's PD mode requires: PD registration (HG_SERVER_CLUSTER/USE_PD/REST_URL per replica via a shared env anchor), a required shared auth token secret so tokens validate on every replica, and a required admin password. The Server healthcheck now probes the bound REST URL. Hubble reads the 3x3 topology from hugegraph-hubble-3x3.properties. Document the attach, fresh, and dev-override flows plus migration notes in docker/README.md, update the cluster call sites across the docs, and extend the CI compose contract checks to the cluster file and add-on. Image tags stay on latest until the 1.8.0 release publishes; pin via HUGEGRAPH_VERSION in docker/.env.
…in compose checks Render the combined cluster+Hubble topology with non-default network and version values and assert the overridden network name and all four image tags, so CI fails if any Compose file stops honoring either override. The standalone add-on render keeps asserting the defaults and now strips any runner-level overrides for hermeticity.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3149 +/- ##
============================================
- Coverage 39.30% 34.74% -4.57%
- Complexity 264 498 +234
============================================
Files 771 782 +11
Lines 65915 67065 +1150
Branches 8754 8951 +197
============================================
- Hits 25910 23302 -2608
- Misses 37241 41163 +3922
+ Partials 2764 2600 -164 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
Adds an attachable Hubble deployment for the distributed Compose topology:
docker/docker-compose-hubble.yml(new) — defines only the Hubbleservice. It joins the pre-created cluster network and has no
depends_onon cluster services, so attaching, upgrading, or removing Hubble never
recreates PD, Store, or Server containers.
docker/docker-compose-3pd-3store-3server.yml— adds the ServerPD-registration and auth settings Hubble needs (cluster name, PD mode,
per-replica REST URL, required admin password and shared token secret),
mirroring what fix(docker): integrate Hubble with PD deployment #3143 did for the single-node file.
docker/hugegraph-hubble-3x3.properties(new) — Hubble topologyconfig for the 3-node cluster.
docker/README.md— documents the three flows: attach to a runningcluster, fresh cluster + Hubble in one command, and a local Hubble image
override for development.
.github/workflows/server-ci.yml— extends the existing composecontract checks to the cluster file and the add-on.
commands no longer work with the required-credential guards.
Design rationale (why it is shaped this way)
merges with the canonical cluster file via
-fflags, so the topologyis never maintained in two places. This is the pattern Elastic documents
for attaching Kibana to a running Elasticsearch over a shared Docker
network with versions matched through one variable, and the attach model
TiDB Operator provides via its standalone
TidbDashboardresource.external:networksbefore creating project networks and refuses to adopt unlabeled ones, so
both files declare the shared network as external with a well-known name
(
hugegraph-net, override viaHUGEGRAPH_NETWORK) and setup includes aone-time
docker network create. Verified empirically; the generatedper-project network name cannot support the one-command fresh flow.
-p hugegraph-hubblefor the attach flow: without it theattach project takes the directory name, colliding with other projects
and making documented lifecycle commands cross project boundaries.
latestas the current default: the authenticated PD/Hubbleintegration is not in
1.7.x, so pinning to an existing release wouldship a broken combination. Once the next release publishes, the default
should move to that tag; deployments pin today via
HUGEGRAPH_VERSIONin
docker/.env. (Unpinnedlatestwith no compatibility story is thedocumented failure mode of Dgraph's Ratel — hence the single shared
version variable.)
Breaking change owned by this PR
Existing 3-node deployments: the first
up -dafter this change recreatesall nine containers (network move; named volumes survive), and the graph
APIs begin requiring authentication (401 for previously anonymous
clients). The README carries an upgrade note covering
.envcreation,the orphaned old network, and verifying sign-in before decommissioning
existing access paths.
Validation evidence
(HTTP 200, role SUPERADMIN); Operations view shows 1 logical Server +
3 PD + 3 Store, all UP.
add-on command attached Hubble; all cluster container IDs unchanged.
docker/docker-compose.ymlpath unaffected andhealthy.