You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/09/20 07:58:11 UTC

[inlong] branch release-1.3.0 updated (7f002a390 -> 7d020fcba)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a change to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git


    from 7f002a390 [INLONG-5940][Sort] Compatible with the old version of sort protocol with mysql and kafka extract node (#5945)
     new 3d2df3cec [INLONG-5741][Agent] Keep the docker config of Agent consistent with physical machine (#5742)
     new 7d020fcba [INLONG-5948][Audit] Add the enable audit environment (#5949)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../inlong/agent/constant/AgentConstants.java      |  2 +-
 inlong-agent/agent-docker/Dockerfile               |  2 ++
 inlong-agent/agent-docker/agent-docker.sh          | 38 ++++++++++------------
 inlong-agent/conf/agent.properties                 |  2 +-
 inlong-dataproxy/dataproxy-docker/Dockerfile       |  2 ++
 .../dataproxy-docker/dataproxy-docker.sh           |  1 +
 6 files changed, 24 insertions(+), 23 deletions(-)


[inlong] 01/02: [INLONG-5741][Agent] Keep the docker config of Agent consistent with physical machine (#5742)

Posted by do...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git

commit 3d2df3cec0ab702d6e2211d7ed38034fe01b7e8c
Author: Lucas <10...@users.noreply.github.com>
AuthorDate: Fri Sep 2 20:05:30 2022 +0800

    [INLONG-5741][Agent] Keep the docker config of Agent consistent with physical machine (#5742)
---
 inlong-agent/agent-docker/agent-docker.sh | 37 +++++++++++++------------------
 1 file changed, 16 insertions(+), 21 deletions(-)

diff --git a/inlong-agent/agent-docker/agent-docker.sh b/inlong-agent/agent-docker/agent-docker.sh
index f6ecc9a21..bffb369e2 100644
--- a/inlong-agent/agent-docker/agent-docker.sh
+++ b/inlong-agent/agent-docker/agent-docker.sh
@@ -19,27 +19,22 @@
 file_path=$(cd "$(dirname "$0")"/../;pwd)
 local_ip=$(ifconfig $ETH_NETWORK | grep "inet" | grep -v "inet6" | awk '{print $2}')
 # config
-cat <<EOF > ${file_path}/conf/agent.properties
-agent.fetcher.classname=org.apache.inlong.agent.plugin.fetcher.ManagerFetcher
-agent.local.ip=$local_ip
-agent.fetcher.interval=$AGENT_FETCH_INTERVAL
-agent.heartbeat.interval=$AGENT_HEARTBEAT_INTERVAL
-agent.manager.vip.http.host=$MANAGER_OPENAPI_IP
-agent.manager.vip.http.port=$MANAGER_OPENAPI_PORT
-agent.dataproxy.http.host=$DATAPROXY_IP
-agent.dataproxy.http.port=$DATAPROXY_PORT
-agent.http.port=8008
-agent.http.enable=true
-agent.domainListeners=org.apache.inlong.agent.metrics.AgentPrometheusMetricListener
-agent.prometheus.exporter.port=9080
-audit.proxys=$AUDIT_PROXY_URL
-agent.cluster.tag=$CLUSTER_TAG
-agent.cluster.name=$CLUSTER_NAME
-agent.cluster.inCharges=$CLUSTER_IN_CHARGES
-agent.manager.auth.secretId=$MANAGER_OPENAPI_AUTH_ID
-agent.manager.auth.secretKey=$MANAGER_OPENAPI_AUTH_KEY
-agent.custom.fixed.ip=$CUSTOM_FIXED_IP
-EOF
+
+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.dataproxy.http.host=.*$/agent.dataproxy.http.host=$DATAPROXY_IP/g" "${file_path}/conf/agent.properties"
+sed -i "s/agent.dataproxy.http.port=.*$/agent.dataproxy.http.port=$DATAPROXY_PORT/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"
+sed -i "s/agent.cluster.name=.*$/agent.cluster.name=$CLUSTER_NAME/g" "${file_path}/conf/agent.properties"
+sed -i "s/agent.cluster.inCharges=.*$/agent.cluster.inCharges=$CLUSTER_IN_CHARGES/g" "${file_path}/conf/agent.properties"
+sed -i "s/agent.manager.auth.secretId=.*$/agent.manager.auth.secretId=$MANAGER_OPENAPI_AUTH_ID/g" "${file_path}/conf/agent.properties"
+sed -i "s/agent.manager.auth.secretKey=.*$/agent.manager.auth.secretKey=$MANAGER_OPENAPI_AUTH_KEY/g" "${file_path}/conf/agent.properties"
+sed -i "s/agent.custom.fixed.ip=.*$/agent.custom.fixed.ip=$CUSTOM_FIXED_IP/g" "${file_path}/conf/agent.properties"
+
 # start
 bash +x ${file_path}/bin/agent.sh start
 sleep 3


[inlong] 02/02: [INLONG-5948][Audit] Add the enable audit environment (#5949)

Posted by do...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git

commit 7d020fcba66963f8ef67cc18335dd5e6f2148693
Author: Charles Zhang <do...@apache.org>
AuthorDate: Tue Sep 20 15:48:00 2022 +0800

    [INLONG-5948][Audit] Add the enable audit environment (#5949)
---
 .../src/main/java/org/apache/inlong/agent/constant/AgentConstants.java  | 2 +-
 inlong-agent/agent-docker/Dockerfile                                    | 2 ++
 inlong-agent/agent-docker/agent-docker.sh                               | 1 +
 inlong-agent/conf/agent.properties                                      | 2 +-
 inlong-dataproxy/dataproxy-docker/Dockerfile                            | 2 ++
 inlong-dataproxy/dataproxy-docker/dataproxy-docker.sh                   | 1 +
 6 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/constant/AgentConstants.java b/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/constant/AgentConstants.java
index 6af336097..843bb7bea 100755
--- a/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/constant/AgentConstants.java
+++ b/inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/constant/AgentConstants.java
@@ -183,7 +183,7 @@ public class AgentConstants {
     public static final String PROMETHEUS_EXPORTER_PORT = "agent.prometheus.exporter.port";
     public static final int DEFAULT_PROMETHEUS_EXPORTER_PORT = 8080;
 
-    public static final String AUDIT_ENABLE = "agent.audit.enable";
+    public static final String AUDIT_ENABLE = "audit.enable";
     public static final boolean DEFAULT_AUDIT_ENABLE = true;
 
     public static final String AUDIT_KEY_PROXYS = "audit.proxys";
diff --git a/inlong-agent/agent-docker/Dockerfile b/inlong-agent/agent-docker/Dockerfile
index d37562ded..d28a04f60 100644
--- a/inlong-agent/agent-docker/Dockerfile
+++ b/inlong-agent/agent-docker/Dockerfile
@@ -33,6 +33,8 @@ ENV MANAGER_OPENAPI_PORT=8082
 ENV DATAPROXY_IP=127.0.0.1
 ENV DATAPROXY_PORT=46801
 ENV AUDIT_PROXY_URL=127.0.0.1:10081
+# enable audit, true or false
+ENV AUDIT_ENABLE=true
 ENV ETH_NETWORK=eth0
 ENV AGENT_FETCH_INTERVAL=10
 ENV AGENT_HEARTBEAT_INTERVAL=10
diff --git a/inlong-agent/agent-docker/agent-docker.sh b/inlong-agent/agent-docker/agent-docker.sh
index bffb369e2..864232787 100644
--- a/inlong-agent/agent-docker/agent-docker.sh
+++ b/inlong-agent/agent-docker/agent-docker.sh
@@ -27,6 +27,7 @@ sed -i "s/agent.manager.vip.http.host=.*$/agent.manager.vip.http.host=$MANAGER_O
 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.dataproxy.http.host=.*$/agent.dataproxy.http.host=$DATAPROXY_IP/g" "${file_path}/conf/agent.properties"
 sed -i "s/agent.dataproxy.http.port=.*$/agent.dataproxy.http.port=$DATAPROXY_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"
 sed -i "s/agent.cluster.name=.*$/agent.cluster.name=$CLUSTER_NAME/g" "${file_path}/conf/agent.properties"
diff --git a/inlong-agent/conf/agent.properties b/inlong-agent/conf/agent.properties
index dc6785f32..7483384c5 100755
--- a/inlong-agent/conf/agent.properties
+++ b/inlong-agent/conf/agent.properties
@@ -125,6 +125,6 @@ agent.prometheus.exporter.port=9080
 # audit config
 ############################
 # whether to enable audit
-agent.audit.enable=true
+audit.enable=true
 # audit proxy address
 audit.proxys=127.0.0.1:10081
diff --git a/inlong-dataproxy/dataproxy-docker/Dockerfile b/inlong-dataproxy/dataproxy-docker/Dockerfile
index 5b61f1b08..526948d69 100644
--- a/inlong-dataproxy/dataproxy-docker/Dockerfile
+++ b/inlong-dataproxy/dataproxy-docker/Dockerfile
@@ -26,6 +26,8 @@ ADD ${DATAPROXY_TARBALL} /opt/inlong-dataproxy
 EXPOSE 46801
 ENV MANAGER_OPENAPI_IP=127.0.0.1
 ENV MANAGER_OPENAPI_PORT=8083
+# enable audit, true or false
+ENV AUDIT_ENABLE=true
 ENV AUDIT_PROXY_URL=127.0.0.1:10081
 # pulsar or tubemq
 ENV MQ_TYPE=pulsar
diff --git a/inlong-dataproxy/dataproxy-docker/dataproxy-docker.sh b/inlong-dataproxy/dataproxy-docker/dataproxy-docker.sh
index 6fdf37926..e8ab8a2b3 100644
--- a/inlong-dataproxy/dataproxy-docker/dataproxy-docker.sh
+++ b/inlong-dataproxy/dataproxy-docker/dataproxy-docker.sh
@@ -22,6 +22,7 @@ local_ip=$(ifconfig | grep inet | grep -v inet6 | grep -v "127.0.0.1" | awk '{pr
 cd "${file_path}/"
 common_conf_file=./conf/common.properties
 sed -i "s/manager.hosts=.*$/manager.hosts=${MANAGER_OPENAPI_IP}:${MANAGER_OPENAPI_PORT}/g" "${common_conf_file}"
+sed -i "s/audit.enable=.*$/audit.enable=${AUDIT_ENABLE}/g" "${common_conf_file}"
 sed -i "s/audit.proxys=.*$/audit.proxys=${AUDIT_PROXY_URL}/g" "${common_conf_file}"
 sed -i "s/proxy.report.ip=.*$/proxy.report.ip=${local_ip}/g" "${common_conf_file}"
 sed -i "s/proxy.cluster.tag=.*$/proxy.cluster.tag=${CLUSTER_TAG}/g" "${common_conf_file}"