From 7cd84cac8ae392298498deea250f20088a8d4980 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Tue, 10 Dec 2024 13:07:57 +0800 Subject: [PATCH 1/9] Update common.properties MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加sshUser和sshPort参数 --- datasophon-common/src/main/resources/common.properties | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datasophon-common/src/main/resources/common.properties b/datasophon-common/src/main/resources/common.properties index 485bc178..8a8b23ee 100644 --- a/datasophon-common/src/main/resources/common.properties +++ b/datasophon-common/src/main/resources/common.properties @@ -26,4 +26,6 @@ times=20 timeOutPeriodOne=1 timeOutPeriodTwo=2 HADOOP_HOME=/opt/datasophon/hadoop +sshUser=root +sshPort=22 id_rsa=/.ssh/id_rsa From c0741ea424e65ca1eb21b38094559f7879cbfb33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Tue, 10 Dec 2024 13:10:27 +0800 Subject: [PATCH 2/9] Update Constants.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加SSH_USER和SSH_PORT参数 --- .../src/main/java/com/datasophon/common/Constants.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/datasophon-common/src/main/java/com/datasophon/common/Constants.java b/datasophon-common/src/main/java/com/datasophon/common/Constants.java index 49ce731f..29e73043 100644 --- a/datasophon-common/src/main/java/com/datasophon/common/Constants.java +++ b/datasophon-common/src/main/java/com/datasophon/common/Constants.java @@ -36,6 +36,8 @@ public final class Constants { public static final String HOST_MAP = "_host_map"; public static final String COMMAND_HOST_ID = "command_host_id"; public static final String HOST_MD5 = "_host_md5"; + public static final String SSH_USER = PropertyUtils.getString("sshUser", Constants.ROOT); + public static final int SSH_PORT = PropertyUtils.getInt("sshPort", 22); public static final String ID_RSA = PropertyUtils.getString("id_rsa", "/.ssh/id_rsa"); public static final String HOSTNAME = "hostname"; From dd4141653b83c567818b96cf78e849bf7248b4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Tue, 10 Dec 2024 13:13:15 +0800 Subject: [PATCH 3/9] Update InstallServiceImpl.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit generateHostAgentCommand方法中sshPort和sshUser改为可配置 --- .../com/datasophon/api/service/impl/InstallServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datasophon-service/src/main/java/com/datasophon/api/service/impl/InstallServiceImpl.java b/datasophon-service/src/main/java/com/datasophon/api/service/impl/InstallServiceImpl.java index 64cbc7ca..2849d6b4 100644 --- a/datasophon-service/src/main/java/com/datasophon/api/service/impl/InstallServiceImpl.java +++ b/datasophon-service/src/main/java/com/datasophon/api/service/impl/InstallServiceImpl.java @@ -435,7 +435,7 @@ public Result generateHostAgentCommand(String clusterHostIds, String commandType List clusterHostList = hostService.getHostListByIds(clusterHostIdList); for (ClusterHostDO clusterHostDO : clusterHostList) { ClientSession session = - MinaUtils.openConnection(clusterHostDO.getHostname(), 22, Constants.ROOT); + MinaUtils.openConnection(clusterHostDO.getHostname(), Constants.SSH_PORT, Constants.SSH_USER); String result = MinaUtils.execCmdWithResult(session, "service datasophon-worker " + commandType); logger.info("hostAgent command:{}", "service datasophon-worker " + commandType); if (result != null && !result.equals("failed")) { From d3452580a6e0481f4a5abb3a756d607eca261df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Tue, 10 Dec 2024 13:27:33 +0800 Subject: [PATCH 4/9] Update InstallServiceImpl.java MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sshPort和sshUser改为可配置 --- .../com/datasophon/api/service/impl/InstallServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasophon-service/src/main/java/com/datasophon/api/service/impl/InstallServiceImpl.java b/datasophon-service/src/main/java/com/datasophon/api/service/impl/InstallServiceImpl.java index 2849d6b4..529c8c2c 100644 --- a/datasophon-service/src/main/java/com/datasophon/api/service/impl/InstallServiceImpl.java +++ b/datasophon-service/src/main/java/com/datasophon/api/service/impl/InstallServiceImpl.java @@ -357,8 +357,8 @@ public Result reStartDispatcherHostAgent(Integer clusterId, String hostnames) { hostInfo = map.get(hostname); } else if (Objects.nonNull(clusterHost)) { hostInfo.setHostname(hostname); - hostInfo.setSshUser("root"); - hostInfo.setSshPort(22); + hostInfo.setSshUser(Constants.SSH_USER); + hostInfo.setSshPort(Constants.SSH_PORT); } ActorRef hostActor = ActorUtils.getLocalActor( From 79de1b991643d635b20d7155912eaa2c2d934397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Thu, 12 Dec 2024 09:20:59 +0800 Subject: [PATCH 5/9] Update service_ddl.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改ES配置 liugang Yesterday 17:16 --- .../DDP-1.2.1/ELASTICSEARCH/service_ddl.json | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/datasophon-api/src/main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json b/datasophon-api/src/main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json index a6b8e7e3..b1e2d3e4 100644 --- a/datasophon-api/src/main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json +++ b/datasophon-api/src/main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json @@ -116,13 +116,14 @@ "http.cors.enabled", "http.cors.allow-origin", "path.data", + "path.logs", "custom.elasticsearch.yml" ] }, { "filename": "jvm.options", "configFormat": "custom", - "outputDirectory": "", + "outputDirectory": "config/jvm.options.d", "templateName": "jvm.options.ftl", "includeParams": [ "heapSize" @@ -260,7 +261,19 @@ "separator": ",", "required": true, "type": "multiple", - "value": ["/data/es"], + "value": ["/data/es/data"], + "configurableInWizard": true, + "hidden": false, + "defaultValue": "" + }, + { + "name": "path.logs", + "label": "日志存储目录", + "description": "", + "configType": "path", + "required": true, + "type": "input", + "value": "/data/es/logs", "configurableInWizard": true, "hidden": false, "defaultValue": "" @@ -269,12 +282,15 @@ "name": "heapSize", "label": "ES堆内存大小", "description": "", - "required": false, + "required": true, + "minValue": 0, + "maxValue": 256, "type": "input", "value": "", + "unit": "GB", "configurableInWizard": true, - "hidden": true, - "defaultValue": "2g" + "hidden": false, + "defaultValue": "2" }, { "name": "custom.elasticsearch.yml", @@ -289,4 +305,4 @@ "defaultValue": "" } ] -} \ No newline at end of file +} From 94d2c45a90db1b4aabd5a6e20b713bddcc9932ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Thu, 12 Dec 2024 09:24:46 +0800 Subject: [PATCH 6/9] Update service_ddl.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改ES配置 --- .../main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json | 1 + 1 file changed, 1 insertion(+) diff --git a/datasophon-api/src/main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json b/datasophon-api/src/main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json index b1e2d3e4..4688907c 100644 --- a/datasophon-api/src/main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json +++ b/datasophon-api/src/main/resources/meta/DDP-1.2.1/ELASTICSEARCH/service_ddl.json @@ -282,6 +282,7 @@ "name": "heapSize", "label": "ES堆内存大小", "description": "", + "configType": "map", "required": true, "minValue": 0, "maxValue": 256, From 8a3f761b31e28a3808a017ee4fd00b40a400e167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Thu, 12 Dec 2024 09:29:21 +0800 Subject: [PATCH 7/9] Update service_ddl.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改ES配置 --- .../DDP-1.2.2/ELASTICSEARCH/service_ddl.json | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/datasophon-api/src/main/resources/meta/DDP-1.2.2/ELASTICSEARCH/service_ddl.json b/datasophon-api/src/main/resources/meta/DDP-1.2.2/ELASTICSEARCH/service_ddl.json index a6b8e7e3..4688907c 100644 --- a/datasophon-api/src/main/resources/meta/DDP-1.2.2/ELASTICSEARCH/service_ddl.json +++ b/datasophon-api/src/main/resources/meta/DDP-1.2.2/ELASTICSEARCH/service_ddl.json @@ -116,13 +116,14 @@ "http.cors.enabled", "http.cors.allow-origin", "path.data", + "path.logs", "custom.elasticsearch.yml" ] }, { "filename": "jvm.options", "configFormat": "custom", - "outputDirectory": "", + "outputDirectory": "config/jvm.options.d", "templateName": "jvm.options.ftl", "includeParams": [ "heapSize" @@ -260,7 +261,19 @@ "separator": ",", "required": true, "type": "multiple", - "value": ["/data/es"], + "value": ["/data/es/data"], + "configurableInWizard": true, + "hidden": false, + "defaultValue": "" + }, + { + "name": "path.logs", + "label": "日志存储目录", + "description": "", + "configType": "path", + "required": true, + "type": "input", + "value": "/data/es/logs", "configurableInWizard": true, "hidden": false, "defaultValue": "" @@ -269,12 +282,16 @@ "name": "heapSize", "label": "ES堆内存大小", "description": "", - "required": false, + "configType": "map", + "required": true, + "minValue": 0, + "maxValue": 256, "type": "input", "value": "", + "unit": "GB", "configurableInWizard": true, - "hidden": true, - "defaultValue": "2g" + "hidden": false, + "defaultValue": "2" }, { "name": "custom.elasticsearch.yml", @@ -289,4 +306,4 @@ "defaultValue": "" } ] -} \ No newline at end of file +} From e055580c29f1b0bedc60b957604e60c4ba4c2e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Thu, 12 Dec 2024 09:30:11 +0800 Subject: [PATCH 8/9] Update jvm.options.ftl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改ES配置 --- .../src/main/resources/templates/jvm.options.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datasophon-worker/src/main/resources/templates/jvm.options.ftl b/datasophon-worker/src/main/resources/templates/jvm.options.ftl index aa7c6737..3028c4dd 100644 --- a/datasophon-worker/src/main/resources/templates/jvm.options.ftl +++ b/datasophon-worker/src/main/resources/templates/jvm.options.ftl @@ -1,2 +1,2 @@ --Xms${heapSize} --Xmx${heapSize} \ No newline at end of file +-Xms${heapSize}g +-Xmx${heapSize}g From fb1de210dac50fdf7398aeebece9ff1bef908a6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A9=E6=B6=AF=E4=BA=91=E6=B5=B7?= Date: Thu, 12 Dec 2024 09:33:28 +0800 Subject: [PATCH 9/9] Update service_ddl.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改ES配置 --- .../DDP-1.2.0/ELASTICSEARCH/service_ddl.json | 29 +++++++++++++++---- 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/datasophon-api/src/main/resources/meta/DDP-1.2.0/ELASTICSEARCH/service_ddl.json b/datasophon-api/src/main/resources/meta/DDP-1.2.0/ELASTICSEARCH/service_ddl.json index a6b8e7e3..4688907c 100644 --- a/datasophon-api/src/main/resources/meta/DDP-1.2.0/ELASTICSEARCH/service_ddl.json +++ b/datasophon-api/src/main/resources/meta/DDP-1.2.0/ELASTICSEARCH/service_ddl.json @@ -116,13 +116,14 @@ "http.cors.enabled", "http.cors.allow-origin", "path.data", + "path.logs", "custom.elasticsearch.yml" ] }, { "filename": "jvm.options", "configFormat": "custom", - "outputDirectory": "", + "outputDirectory": "config/jvm.options.d", "templateName": "jvm.options.ftl", "includeParams": [ "heapSize" @@ -260,7 +261,19 @@ "separator": ",", "required": true, "type": "multiple", - "value": ["/data/es"], + "value": ["/data/es/data"], + "configurableInWizard": true, + "hidden": false, + "defaultValue": "" + }, + { + "name": "path.logs", + "label": "日志存储目录", + "description": "", + "configType": "path", + "required": true, + "type": "input", + "value": "/data/es/logs", "configurableInWizard": true, "hidden": false, "defaultValue": "" @@ -269,12 +282,16 @@ "name": "heapSize", "label": "ES堆内存大小", "description": "", - "required": false, + "configType": "map", + "required": true, + "minValue": 0, + "maxValue": 256, "type": "input", "value": "", + "unit": "GB", "configurableInWizard": true, - "hidden": true, - "defaultValue": "2g" + "hidden": false, + "defaultValue": "2" }, { "name": "custom.elasticsearch.yml", @@ -289,4 +306,4 @@ "defaultValue": "" } ] -} \ No newline at end of file +}