Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 6 additions & 37 deletions ambari-infra/ambari-infra-assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>ambari-infra-assembly</artifactId>
<name>Ambari Infra Solr Assembly</name>
<name>Ambari Infra Assembly</name>
<url>http://maven.apache.org</url>

<properties>
Expand All @@ -41,7 +41,7 @@
<infra-manager.package.name>ambari-infra-manager</infra-manager.package.name>
<infra-manager.dir>${project.basedir}/../ambari-infra-manager</infra-manager.dir>
<infra-manager.mapping.path>${mapping.base.path}/${infra-manager.package.name}</infra-manager.mapping.path>
<infra-manager.conf.mapping.path>/etc/${infra-manager.package.name}/conf</infra-manager.conf.mapping.path>
<infra-manager.conf.mapping.path>${infra-manager.mapping.path}/conf</infra-manager.conf.mapping.path>
</properties>

<profiles>
Expand Down Expand Up @@ -142,30 +142,16 @@
<scriptFile>${project.basedir}/src/main/package/rpm/manager/postinstall.sh</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</postinstallScriptlet>
<postremoveScriptlet>
<scriptFile>${project.basedir}/src/main/package/rpm/manager/postremove.sh</scriptFile>
<fileEncoding>utf-8</fileEncoding>
</postremoveScriptlet>
<mappings>
<mapping>
<directory>${infra-manager.mapping.path}</directory>
<sources>
<source>
<location>${infra-manager.dir}/target/package</location>
<excludes>
<exclude>log4j.xml</exclude>
<exclude>infra-manager.properties</exclude>
<exclude>infra-manager-env.sh</exclude>
</excludes>
</source>
</sources>
</mapping>
<mapping>
<directory>${infra-manager.conf.mapping.path}</directory>
<sources>
<source>
<location>${infra-manager.dir}/target/package</location>
<includes>
<include>log4j.xml</include>
<include>infra-manager.properties</include>
<include>infra-manager-env.sh</include>
</includes>
</source>
</sources>
</mapping>
Expand Down Expand Up @@ -354,23 +340,6 @@
<group>root</group>
<prefix>${infra-manager.mapping.path}</prefix>
</mapper>
<excludes>
log4j.xml,infra-manager.properties,infra-manager-env.sh
</excludes>
</data>
<data>
<src>${infra-manager.dir}/target/package</src>
<type>directory</type>
<mapper>
<prefix>${infra-manager.conf.mapping.path}</prefix>
<type>perm</type>
<user>root</user>
<group>root</group>
<filemode>644</filemode>
</mapper>
<includes>
log4j.xml,infra-manager.properties,infra-manager-env.sh
</includes>
</data>
</dataSet>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
# limitations under the License

INFRA_MANAGER_LINK_NAME="/usr/bin/infra-manager"
INFRA_MANAGER_SOURCE="/usr/lib/ambari-infra-manager/infraManager.sh"
INFRA_MANAGER_SOURCE="/usr/lib/ambari-infra-manager/bin/infraManager.sh"
INFRA_MANAGER_CONF_LINK_DIR="/etc/ambari-infra-manager"
INFRA_MANAGER_CONF_LINK_NAME="$INFRA_MANAGER_CONF_LINK_DIR/conf"
INFRA_MANAGER_CONF_SOURCE="/usr/lib/ambari-infra-manager/conf"

rm -f $INFRA_MANAGER_LINK_NAME ; ln -s $INFRA_MANAGER_SOURCE $INFRA_MANAGER_LINK_NAME
rm -f $INFRA_MANAGER_CONF_LINK_NAME
rm -rf $INFRA_MANAGER_CONF_LINK_DIR
mkdir -p $INFRA_MANAGER_CONF_LINK_DIR
ln -s $INFRA_MANAGER_CONF_SOURCE $INFRA_MANAGER_CONF_LINK_NAME
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@
# 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

INFRA_MANAGER_CONF_LINK_DIR="/etc/ambari-infra-manager"
INFRA_MANAGER_CONF_LINK_NAME="$INFRA_MANAGER_CONF_LINK_DIR/conf"
INFRA_MANAGER_LINK_NAME="/usr/bin/infra-manager"

rm -f $INFRA_MANAGER_LINK_NAME
rm -f $INFRA_MANAGER_CONF_LINK_NAME
rm -rf $INFRA_MANAGER_CONF_LINK_DIR
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
# limitations under the License

INFRA_MANAGER_LINK_NAME="/usr/bin/infra-manager"
INFRA_MANAGER_SOURCE="/usr/lib/ambari-infra-manager/infraManager.sh"
INFRA_MANAGER_SOURCE="/usr/lib/ambari-infra-manager/bin/infraManager.sh"
INFRA_MANAGER_CONF_LINK_DIR="/etc/ambari-infra-manager"
INFRA_MANAGER_CONF_LINK_NAME="$INFRA_MANAGER_CONF_LINK_DIR/conf"
INFRA_MANAGER_CONF_SOURCE="/usr/lib/ambari-infra-manager/conf"

rm -f $INFRA_MANAGER_LINK_NAME ; ln -s $INFRA_MANAGER_SOURCE $INFRA_MANAGER_LINK_NAME
rm -f $INFRA_MANAGER_LINK_NAME ; ln -s $INFRA_MANAGER_SOURCE $INFRA_MANAGER_LINK_NAME
rm -f $INFRA_MANAGER_CONF_LINK_NAME
rm -rf $INFRA_MANAGER_CONF_LINK_DIR
mkdir -p $INFRA_MANAGER_CONF_LINK_DIR
ln -s $INFRA_MANAGER_CONF_SOURCE $INFRA_MANAGER_CONF_LINK_NAME
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash
# 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

INFRA_MANAGER_CONF_LINK_DIR="/etc/ambari-infra-manager"
INFRA_MANAGER_CONF_LINK_NAME="$INFRA_MANAGER_CONF_LINK_DIR/conf"
INFRA_MANAGER_LINK_NAME="/usr/bin/infra-manager"

rm -f $INFRA_MANAGER_LINK_NAME
rm -f $INFRA_MANAGER_CONF_LINK_NAME
rm -rf $INFRA_MANAGER_CONF_LINK_DIR
11 changes: 7 additions & 4 deletions ambari-infra/ambari-infra-manager/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,16 @@
<copy todir="target/package/libs" includeEmptyDirs="no">
<fileset file="target/*.jar"/>
</copy>
<copy todir="target/package" includeEmptyDirs="no">
<fileset file="src/main/resources/infraManager.sh"/>
<copy todir="target/package/conf" includeEmptyDirs="no">
<fileset file="src/main/resources/infra-manager-env.sh"/>
<fileset file="target/classes/infra-manager.properties"/>
<fileset file="target/classes/log4j.xml"/>
<fileset file="target/classes/log4j2.xml"/>
</copy>
<copy todir="target/package/bin" includeEmptyDirs="no">
<fileset file="src/main/resources/infraManager.sh"/>
</copy>
<chmod file="target/package/*.sh" perm="755"/>
<chmod file="target/package/conf/infra-manager-env.sh" perm="755"/>
<chmod file="target/package/bin/infraManager.sh" perm="755"/>
<tar compression="gzip" destfile="target/ambari-infra-manager.tar.gz">
<tarfileset mode="755" dir="target/package">
<include name="*.sh"/>
Expand Down
10 changes: 0 additions & 10 deletions ambari-infra/ambari-infra-manager/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<classifier>exec</classifier>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
public class InfraManager {

public static void main(String[] args) {
String pidFile = System.getenv("PID_FILE") == null ? "infra-manager.pid" : System.getenv("PID_FILE");
String pidFile = System.getenv("INFRA_MANAGER_PID_FILE") == null ? "infra-manager.pid" : System.getenv("INFRA_MANAGER_PID_FILE");
new SpringApplicationBuilder(InfraManager.class)
.bannerMode(Banner.Mode.OFF)
.listeners(new ApplicationPidFileWriter(pidFile))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,26 @@
# limitations under the License.

# Extend with java options or system properties. e.g.: INFRA_MANAGER_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=5007,server=y,suspend=n"
export INFRA_MANAGER_OPTS=""
export INFRA_MANAGER_OPTS=""

# Log Search debug options
# export INFRA_MANAGER_DEBUG=true
# exoprt INFRA_MANAGER_DEBUG_SUSPEND=n
export INFRA_MANAGER_DEBUG_PORT=5005

# Log Search memory
# export INFRA_MANAGER_JAVA_MEM="--Xmx1024m"

# export LOG_PATH=/var/log/ambari-logsearch-logfeeder/
# export LOG_FILE=logsearch.log

# Pid file of the application
# export INFRA_MANAGER_PID_DIR=/var/run/ambari-infra-manager
# export INFRA_MANAGER_PID_FILE=infra-manager.pid

# SSL settings"
# export INFRA_MANAGER_SSL="true"
# export INFRA_MANAGER_KEYSTORE_LOCATION="/my/path/keystore.jks"
# export INFRA_MANAGER_KEYSTORE_TYPE="jks"
# export INFRA_MANAGER_TRUSTSTORE_LOCATION="/my/path/trutstore.jks"
# export INFRA_MANAGER_TRUSTSTORE_TYPE="jks"
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ infra-manager.jobs.solr_data_export.archive_audit_logs.solr.sort_column[1]=id
infra-manager.jobs.solr_data_export.archive_audit_logs.solr.delete_query_text=logtime:[${start.logtime} TO ${end.logtime}} OR (logtime:${end.logtime} AND id:[* TO ${end.id}])
infra-manager.jobs.solr_data_export.archive_audit_logs.read_block_size=100
infra-manager.jobs.solr_data_export.archive_audit_logs.write_block_size=150
infra-manager.jobs.solr_data_export.archive_audit_logs.destination=S3
infra-manager.jobs.solr_data_export.archive_audit_logs.destination=HDFS
# TODO: logtime may not be enough: The same filename can be generated when more than write_block_size count docs has the same logtime value
infra-manager.jobs.solr_data_export.archive_audit_logs.file_name_suffix_column=logtime
infra-manager.jobs.solr_data_export.archive_audit_logs.file_name_suffix_date_format=yyyy-MM-dd'T'HH-mm-ss.SSSX
Expand Down
Loading