-
Notifications
You must be signed in to change notification settings - Fork 630
feat(docker): add attachable Hubble Compose add-on for the 3-node cluster #3149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bitflicker64
wants to merge
15
commits into
apache:master
Choose a base branch
from
bitflicker64:hubble-compose-addon
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b056d0d
feat(docker): add attachable Hubble Compose add-on for the 3-node clu…
bitflicker64 620f7ff
ci(docker): assert HUGEGRAPH_NETWORK and HUGEGRAPH_VERSION overrides …
bitflicker64 0694ff7
fix(docker): address PR 3149 review findings
bitflicker64 1b4f008
fix(docker): harden credential setup and persist Hubble state
bitflicker64 950f645
fix(docker): parse credentials safely and share Hubble volumes
bitflicker64 8a0c6b0
fix(docker): keep the 3-node cluster anonymous for Hubble attach
bitflicker64 931c258
fix(docker): drop stale credential docs from the Hubble add-on
bitflicker64 0d1e67b
Revert "fix(docker): keep the 3-node cluster anonymous for Hubble att…
bitflicker64 c311557
fix(docker): fail closed on auth and stop publishing the control plane
bitflicker64 10c6c6b
ci(docker): assert the topology and shared Hubble state the smoke tes…
bitflicker64 7ea0efe
docs(docker): correct the port reference and harden the non-auth plac…
bitflicker64 6b6c3a3
fix(docker): apply the non-auth reset to every Server, not just the f…
bitflicker64 9616037
fix(docker): repair the seams around the cluster contract
bitflicker64 0571571
docs(docker): scope the auth safety net to the cluster that has it
bitflicker64 d2a12bc
docs(docker): create Hubble's external volumes in the attach flow
bitflicker64 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # Opt-in override that runs the 3-node cluster WITHOUT authentication. | ||
| # | ||
| # The default stack authenticates, and that is the configuration to use unless | ||
| # you have a reason not to. This override exists for throwaway local trials on | ||
| # a trusted network: no admin password, no JWT secret, no login in Hubble. | ||
| # Anyone who can reach the published ports can read and modify every graph. | ||
| # | ||
| # Usage (see "Running without authentication" in README.md): | ||
| # | ||
| # HUGEGRAPH_ADMIN_PASSWORD=non-auth-placeholder \ | ||
| # HUGEGRAPH_AUTH_TOKEN_SECRET=non-auth-placeholder \ | ||
| # docker compose -f docker-compose-3pd-3store-3server.yml \ | ||
| # -f docker-compose-3x3.non-auth.yml up -d | ||
| # | ||
| # The two placeholders are required only because Compose interpolates the base | ||
| # file's `:?` guards before it applies this override; `!reset` below drops both | ||
| # variables, so neither value ever reaches a container. `!reset` needs Docker | ||
| # Compose v2.24 or newer. | ||
| # | ||
| # Pass them inline on this command only. Do not put them in docker/.env. They | ||
| # are published values, so they are not credentials, and the token placeholder | ||
| # is deliberately shorter than the 32 bytes the Server entrypoint requires: if | ||
| # it ever reaches an authenticated Server it aborts startup instead of signing | ||
| # tokens with a key that is printed in this repository. | ||
|
|
||
| # Each service is spelled out instead of sharing a YAML anchor. `!reset` does | ||
| # not survive an anchor/alias reference on every Compose version: on 5.1.2 the | ||
| # reset applies only to the anchored service, leaving server1 and server2 with | ||
| # a password and token secret, so the cluster would be half authenticated. The | ||
| # plain healthcheck override in the same block does propagate, which makes the | ||
| # failure easy to miss. Keep these three blocks identical. | ||
| services: | ||
| server0: | ||
| environment: | ||
| PASSWORD: !reset null | ||
| HG_SERVER_AUTH_TOKEN_SECRET: !reset null | ||
| healthcheck: | ||
| # The default healthcheck proves the image enforces authentication | ||
| # (401 without credentials, 200 with). That check cannot pass here, so | ||
| # fall back to probing the bound REST address. | ||
| test: ["CMD-SHELL", "curl -fsS $${HG_SERVER_REST_URL}/versions >/dev/null || exit 1"] | ||
|
|
||
| server1: | ||
| environment: | ||
| PASSWORD: !reset null | ||
| HG_SERVER_AUTH_TOKEN_SECRET: !reset null | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -fsS $${HG_SERVER_REST_URL}/versions >/dev/null || exit 1"] | ||
|
|
||
| server2: | ||
| environment: | ||
| PASSWORD: !reset null | ||
| HG_SERVER_AUTH_TOKEN_SECRET: !reset null | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "curl -fsS $${HG_SERVER_REST_URL}/versions >/dev/null || exit 1"] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| # | ||
| # Licensed to the Apache Software Foundation (ASF) under one or more | ||
| # contributor license agreements. See the NOTICE file distributed with | ||
| # this work for additional information regarding copyright ownership. | ||
| # The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| # (the "License"); you may not use this file except in compliance with | ||
| # the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| # | ||
|
|
||
| # Hubble add-on for the distributed cluster defined in | ||
| # docker-compose-3pd-3store-3server.yml. Requires the pre-created cluster | ||
| # network (docker network create hugegraph-net). See "Hubble for the | ||
| # 3-Node Cluster" in docker/README.md for the attach and combined flows. | ||
|
|
||
| networks: | ||
| hg-net: | ||
| external: true | ||
| name: ${HUGEGRAPH_NETWORK:-hugegraph-net} | ||
|
|
||
| volumes: | ||
| # Pre-created and external, like the shared network above. A fixed name | ||
| # alone is not enough: Compose deletes a fixed-name non-external volume on | ||
| # `down -v` from ANY project that declares the name, so tearing down the | ||
| # attach flow would silently destroy the combined flow's Hubble database. | ||
| # `external` makes both flows share the state and survive either teardown. | ||
| hg-hubble-db: | ||
|
bitflicker64 marked this conversation as resolved.
|
||
| name: ${HUBBLE_DB_VOLUME:-hugegraph-hubble-db} | ||
|
bitflicker64 marked this conversation as resolved.
|
||
| external: true | ||
| hg-hubble-upload-files: | ||
| name: ${HUBBLE_UPLOAD_VOLUME:-hugegraph-hubble-upload-files} | ||
| external: true | ||
|
|
||
| services: | ||
| hubble: | ||
| # Pin a release via HUGEGRAPH_VERSION in docker/.env; unset, the image | ||
| # tag defaults to latest. Pull by default so an older cached image cannot | ||
| # silently satisfy an auth-sensitive deployment. | ||
| image: ${HUBBLE_IMAGE:-hugegraph/hubble:${HUGEGRAPH_VERSION:-latest}} | ||
| pull_policy: ${HUBBLE_PULL_POLICY:-always} | ||
| container_name: hg-hubble | ||
| hostname: hubble | ||
| restart: unless-stopped | ||
| networks: [hg-net] | ||
| ports: | ||
| - "${HUBBLE_PUBLISH_HOST:-127.0.0.1}:8088:8088" | ||
| environment: | ||
| # Image default jdbc:h2:file:./db writes /hubble/db.mv.db, outside | ||
| # the /hubble/db volume. Use an absolute path so the database stays in | ||
| # the mount even if a future image changes its working directory. | ||
| SPRING_DATASOURCE_URL: jdbc:h2:file:/hubble/db/hubble;DB_CLOSE_ON_EXIT=FALSE | ||
| volumes: | ||
| # Point HUBBLE_PROPERTIES at the non-auth variant when the cluster runs | ||
| # without authentication; see "Running without authentication". | ||
| - ${HUBBLE_PROPERTIES:-./hugegraph-hubble-3x3.properties}:/hubble/conf/hugegraph-hubble.properties:ro | ||
| - hg-hubble-db:/hubble/db | ||
|
bitflicker64 marked this conversation as resolved.
|
||
| - hg-hubble-upload-files:/hubble/upload-files | ||
| healthcheck: | ||
| test: ["CMD-SHELL", "body=$$(curl -fsS http://127.0.0.1:8088/about) && printf '%s' \"$$body\" | grep -q '\"status\":200' && printf '%s' \"$$body\" | grep -q '\"name\":\"hugegraph-hubble\"'"] | ||
| interval: 10s | ||
| timeout: 5s | ||
| retries: 30 | ||
| start_period: 60s | ||
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.