doc(server): sync dist with master - #489
Conversation
Align the server deploy, config template, Docker cluster, Gremlin Console and IDEA setup pages with hugegraph master. Drop the deprecated task.scheduler_type key, correct the compose file inventory and the env-var reference against docker-entrypoint.sh and the compose files, match the conf/ template snippets key by key, fix the container script mount path and the graphs endpoint, and document the startup script flags, the security-check Java range and the rocksdb-only build.
bitflicker64
left a comment
There was a problem hiding this comment.
Blocking: no. Summary: I re-derived the claims in this PR against apache/hugegraph at 36811483a and nearly all of them hold: the gremlin-server.yaml and hugegraph.properties snippets now match the shipped files line for line, and the eight start-hugegraph.sh options, the Java 11 to 23 security window, -Drocksdb-only, the Maven 3.5.0 floor, the four compose topologies, the PD/Store/Server env tables, the port and health-check tables, the #L49 and #L132 anchors and the HugeGraphServerBootstrap note all check out. Four notes below, one on a table row that is wrong as written and three minor. Evidence: static reading of the named scripts, Dockerfiles, compose files, conf templates and Java options classes at 36811483a, plus an en/cn parity pass over all ten changed files.
| | Variable | Default | Purpose | | ||
| |----------|---------|---------| | ||
| | `HUGEGRAPH_VERSION` | `latest` | Image tag for Server, PD, and Store | | ||
| | `HUGEGRAPH_PULL_POLICY` | `missing` | `pull_policy` for those images, use `never` to keep locally built ones | |
There was a problem hiding this comment.
HUGEGRAPH_PULL_POLICY is honoured by only two of the four compose files, so "use never to keep locally built ones" is wrong for the other two. At 36811483a, docker-compose.yml:30 and docker-compose-hstore.yml:31,55,81 expand ${HUGEGRAPH_PULL_POLICY:-missing}, but docker-compose-3pd-3store-3server.yml pins a literal pull_policy: missing on the &pd-common, &store-common and &server-common anchors (lines 36, 48 and 76), and docker-compose.dev.yml pins pull_policy: build (lines 21, 30 and 39). Someone running the HA topology against locally built images is exactly who reads this row, and there the variable does nothing. Suggested cell: pull_policy for those images in docker-compose.yml and docker-compose-hstore.yml, use never to keep locally built ones; the 3pd/3store/3server file pins missing and the dev overlay pins build. Same row at content/cn/docs/guides/hugegraph-docker-cluster.md:186.
| > ```bash | ||
| > bin/start-hugegraph.sh | ||
| > Starting HugeGraphServer... | ||
| > Starting HugeGraphServer in daemon mode... |
There was a problem hiding this comment.
🧹 Follow-up rather than a change to this diff, anchored here because the text it concerns (5.1.2 lines 361 to 373) is outside the hunks. The cn page opens 5.1.2 at lines 341 to 349 with a prerequisite the en page has no counterpart for: set graph.load_from_local_config=true in conf/rest-server.properties, plus the note that the source default is false. That default is real (ServerOptions.java:355, read at GraphManager.java:240) and the shipped conf/rest-server.properties omits the key, so an en reader who follows 5.1.2 verbatim starts a Server that loads nothing from conf/graphs, with the sample output right here suggesting otherwise. Since this PR is the sync pass for the page, worth mirroring the cn block into en 5.1.2 above the backend=rocksdb snippet at line 366.
|
|
||
| `HG_SERVER_INIT_STORE_ENABLED` accepts only the spellings `HugeConfig` accepts, case-insensitively: `y`, `t`, `yes`, `on`, `true`, `n`, `f`, `no`, `off`, `false`. Anything else, `0` and `1` included, aborts the entrypoint. | ||
|
|
||
| The entrypoint writes `docker/init_complete` after a successful initialization and skips re-initialization on later startups, but still re-runs `bin/init-store.sh` so a disabled one revalidates its configuration on every start. |
There was a problem hiding this comment.
🧹 Only the verb is off: the marker is written by the init-store command, not by the entrypoint. InitStore.recordInitComplete() creates it (hugegraph-server/hugegraph-dist/src/main/java/org/apache/hugegraph/cmd/InitStore.java:167-187, called at :131) and InitStore also returns early when it is present (:94-99); docker-entrypoint.sh:184-185 only computes the path and exports it as HG_SERVER_INIT_COMPLETE_MARKER, under the comment "init-store owns the marker". The rest of the sentence is right, including the entrypoint's own guard at :187. Suggest "bin/init-store.sh records docker/init_complete after a successful initialization" in place of "The entrypoint writes". Same sentence at content/cn/docs/guides/hugegraph-docker-cluster.md:177.
| | `HG_SERVER_PD_PEERS` | (none) | `pd.peers` in both `hugegraph.properties` and `rest-server.properties` | | ||
| | `HG_SERVER_USE_PD` | `false` | `usePD` in `rest-server.properties` | | ||
| | `HG_SERVER_CLUSTER` | `hg-test` | `cluster` in `rest-server.properties` | | ||
| | `HG_SERVER_REST_URL` | `http://0.0.0.0:8080` (set in the image) | `restserver.url` | |
There was a problem hiding this comment.
🧹 "(set in the image)" reads as an image-level environment variable, which this one is not, while the JAVA_OPTS row lower in the same table uses the same phrase for one that is. hugegraph-server/Dockerfile:63 and Dockerfile-hstore:65 sed restserver.url=http://0.0.0.0:8080 straight into conf/rest-server.properties; the ENV blocks (Dockerfile:43-45, Dockerfile-hstore:46-47) carry only JAVA_OPTS, HUGEGRAPH_HOME and, in the standalone image, STDOUT_MODE. HG_SERVER_REST_URL itself is unset, which is why the HA compose sets it per node (lines 204, 213 and 222). Suggested default cell: unset; the image bakes restserver.url=http://0.0.0.0:8080 into conf/rest-server.properties. Same row at content/cn/docs/guides/hugegraph-docker-cluster.md:158.
imbajin
left a comment
There was a problem hiding this comment.
中文部分与源码保持一致且表述清晰,评分 9.2/10,按规则可直接合并。
Syncs the
hugegraph-distsurface (startup scripts,conf/templates, Docker images and compose topologies, IDEA run configs) withapache/hugegraphmaster at36811483a. Bothcontent/en/docs/andcontent/cn/docs/are updated.task.scheduler_type=distributed(twice)docker-compose.dev.ymldescribed as a single-node dev build.dev.ymldocumented as the source-build overlay for the minimal HStore topologyPASSWORD=xxxto the compose file"HUGEGRAPH_ADMIN_PASSWORDandHUGEGRAPH_AUTH_TOKEN_SECRET(usually fromdocker/.env);docker runstill uses-e PASSWORD/hugegraph/scripts/example.groovy/hugegraph-server/scripts/example.groovy(image WORKDIR)curl http://localhost:8081/graphsgiven as the readiness check/graphspaces/DEFAULT/graphs; there is no bare/graphsresourceStarting HugeGraphServer...Starting HugeGraphServer in daemon mode...plus theStarted [pid N]line-p truewas documented; no reference for the other startup flagsstart-hugegraph.shoptions and their defaults, plusstop-hugegraph.sh -m; notes that-gaccepts only ZGC-s false), that the script rejects anything below 11, and that the build needs Maven 3.5.0+-Drocksdb-onlyand the defaultrocksdb, hbase, hstorebackend setinit-storestep andgraph.load_from_local_configwere inconsistent between en and cnhstore.properties.templatepointer, theinit_store.enabledbehaviour, andgraph.load_from_local_config=truein the en page toogremlin-server.yamlsnippet was missingGlobalMasterInfoand hadDateUtilin the wrong position#gremlinserver.url=http://127.0.0.1:8182did not match the template127.0.0.1:8182), with a note that the scheme is prepended when missinghugegraph.propertiessnippet was missingvertex.cache_type,edge.cache_type,vertex.default_label,serializer.buffer_max_capacity, the HBase partition keys, the raft deprecation note and the whole memory block; carried a stale ikanalyzer download noteconf/graphs/hugegraph.propertieskey by keyvertex.cache_type/edge.cache_type(l1/l2, defaultl2), the task keys and analyzer list, and therocksdb-data/dataandrocksdb-data/waldefaultslocalhost:8182127.0.0.1:8182/graphspaces/DEFAULT/graphsprobe URL$REST_SERVER_URL/graphsand prints "in daemon mode".dev.ymldescribed as a single-node dev build; no.env/ auth section; HStore and Hubble topologies missingPD_INITIAL_STORE_LISTHG_SERVER_INIT_STORE_ENABLEDspellings, the init marker, and a new Compose Variables table8088, and what each topology publisheshugegraph/hugegraph-pd,hugegraph/hugegraph-store,hugegraph/hugegraph-hstore)hugegraph/pd,hugegraph/store,hugegraph/server, plus a note that Compose defines its own checksdocker logs" applied uniformly to all imagesSTDOUT_MODE=true, so HStore Server logs live inlogs/hugegraph-server.log; added thedownvsdown -vdata note:> hugegraph.traversal().V()andgraph = hugegraph;cannot resolve, the Server binds graphs under a graphspace-qualified nameDEFAULT-hugegraph/__g_DEFAULT-hugegraphbindings and replaced the examples with the aliased driver flowusername/passwordkeys and a pointer toremote-objects.yamlandgremlin-driver-settings.yamlhugegraph-dist/..., which does not exist at the repo roothugegraph-server/hugegraph-dist/...preload-topling.shand the ToplingDB env vars were presented as ordinary steps, but nothing ToplingDB-related exists in the repotoplingmatch anywhere underapache/hugegraphmasterinit-store.sh#L52andhugegraph-server.sh#L124pointed at the wrong lines; the relationship to the shipped entry point was unexplained#L49and#L132, and added that the script actually launchesHugeGraphServerBootstraparoundHugeGraphServer