From d22f540d57bcc735a715030542f2137498d29256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=8C=E6=A3=AE?= Date: Tue, 23 Jul 2024 15:55:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=20elastic?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 萌森 --- apps/elastic-elasticsearch/8.14.3/data.yml | 16 +++++++++++- .../8.14.3/docker-compose.yml | 2 +- apps/elastic-elasticsearch/README.md | 26 +++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/apps/elastic-elasticsearch/8.14.3/data.yml b/apps/elastic-elasticsearch/8.14.3/data.yml index c6e9e81e..126733cc 100644 --- a/apps/elastic-elasticsearch/8.14.3/data.yml +++ b/apps/elastic-elasticsearch/8.14.3/data.yml @@ -29,10 +29,24 @@ additionalProperties: labelEn: Kibana password (kibana_system) required: false type: password - - default: "" + - default: "-Xms1g -Xmx1g" edit: true envKey: ES_JAVA_OPTS labelZh: Elasticsearch Java 配置 (可选) labelEn: Elasticsearch Java configuration (optional) required: false type: text + - default: "elasticsearch" + edit: true + envKey: ES_SETTING_CLUSTER_NAME + labelZh: 集群名称 + labelEn: Cluster name + required: true + type: text + - default: "es-node" + edit: true + envKey: ES_SETTING_NODE_NAME + labelZh: 节点名称 + labelEn: Node name + required: true + type: text diff --git a/apps/elastic-elasticsearch/8.14.3/docker-compose.yml b/apps/elastic-elasticsearch/8.14.3/docker-compose.yml index e4fa0ec1..88690a82 100644 --- a/apps/elastic-elasticsearch/8.14.3/docker-compose.yml +++ b/apps/elastic-elasticsearch/8.14.3/docker-compose.yml @@ -27,10 +27,10 @@ services: - /etc/1panel/envs/global.env - ${ENV_FILE:-/etc/1panel/envs/default.env} volumes: - - ./config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml - ${ELASTICSEARCH_ROOT_PATH}/data:/usr/share/elasticsearch/data - ${ELASTICSEARCH_ROOT_PATH}/backup:/usr/share/elasticsearch/backup - ${ELASTICSEARCH_ROOT_PATH}/plugins:/usr/share/elasticsearch/plugins environment: - LICENSE=basic - ES_SETTING_BOOTSTRAP_MEMORY__LOCK=true + - ES_SETTING_PATH_REPO=/usr/share/elasticsearch/backup diff --git a/apps/elastic-elasticsearch/README.md b/apps/elastic-elasticsearch/README.md index ad47889b..4c36cc52 100644 --- a/apps/elastic-elasticsearch/README.md +++ b/apps/elastic-elasticsearch/README.md @@ -79,3 +79,29 @@ sysctl -p + `注册令牌 (节点)` 配置 用于加入集群的注册令牌。在集群中的节点中生成,用于加入集群验证。每个注册令牌有效时长30分钟。 + +## 快捷操作 + +> 重置密码 + +```sh +cd /usr/share/elasticsearch/bin +./elasticsearch-reset-password -u elastic +``` + +> 创建 `kibana` 注册令牌 + +```sh +cd /usr/share/elasticsearch/bin +./elasticsearch-create-enrollment-token -s kibana +``` + +> 导出证书 + +<容器名称> 为容器名称或容器 ID,可以通过 `docker ps` 命令查看。 + +导出 `http_ca.crt` 证书到当前目录 + +```sh +docker cp <容器名称>:/usr/share/elasticsearch/config/certs/http_ca.crt . +```