From aedaf0685311975867549f02a49ca8700e87fbbe Mon Sep 17 00:00:00 2001 From: Ayan Alam Date: Thu, 15 Oct 2026 05:00:41 +0530 Subject: [PATCH 1/2] docs: add HG_SERVER_URLS_TO_PD and HG_SERVER_DEPLOY_IN_K8S The Server image entrypoint on master now maps both variables to server.urls_to_pd and server.deploy_in_k8s (apache/hugegraph#3286). List them in the Docker cluster guide and the config guide, in English and Chinese. --- content/cn/docs/config/config-guide.md | 2 +- content/cn/docs/guides/hugegraph-docker-cluster.md | 4 +++- content/en/docs/config/config-guide.md | 2 +- content/en/docs/guides/hugegraph-docker-cluster.md | 4 +++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/content/cn/docs/config/config-guide.md b/content/cn/docs/config/config-guide.md index 46b7ae8e02..2e6af63132 100644 --- a/content/cn/docs/config/config-guide.md +++ b/content/cn/docs/config/config-guide.md @@ -36,7 +36,7 @@ HugeGraphServer 内部集成了 GremlinServer 和 RestServer,而 gremlin-serve 完整的默认文件见Server 主线源码:[gremlin-server.yaml](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml)、[rest-server.properties](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/conf/rest-server.properties)、[hugegraph.properties](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties) 和 [hstore.properties.template](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hstore.properties.template)。 -以下 Docker 环境变量行为仅适用于从 `master` 主线构建的镜像,不会把任意环境变量名转换为配置项。该版本的入口脚本在初始化和启动前处理 `HG_SERVER_BACKEND`、`HG_SERVER_PD_PEERS`、`HG_SERVER_USE_PD`、`HG_SERVER_CLUSTER`、`HG_SERVER_REST_URL`、`HG_SERVER_MIN_FREE_MEMORY`、`HG_SERVER_AUTH_TOKEN_SECRET`、`HG_SERVER_INIT_STORE_ENABLED` 和 `PASSWORD`;历史发布镜像需按各自 tag 对应的 entrypoint 核实支持项。见 [Docker entrypoint](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh)。 +以下 Docker 环境变量行为仅适用于从 `master` 主线构建的镜像,不会把任意环境变量名转换为配置项。该版本的入口脚本在初始化和启动前处理 `HG_SERVER_BACKEND`、`HG_SERVER_PD_PEERS`、`HG_SERVER_USE_PD`、`HG_SERVER_CLUSTER`、`HG_SERVER_REST_URL`、`HG_SERVER_URLS_TO_PD`、`HG_SERVER_DEPLOY_IN_K8S`、`HG_SERVER_MIN_FREE_MEMORY`、`HG_SERVER_AUTH_TOKEN_SECRET`、`HG_SERVER_INIT_STORE_ENABLED` 和 `PASSWORD`;历史发布镜像需按各自 tag 对应的 entrypoint 核实支持项。见 [Docker entrypoint](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh)。 ### 2 gremlin-server.yaml diff --git a/content/cn/docs/guides/hugegraph-docker-cluster.md b/content/cn/docs/guides/hugegraph-docker-cluster.md index 49722ff265..f8ebcd66a6 100644 --- a/content/cn/docs/guides/hugegraph-docker-cluster.md +++ b/content/cn/docs/guides/hugegraph-docker-cluster.md @@ -209,6 +209,8 @@ curl -o /dev/null -w '%{http_code}\n' -u "admin:${HUGEGRAPH_ADMIN_PASSWORD}" \ | `HG_SERVER_USE_PD` | `false` | `rest-server.properties` 中的 `usePD` | | `HG_SERVER_CLUSTER` | `hg-test` | `rest-server.properties` 中的 `cluster` | | `HG_SERVER_REST_URL` | `http://0.0.0.0:8080`(镜像中已设置) | `restserver.url` | +| `HG_SERVER_URLS_TO_PD` | `http://0.0.0.0:8080` | `server.urls_to_pd`:本 Server 注册到 PD 的地址列表(逗号分隔),代替 `restserver.url`;仅在 `server.deploy_in_k8s` 为 `true` 时生效;其中的空白字符会被去除 | +| `HG_SERVER_DEPLOY_IN_K8S` | `false` | `rest-server.properties` 中的 `server.deploy_in_k8s` | | `HG_SERVER_MIN_FREE_MEMORY` | `64`(MB) | `restserver.min_free_memory` | | `HG_SERVER_INIT_STORE_ENABLED` | `true` | `init_store.enabled`;元数据由存储侧管理的 PD/HStore 部署应设为 `false` | | `HG_SERVER_AUTH_TOKEN_SECRET` | 设置了 `PASSWORD` 时自动生成 | 两个配置文件中的 `auth.token_secret`,至少 32 字节 | @@ -227,7 +229,7 @@ curl -o /dev/null -w '%{http_code}\n' -u "admin:${HUGEGRAPH_ADMIN_PASSWORD}" \ `wait-storage.sh` 最多等待 300 秒直到出现状态为 `Up` 的 Store。该时长写死在脚本中,无法通过环境变量调整。 -`HG_SERVER_INIT_STORE_ENABLED` 只接受 `HugeConfig` 能识别的写法(忽略大小写):`y`、`t`、`yes`、`on`、`true`、`n`、`f`、`no`、`off`、`false`。其他取值(包括 `0` 和 `1`)都会让入口脚本终止。 +`HG_SERVER_INIT_STORE_ENABLED` 和 `HG_SERVER_DEPLOY_IN_K8S` 只接受 `HugeConfig` 能识别的写法(忽略大小写):`y`、`t`、`yes`、`on`、`true`、`n`、`f`、`no`、`off`、`false`。其他取值(包括 `0` 和 `1`)都会让入口脚本终止。 入口脚本在初始化成功后写入 `docker/init_complete`,后续启动会跳过重新初始化,但仍会再执行一次 `bin/init-store.sh`,以便关闭状态下每次启动都重新校验配置。 diff --git a/content/en/docs/config/config-guide.md b/content/en/docs/config/config-guide.md index 32aadcb968..0825a0607f 100644 --- a/content/en/docs/config/config-guide.md +++ b/content/en/docs/config/config-guide.md @@ -36,7 +36,7 @@ The file-loading behavior on this page was checked against Server master commit Complete defaults are in Server master: [gremlin-server.yaml](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/conf/gremlin-server.yaml), [rest-server.properties](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/conf/rest-server.properties), [hugegraph.properties](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hugegraph.properties), and [hstore.properties.template](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/src/assembly/static/conf/graphs/hstore.properties.template). -The following Docker environment-variable behavior applies only to images built from `master`; arbitrary variable names are not converted into configuration options. Before initialization and startup, this entrypoint processes `HG_SERVER_BACKEND`, `HG_SERVER_PD_PEERS`, `HG_SERVER_USE_PD`, `HG_SERVER_CLUSTER`, `HG_SERVER_REST_URL`, `HG_SERVER_MIN_FREE_MEMORY`, `HG_SERVER_AUTH_TOKEN_SECRET`, `HG_SERVER_INIT_STORE_ENABLED`, and `PASSWORD`. Check the tagged entrypoint for historical release images. See [Docker entrypoint](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh). +The following Docker environment-variable behavior applies only to images built from `master`; arbitrary variable names are not converted into configuration options. Before initialization and startup, this entrypoint processes `HG_SERVER_BACKEND`, `HG_SERVER_PD_PEERS`, `HG_SERVER_USE_PD`, `HG_SERVER_CLUSTER`, `HG_SERVER_REST_URL`, `HG_SERVER_URLS_TO_PD`, `HG_SERVER_DEPLOY_IN_K8S`, `HG_SERVER_MIN_FREE_MEMORY`, `HG_SERVER_AUTH_TOKEN_SECRET`, `HG_SERVER_INIT_STORE_ENABLED`, and `PASSWORD`. Check the tagged entrypoint for historical release images. See [Docker entrypoint](https://github.com/apache/hugegraph/blob/master/hugegraph-server/hugegraph-dist/docker/docker-entrypoint.sh). ### 2 gremlin-server.yaml diff --git a/content/en/docs/guides/hugegraph-docker-cluster.md b/content/en/docs/guides/hugegraph-docker-cluster.md index 0360a7c634..60fb6fc7c3 100644 --- a/content/en/docs/guides/hugegraph-docker-cluster.md +++ b/content/en/docs/guides/hugegraph-docker-cluster.md @@ -209,6 +209,8 @@ Unlike PD and Store, Server has no mandatory entrypoint variables: only set valu | `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` | +| `HG_SERVER_URLS_TO_PD` | `http://0.0.0.0:8080` | `server.urls_to_pd`: comma-separated URLs this Server registers in PD instead of `restserver.url`; read only when `server.deploy_in_k8s` is `true`; whitespace is removed | +| `HG_SERVER_DEPLOY_IN_K8S` | `false` | `server.deploy_in_k8s` in `rest-server.properties` | | `HG_SERVER_MIN_FREE_MEMORY` | `64`(MB) | `restserver.min_free_memory` | | `HG_SERVER_INIT_STORE_ENABLED` | `true` | `init_store.enabled`; set `false` for PD/HStore deployments whose metadata is managed by storage | | `HG_SERVER_AUTH_TOKEN_SECRET` | Generated when `PASSWORD` is set | `auth.token_secret` in both configuration files; at least 32 bytes | @@ -227,7 +229,7 @@ Unlike PD and Store, Server has no mandatory entrypoint variables: only set valu `wait-storage.sh` waits up to 300 seconds for an `Up` Store. This duration is hardcoded and cannot be changed through environment variables. -`HG_SERVER_INIT_STORE_ENABLED` accepts only the case-insensitive boolean values recognized by `HugeConfig`: `y`, `t`, `yes`, `on`, `true`, `n`, `f`, `no`, `off`, `false`. Other values, including `0` and `1`, terminate the entrypoint. +`HG_SERVER_INIT_STORE_ENABLED` and `HG_SERVER_DEPLOY_IN_K8S` accept only the case-insensitive boolean values recognized by `HugeConfig`: `y`, `t`, `yes`, `on`, `true`, `n`, `f`, `no`, `off`, `false`. Other values, including `0` and `1`, terminate the entrypoint. After successful initialization, the entrypoint writes `docker/init_complete`; later starts skip reinitialization but still invoke `bin/init-store.sh` to revalidate configuration each time initialization is disabled. From 1209f527d0d5064752d6de528842b2474f95397d Mon Sep 17 00:00:00 2001 From: Ayan Alam Date: Fri, 16 Oct 2026 02:21:01 +0530 Subject: [PATCH 2/2] docs: note that each HG_SERVER_URLS_TO_PD entry needs its own scheme server.urls_to_pd is URL-normalized as one string, so only the first entry gets http:// added; GraphManager then registers the rest of the comma-separated list as written. Say so in the EN and CN variable rows. --- content/cn/docs/guides/hugegraph-docker-cluster.md | 2 +- content/en/docs/guides/hugegraph-docker-cluster.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/cn/docs/guides/hugegraph-docker-cluster.md b/content/cn/docs/guides/hugegraph-docker-cluster.md index 0b05eac914..d00b10e6ef 100644 --- a/content/cn/docs/guides/hugegraph-docker-cluster.md +++ b/content/cn/docs/guides/hugegraph-docker-cluster.md @@ -209,7 +209,7 @@ curl -o /dev/null -w '%{http_code}\n' -u "admin:${HUGEGRAPH_ADMIN_PASSWORD}" \ | `HG_SERVER_USE_PD` | `false` | `rest-server.properties` 中的 `usePD` | | `HG_SERVER_CLUSTER` | `hg-test` | `rest-server.properties` 中的 `cluster` | | `HG_SERVER_REST_URL` | `http://0.0.0.0:8080`(镜像中已设置) | `restserver.url` | -| `HG_SERVER_URLS_TO_PD` | `http://0.0.0.0:8080` | `server.urls_to_pd`:本 Server 注册到 PD 的地址列表(逗号分隔),代替 `restserver.url`;仅在 `server.deploy_in_k8s` 为 `true` 时生效;其中的空白字符会被去除 | +| `HG_SERVER_URLS_TO_PD` | `http://0.0.0.0:8080` | `server.urls_to_pd`:本 Server 注册到 PD 的地址列表(逗号分隔),代替 `restserver.url`;仅在 `server.deploy_in_k8s` 为 `true` 时生效;每个地址都要自带 `http://` 前缀,系统只会给第一个地址补上;其中的空白字符会被去除 | | `HG_SERVER_DEPLOY_IN_K8S` | `false` | `rest-server.properties` 中的 `server.deploy_in_k8s` | | `HG_SERVER_MIN_FREE_MEMORY` | `64`(MB) | `restserver.min_free_memory` | | `HG_SERVER_INIT_STORE_ENABLED` | `true` | `init_store.enabled`;元数据由存储侧管理的 PD/HStore 部署应设为 `false` | diff --git a/content/en/docs/guides/hugegraph-docker-cluster.md b/content/en/docs/guides/hugegraph-docker-cluster.md index 6545f8c2e6..17300af7e1 100644 --- a/content/en/docs/guides/hugegraph-docker-cluster.md +++ b/content/en/docs/guides/hugegraph-docker-cluster.md @@ -209,7 +209,7 @@ Unlike PD and Store, Server has no mandatory entrypoint variables: only set valu | `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` | -| `HG_SERVER_URLS_TO_PD` | `http://0.0.0.0:8080` | `server.urls_to_pd`: comma-separated URLs this Server registers in PD instead of `restserver.url`; read only when `server.deploy_in_k8s` is `true`; whitespace is removed | +| `HG_SERVER_URLS_TO_PD` | `http://0.0.0.0:8080` | `server.urls_to_pd`: comma-separated URLs this Server registers in PD instead of `restserver.url`; read only when `server.deploy_in_k8s` is `true`; give each URL its own `http://` prefix, since only the first entry gets one added; whitespace is removed | | `HG_SERVER_DEPLOY_IN_K8S` | `false` | `server.deploy_in_k8s` in `rest-server.properties` | | `HG_SERVER_MIN_FREE_MEMORY` | `64`(MB) | `restserver.min_free_memory` | | `HG_SERVER_INIT_STORE_ENABLED` | `true` | `init_store.enabled`; set `false` for PD/HStore deployments whose metadata is managed by storage |