Skip to content
Permalink
Browse files
AMBARI-24980 - Infra Manager: java 11 support (#21)
  • Loading branch information
kasakrisz authored and oleewere committed Dec 3, 2018
1 parent 07a56bc commit 5ba73da90ac1eb5e499c36a92ba89acfaa58a596
Showing 7 changed files with 39 additions and 16 deletions.
@@ -33,7 +33,7 @@

<properties>
<jbehave.version>4.0.5</jbehave.version>
<failsafePlugin.version>2.20</failsafePlugin.version>
<failsafePlugin.version>3.0.0-M1</failsafePlugin.version>
<infraManager.docker.host>localhost</infraManager.docker.host>
<stories.location>NONE</stories.location>
<okhttp.version>2.7.5</okhttp.version>
@@ -196,6 +196,11 @@
<artifactId>logging-interceptor</artifactId>
<version>${okhttp.version}</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>

<build>
@@ -22,10 +22,11 @@ RUN yum -y install glibc-common
ENV HOME /root

#Install JAVA
ENV JAVA_VERSION 8u131
ENV BUILD_VERSION b11
RUN wget --no-check-certificate --no-cookies --header "Cookie:oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION-$BUILD_VERSION/d54c1d3a095b4ff2b6607d096fa80163/jdk-$JAVA_VERSION-linux-x64.rpm -O jdk-8-linux-x64.rpm
RUN rpm -ivh jdk-8-linux-x64.rpm
ENV JAVA_VERSION 11.0.1
ENV BUILD_VERSION 13

RUN wget --no-check-certificate --no-cookies --header "Cookie:oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/$JAVA_VERSION+$BUILD_VERSION/90cf5d8f270a4347a95050320eef3fb7/jdk-${JAVA_VERSION}_linux-x64_bin.rpm -O jdk-11-linux-x64.rpm
RUN rpm -ivh jdk-11-linux-x64.rpm
ENV JAVA_HOME /usr/java/default/

#Install Maven
@@ -86,7 +86,7 @@ services:
networks:
- infra-network
inframanager:
container_name: inframanager
container_name: infra_manager
image: ambari-infra-manager:v1.0
restart: always
hostname: infra-manager.apache.org
@@ -98,8 +98,8 @@ services:
- 61890:61890
- 5007:5007
environment:
COMPONENT: infra-manager
COMPONENT_LOG: infra-manager
COMPONENT: infra_manager
COMPONENT_LOG: infra_manager
ZK_CONNECT_STRING: ${ZOOKEEPER_CONNECTION_STRING}
DISPLAY: $DOCKERIP:0
volumes:
@@ -41,10 +41,10 @@ function start_infra_manager_container() {
local AMBARI_INFRA_MANAGER_LOCATION=$(pwd)
popd
kill_infra_manager_container
docker run -d --name infra-manager --hostname infra-manager.apache.org \
docker run -d --name infra_manager --hostname infra-manager.apache.org \
-v $AMBARI_INFRA_MANAGER_LOCATION/target/package:/root/ambari-infra-manager -p 61890:61890 -p 5007:5007 \
ambari-infra-manager:v1.0
ip_address=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' logsearch)
ip_address=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' infra_manager)
echo "Ambari Infra Manager container started on $ip_address (for Mac OSX route to boot2docker/docker-machine VM address, e.g.: 'sudo route add -net 172.17.0.0/16 192.168.59.103')"
echo "You can follow Log Search logs with 'docker logs -f infra-manager' command"
}
@@ -570,6 +570,12 @@
<artifactId>commons-compress</artifactId>
<version>1.18</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
</dependency>

</dependencies>

</project>
@@ -25,12 +25,12 @@ export INFRA_MANAGER_DEBUG_PORT=5005
# Infra Manager memory
# export INFRA_MANAGER_JAVA_MEM="--Xmx1024m"

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

# Pid file of the application
# export INFRA_MANAGER_PID_DIR=/var/run/ambari-infra-manager
# export INFRA_MANAGER_PID_FILE=infra-manager.pid
#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"
@@ -72,7 +72,13 @@ else
INFRA_MANAGER_GC_LOGFILE="$LOG_PATH_WITHOUT_SLASH/$INFRA_MANAGER_GC_LOGFILE"
fi

INFRA_MANAGER_GC_OPTS="-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$INFRA_MANAGER_GC_LOGFILE"
java_version=$($JVM -version 2>&1 | grep 'version' | cut -d'"' -f2 | cut -d'.' -f2)
if [ $java_version == "8" ]; then
INFRA_MANAGER_GC_OPTS="-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$INFRA_MANAGER_GC_LOGFILE"
else
INFRA_MANAGER_GC_OPTS="-Xlog:gc*:file=$INFRA_MANAGER_GC_LOGFILE:time"
fi


function print_usage() {
cat << EOF
@@ -138,7 +144,12 @@ function start() {
INFRA_MANAGER_DEBUG_PORT=${INFRA_MANAGER_DEBUG_PORT:-"5005"}

if [ "$INFRA_MANAGER_DEBUG" = "true" ]; then
INFRA_MANAGER_JAVA_OPTS="$INFRA_MANAGER_JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=$INFRA_MANAGER_DEBUG_PORT,server=y,suspend=$INFRA_MANAGER_DEBUG_SUSPEND "
if [ $java_version == "8" ]; then
INFRA_MANAGER_DEBUG_ADDRESS=$INFRA_MANAGER_DEBUG_PORT
else
INFRA_MANAGER_DEBUG_ADDRESS="*:$INFRA_MANAGER_DEBUG_PORT"
fi
INFRA_MANAGER_JAVA_OPTS="$INFRA_MANAGER_JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=$INFRA_MANAGER_DEBUG_ADDRESS,server=y,suspend=$INFRA_MANAGER_DEBUG_SUSPEND "
fi

if [ "$INFRA_MANAGER_SSL" = "true" ]; then

0 comments on commit 5ba73da

Please sign in to comment.