This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 3ca12c3d44 [INLONG-9608][Agent] Modify Agent configuration file for
agent.manager.addr (#9609)
3ca12c3d44 is described below
commit 3ca12c3d449d423a6b563507e7f5a3eb121560ec
Author: haifxu <[email protected]>
AuthorDate: Wed Jan 24 16:51:11 2024 +0800
[INLONG-9608][Agent] Modify Agent configuration file for agent.manager.addr
(#9609)
---
bin/init-config.sh | 3 +--
inlong-agent/agent-common/src/test/resources/agent.properties | 3 +--
inlong-agent/agent-core/src/test/resources/agent.properties | 3 +--
inlong-agent/agent-core/src/test/resources/temp/agent.properties | 3 +--
inlong-agent/agent-docker/agent-docker.sh | 3 +--
inlong-agent/agent-plugins/src/test/resources/agent.properties | 3 +--
inlong-agent/conf/agent.properties | 3 +--
7 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/bin/init-config.sh b/bin/init-config.sh
index 81f1e6b91d..ec3727c394 100644
--- a/bin/init-config.sh
+++ b/bin/init-config.sh
@@ -53,8 +53,7 @@ init_inlong_agent() {
cd $INLONG_HOME/inlong-agent/conf
$SED_COMMAND 's/agent.local.ip=.*/'''agent.local.ip=${local_ip}'''/g'
agent.properties
$SED_COMMAND 's/agent.http.port=.*/'''agent.http.port=${agent_port}'''/g'
agent.properties
- $SED_COMMAND
's/agent.manager.vip.http.host=.*/'''agent.manager.vip.http.host=${manager_server_hostname}'''/g'
agent.properties
- $SED_COMMAND
's/agent.manager.vip.http.port=.*/'''agent.manager.vip.http.port=${manager_server_port}'''/g'
agent.properties
+ $SED_COMMAND
's/agent.manager.addr=.*/'''agent.manager.addr=http://${manager_server_hostname}:${manager_server_port}'''/g'
agent.properties
$SED_COMMAND "s/audit.enable=.*$/audit.enable=true/g" agent.properties
$SED_COMMAND
's/audit.proxys=.*/'''audit.proxys=${audit_proxys_ip}:${audit_proxys_port}'''/g'
agent.properties
}
diff --git a/inlong-agent/agent-common/src/test/resources/agent.properties
b/inlong-agent/agent-common/src/test/resources/agent.properties
index fa95d663e9..2cfe668fb1 100755
--- a/inlong-agent/agent-common/src/test/resources/agent.properties
+++ b/inlong-agent/agent-common/src/test/resources/agent.properties
@@ -20,8 +20,7 @@ agent.maxSize=10
agent.maxBuff=200
agent.conf.resource=manager
job.thread.running.core=10
-agent.manager.vip.http.host=127.0.0.1
-agent.manager.vip.http.port=8083
+agent.manager.addr=http://127.0.0.1:8083
agent.fetcher.classname=org.apache.inlong.agent.plugin.fetcher.ManagerFetcher
agent.custom.fixed.ip=
diff --git a/inlong-agent/agent-core/src/test/resources/agent.properties
b/inlong-agent/agent-core/src/test/resources/agent.properties
index 8515e7799a..7b76bf2f4b 100755
--- a/inlong-agent/agent-core/src/test/resources/agent.properties
+++ b/inlong-agent/agent-core/src/test/resources/agent.properties
@@ -24,7 +24,6 @@ job.thread.running.core=10
############################
# manager config
############################
-agent.manager.vip.http.host=127.0.0.1
-agent.manager.vip.http.port=8083
+agent.manager.addr=http://127.0.0.1:8083
agent.manager.auth.secretId=
agent.manager.auth.secretKey=
diff --git a/inlong-agent/agent-core/src/test/resources/temp/agent.properties
b/inlong-agent/agent-core/src/test/resources/temp/agent.properties
index 1561928750..e34650c99a 100755
--- a/inlong-agent/agent-core/src/test/resources/temp/agent.properties
+++ b/inlong-agent/agent-core/src/test/resources/temp/agent.properties
@@ -24,5 +24,4 @@ job.thread.running.core=10
############################
# manager config
############################
-agent.manager.vip.http.host=127.0.0.1
-agent.manager.vip.http.port=8083
+agent.manager.addr=http://127.0.0.1:8083
diff --git a/inlong-agent/agent-docker/agent-docker.sh
b/inlong-agent/agent-docker/agent-docker.sh
index 51a2a6195b..f6c9960cbb 100644
--- a/inlong-agent/agent-docker/agent-docker.sh
+++ b/inlong-agent/agent-docker/agent-docker.sh
@@ -23,8 +23,7 @@ local_ip=$(ifconfig $ETH_NETWORK | grep "inet" | grep -v
"inet6" | awk '{print $
sed -i "s/agent.local.ip=.*$/agent.local.ip=$local_ip/g"
"${file_path}/conf/agent.properties"
sed -i
"s/agent.fetcher.interval=.*$/agent.fetcher.interval=$AGENT_FETCH_INTERVAL/g"
"${file_path}/conf/agent.properties"
sed -i
"s/agent.heartbeat.interval=.*$/agent.heartbeat.interval=$AGENT_HEARTBEAT_INTERVAL/g"
"${file_path}/conf/agent.properties"
-sed -i
"s/agent.manager.vip.http.host=.*$/agent.manager.vip.http.host=$MANAGER_OPENAPI_IP/g"
"${file_path}/conf/agent.properties"
-sed -i
"s/agent.manager.vip.http.port=.*$/agent.manager.vip.http.port=$MANAGER_OPENAPI_PORT/g"
"${file_path}/conf/agent.properties"
+sed -i
"s/agent.manager.addr=.*$/agent.manager.addr=http://$MANAGER_OPENAPI_IP:$MANAGER_OPENAPI_PORT/g"
"${file_path}/conf/agent.properties"
sed -i "s/audit.enable=.*$/audit.enable=$AUDIT_ENABLE/g"
"${file_path}/conf/agent.properties"
sed -i "s/audit.proxys=.*$/audit.proxys=$AUDIT_PROXY_URL/g"
"${file_path}/conf/agent.properties"
sed -i "s/agent.cluster.tag=.*$/agent.cluster.tag=$CLUSTER_TAG/g"
"${file_path}/conf/agent.properties"
diff --git a/inlong-agent/agent-plugins/src/test/resources/agent.properties
b/inlong-agent/agent-plugins/src/test/resources/agent.properties
index 7fca451641..e5c6cdae2b 100755
--- a/inlong-agent/agent-plugins/src/test/resources/agent.properties
+++ b/inlong-agent/agent-plugins/src/test/resources/agent.properties
@@ -20,8 +20,7 @@ agent.maxSize=10
agent.maxBuff=200
agent.conf.resource=manager
job.thread.running.core=10
-agent.manager.vip.http.host=127.0.0.1
-agent.manager.vip.http.port=8083
+agent.manager.addr=http://127.0.0.1:8083
agent.fetcher.classname=org.apache.inlong.agent.plugin.fetcher.ManagerFetcher
agent.manager.auth.secretId=admin
agent.manager.auth.secretKey=admin
diff --git a/inlong-agent/conf/agent.properties
b/inlong-agent/conf/agent.properties
index 45031e3e4f..d67b0b90a4 100755
--- a/inlong-agent/conf/agent.properties
+++ b/inlong-agent/conf/agent.properties
@@ -75,8 +75,7 @@ task.pull.maxSecond=2
############################
# manager config
############################
-agent.manager.vip.http.host=127.0.0.1
-agent.manager.vip.http.port=8083
+agent.manager.addr=http://127.0.0.1:8083
agent.manager.auth.secretId=
agent.manager.auth.secretKey=