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 b08d1612b0 [INLONG-9806][Agent] Add installer configuration file
(#9815)
b08d1612b0 is described below
commit b08d1612b07b218755c2f4b630bc34f67a178067
Author: justinwwhuang <[email protected]>
AuthorDate: Thu Mar 14 16:32:08 2024 +0800
[INLONG-9806][Agent] Add installer configuration file (#9815)
---
inlong-agent/agent-installer/assembly.xml | 63 ++++++++
.../agent-installer/conf/installer.properties | 43 +++++
inlong-agent/agent-installer/conf/log4j2.xml | 175 +++++++++++++++++++++
inlong-agent/agent-installer/pom.xml | 38 +++++
4 files changed, 319 insertions(+)
diff --git a/inlong-agent/agent-installer/assembly.xml
b/inlong-agent/agent-installer/assembly.xml
new file mode 100644
index 0000000000..ad8b0cef4f
--- /dev/null
+++ b/inlong-agent/agent-installer/assembly.xml
@@ -0,0 +1,63 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<assembly
+ xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0
http://maven.apache.org/xsd/assembly-1.1.0.xsd">
+ <id>bin</id>
+ <formats>
+ <format>dir</format>
+ <format>tar.gz</format>
+ </formats>
+
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <fileSets>
+ <!-- for bin -->
+ <fileSet>
+ <directory>../bin</directory>
+ <includes>
+ <include>*.*</include>
+ </includes>
+ <excludes>
+ <exclude>*rock*</exclude>
+ </excludes>
+ <fileMode>0755</fileMode>
+ <outputDirectory>bin</outputDirectory>
+ <lineEnding>unix</lineEnding>
+ </fileSet>
+
+ <!-- for configs -->
+ <fileSet>
+ <directory>conf</directory>
+ <includes>
+ <include>*.*</include>
+ </includes>
+ <outputDirectory>conf</outputDirectory>
+ <lineEnding>unix</lineEnding>
+ </fileSet>
+ </fileSets>
+ <!-- for sub-module dependencies -->
+ <dependencySets>
+ <dependencySet>
+ <useProjectArtifact>false</useProjectArtifact>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <outputDirectory>lib</outputDirectory>
+ </dependencySet>
+ </dependencySets>
+</assembly>
diff --git a/inlong-agent/agent-installer/conf/installer.properties
b/inlong-agent/agent-installer/conf/installer.properties
new file mode 100755
index 0000000000..52b4ce071f
--- /dev/null
+++ b/inlong-agent/agent-installer/conf/installer.properties
@@ -0,0 +1,43 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+#######################
+# common config
+#######################
+local.ip=127.0.0.1
+agent.enable.oom.exit=false
+
+############################
+# manager config
+############################
+manager.addr=http://127.0.0.1:8083
+manager.auth.secretId=
+manager.auth.secretKey=
+
+############################
+# cluster config for automatically report and register
+############################
+cluster.tag=default_cluster
+cluster.name=default_agent
+
+############################
+# audit config
+############################
+# whether to enable audit
+audit.enable=true
+# audit proxy address
+audit.proxys=127.0.0.1:10081
diff --git a/inlong-agent/agent-installer/conf/log4j2.xml
b/inlong-agent/agent-installer/conf/log4j2.xml
new file mode 100644
index 0000000000..3db2c5dee3
--- /dev/null
+++ b/inlong-agent/agent-installer/conf/log4j2.xml
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<configuration status="WARN" monitorInterval="30">
+ <Properties>
+ <property name="basePath">${sys:agent.home}/logs</property>
+ <property name="log_pattern">[%X{trace_id} %X{span_id}] %d{yyyy-MM-dd
HH:mm:ss.SSS} -%5p ${PID:-} [%30.30t] %-30.30C{1.}:%L %m%n</property>
+ <property name="every_file_date">1</property>
+ <property name="every_file_size">1G</property>
+ <property name="output_log_level">INFO</property>
+ <property name="rolling_max">15</property>
+ <property name="debug_fileName">${basePath}/debug.log</property>
+ <property
name="debug_filePattern">${basePath}/debug-%d{yyyy-MM-dd}-%i.log.gz</property>
+ <property name="debug_max">10</property>
+ <property name="info_fileName">${basePath}/info.log</property>
+ <property
name="info_filePattern">${basePath}/info-%d{yyyy-MM-dd}-%i.log.gz</property>
+ <property name="info_max">10</property>
+ <property name="warn_fileName">${basePath}/warn.log</property>
+ <property
name="warn_filePattern">${basePath}/warn-%d{yyyy-MM-dd}-%i.log.gz</property>
+ <property name="warn_max">10</property>
+ <property name="error_fileName">${basePath}/error.log</property>
+ <property
name="error_filePattern">${basePath}/error-%d{yyyy-MM-dd}-%i.log.gz</property>
+ <property name="error_max">10</property>
+ <property name="console_print_level">INFO</property>
+ <property name="index_max">10</property>
+ <property name="index_fileName">${basePath}/index.log</property>
+ <property
name="index_filePattern">${basePath}/index-%d{yyyy-MM-dd}-%i.log.gz</property>
+ <property name="monitors_max">10</property>
+ <property name="monitors_fileName">${basePath}/monitors.log</property>
+ <property
name="monitors_filePattern">${basePath}/monitors-%d{yyyy-MM-dd}-%i.log.gz</property>
+ <property name="last_modify_time">15d</property>
+ </Properties>
+
+ <appenders>
+ <Console name="Console" target="SYSTEM_OUT">
+ <ThresholdFilter level="${console_print_level}" onMatch="ACCEPT"
onMismatch="DENY"/>
+ <PatternLayout pattern="${log_pattern}"/>
+ </Console>
+
+ <RollingFile name="DebugFile" fileName="${debug_fileName}"
filePattern="${debug_filePattern}">
+ <PatternLayout pattern="${log_pattern}"/>
+ <Policies>
+ <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
+ <SizeBasedTriggeringPolicy size="${every_file_size}"/>]
+ </Policies>
+ <DefaultRolloverStrategy max="${debug_max}">
+ <Delete basePath="${basePath}" maxDepth="1">
+ <IfFileName glob="debug*.log.gz"/>
+ <IfLastModified age="${last_modify_time}"/>
+ </Delete>
+ </DefaultRolloverStrategy>
+ <Filters>
+ <ThresholdFilter level="WARN" onMatch="DENY"
onMismatch="NEUTRAL"/>
+ <ThresholdFilter level="INFO" onMatch="DENY"
onMismatch="NEUTRAL"/>
+ <ThresholdFilter level="debug" onMatch="ACCEPT"
onMismatch="DENY"/>
+ </Filters>
+ </RollingFile>
+
+ <RollingFile name="InfoFile" fileName="${info_fileName}"
filePattern="${info_filePattern}">
+ <PatternLayout pattern="${log_pattern}"/>
+ <Policies>
+ <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
+ <SizeBasedTriggeringPolicy size="${every_file_size}"/>
+ </Policies>
+ <DefaultRolloverStrategy max="${info_max}">
+ <Delete basePath="${basePath}" maxDepth="1">
+ <IfFileName glob="info*.log.gz"/>
+ <IfLastModified age="${last_modify_time}"/>
+ </Delete>
+ </DefaultRolloverStrategy>
+ <Filters>
+ <ThresholdFilter level="WARN" onMatch="DENY"
onMismatch="NEUTRAL"/>
+ <ThresholdFilter level="INFO" onMatch="ACCEPT"
onMismatch="DENY"/>
+ </Filters>
+ </RollingFile>
+
+ <RollingFile name="IndexFile" fileName="${index_fileName}"
filePattern="${index_filePattern}">
+ <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %m%n"/>
+ <Policies>
+ <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
+ <SizeBasedTriggeringPolicy size="${every_file_size}"/>
+ </Policies>
+ <DefaultRolloverStrategy max="${index_max}">
+ <Delete basePath="${basePath}" maxDepth="1">
+ <IfFileName glob="index*.log.gz"/>
+ <IfLastModified age="${last_modify_time}"/>
+ </Delete>
+ </DefaultRolloverStrategy>
+ <Filters>
+ <ThresholdFilter level="WARN" onMatch="DENY"
onMismatch="NEUTRAL"/>
+ <ThresholdFilter level="INFO" onMatch="ACCEPT"
onMismatch="DENY"/>
+ </Filters>
+ </RollingFile>
+
+ <RollingFile name="MonitorFile" fileName="${monitors_fileName}"
filePattern="${monitors_filePattern}">
+ <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss} %m%n"/>
+ <Policies>
+ <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
+ <SizeBasedTriggeringPolicy size="${every_file_size}"/>
+ </Policies>
+ <DefaultRolloverStrategy max="${monitors_max}">
+ <Delete basePath="${basePath}" maxDepth="1">
+ <IfFileName glob="monitors*.log.gz"/>
+ <IfLastModified age="${last_modify_time}"/>
+ </Delete>
+ </DefaultRolloverStrategy>
+ <Filters>
+ <ThresholdFilter level="WARN" onMatch="DENY"
onMismatch="NEUTRAL"/>
+ <ThresholdFilter level="INFO" onMatch="ACCEPT"
onMismatch="DENY"/>
+ </Filters>
+ </RollingFile>
+
+ <RollingFile name="WarnFile" fileName="${warn_fileName}"
filePattern="${warn_filePattern}">
+ <PatternLayout pattern="${log_pattern}"/>
+ <Policies>
+ <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
+ <SizeBasedTriggeringPolicy size="${every_file_size}"/>
+ </Policies>
+ <DefaultRolloverStrategy max="${warn_max}">
+ <Delete basePath="${basePath}" maxDepth="1">
+ <IfFileName glob="warn*.log.gz"/>
+ <IfLastModified age="${last_modify_time}"/>
+ </Delete>
+ </DefaultRolloverStrategy>
+ <Filters>
+ <ThresholdFilter level="ERROR" onMatch="DENY"
onMismatch="NEUTRAL"/>
+ <ThresholdFilter level="WARN" onMatch="ACCEPT"
onMismatch="DENY"/>
+ </Filters>
+ </RollingFile>
+
+ <RollingFile name="ErrorFile" fileName="${error_fileName}"
filePattern="${error_filePattern}">
+ <PatternLayout pattern="${log_pattern}"/>
+ <Policies>
+ <TimeBasedTriggeringPolicy interval="${every_file_date}"/>
+ <SizeBasedTriggeringPolicy size="${every_file_size}"/>
+ </Policies>
+ <DefaultRolloverStrategy max="${error_max}">
+ <Delete basePath="${basePath}" maxDepth="1">
+ <IfFileName glob="error*.log.gz"/>
+ <IfLastModified age="${last_modify_time}"/>
+ </Delete>
+ </DefaultRolloverStrategy>
+ <Filters>
+ <ThresholdFilter level="FATAL" onMatch="DENY"
onMismatch="NEUTRAL"/>
+ <ThresholdFilter level="ERROR" onMatch="ACCEPT"
onMismatch="DENY"/>
+ </Filters>
+ </RollingFile>
+ </appenders>
+
+ <loggers>
+ <root level="${output_log_level}">
+ <appender-ref ref="Console"/>
+ <appender-ref ref="DebugFile"/>
+ <appender-ref ref="InfoFile"/>
+ <appender-ref ref="WarnFile"/>
+ <appender-ref ref="ErrorFile"/>
+ </root>
+ </loggers>
+</configuration>
\ No newline at end of file
diff --git a/inlong-agent/agent-installer/pom.xml
b/inlong-agent/agent-installer/pom.xml
index fc7b4191a0..45935dc20e 100644
--- a/inlong-agent/agent-installer/pom.xml
+++ b/inlong-agent/agent-installer/pom.xml
@@ -39,12 +39,50 @@
<artifactId>agent-common</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.rocksdb</groupId>
+ <artifactId>rocksdbjni</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.inlong</groupId>
<artifactId>agent-core</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.rocksdb</groupId>
+ <artifactId>rocksdbjni</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>${plugin.assembly.version}</version>
+ <executions>
+ <execution>
+ <id>make-assembly</id>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <phase>package</phase>
+ <configuration>
+
<finalName>apache-inlong-agent-installer-${project.version}</finalName>
+ <descriptors>
+ <descriptor>assembly.xml</descriptor>
+ </descriptors>
+ <tarLongFileMode>posix</tarLongFileMode>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</project>