Browse Source

Merge branch 'trunk' into branch-feature-AMBARI-20859

Robert Levas 8 years ago
parent
commit
84434f9de9
28 changed files with 507 additions and 95 deletions
  1. 26 3
      ambari-admin/src/main/resources/ui/admin-web/app/styles/cluster-information.css
  2. 4 4
      ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/clusterInformation.html
  3. 2 0
      ambari-common/src/main/python/ambari_commons/os_check.py
  4. 6 37
      ambari-infra/ambari-infra-assembly/pom.xml
  5. 8 1
      ambari-infra/ambari-infra-assembly/src/main/package/deb/manager/postinst
  6. 8 0
      ambari-infra/ambari-infra-assembly/src/main/package/deb/manager/postrm
  7. 9 2
      ambari-infra/ambari-infra-assembly/src/main/package/rpm/manager/postinstall.sh
  8. 23 0
      ambari-infra/ambari-infra-assembly/src/main/package/rpm/manager/postremove.sh
  9. 7 4
      ambari-infra/ambari-infra-manager/build.xml
  10. 0 10
      ambari-infra/ambari-infra-manager/pom.xml
  11. 1 1
      ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java
  12. 23 1
      ambari-infra/ambari-infra-manager/src/main/resources/infra-manager-env.sh
  13. 1 1
      ambari-infra/ambari-infra-manager/src/main/resources/infra-manager.properties
  14. 252 8
      ambari-infra/ambari-infra-manager/src/main/resources/infraManager.sh
  15. 4 1
      ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/logfeeder/postinstall.sh
  16. 4 2
      ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/logfeeder/postremove.sh
  17. 4 1
      ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/portal/postinstall.sh
  18. 4 2
      ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/portal/postremove.sh
  19. 3 1
      ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
  20. 4 4
      ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java
  21. 17 9
      ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
  22. 5 0
      ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java
  23. 3 1
      ambari-server/src/test/resources/ambari.properties
  24. 28 0
      ambari-web/app/assets/img/install-box.svg
  25. 1 1
      ambari-web/app/templates/common/configs/service_config.hbs
  26. 1 1
      ambari-web/app/views/common/configs/service_configs_by_category_view.js
  27. 58 0
      dev-support/build-ambari.sh
  28. 1 0
      pom.xml

+ 26 - 3
ambari-admin/src/main/resources/ui/admin-web/app/styles/cluster-information.css

@@ -52,7 +52,30 @@
   padding: 30px;
 }
 
-#cluster-information .fa-cloud {
-  font-size: 150px;
-  color: #f0f0f0;
+#cluster-information .install-button {
+  height: 40px;
+}
+
+#cluster-information .install-button a {
+  height: 100%;
+  padding: 0;
+  width: 225px;
+  font-size: 16px;
+  line-height: 40px;
+}
+
+@keyframes INSTALL-BOX-ROTATE {
+  0% {transform: rotate(0deg)}
+  12.5% {transform: rotate(-30deg)}
+  37.5% {transform: rotate(30deg)}
+  62.5% {transform: rotate(-30deg)}
+  87.5% {transform: rotate(30deg)}
+  100% {transform: rotate(0deg)}
+}
+
+#cluster-information #install-box {
+  animation: INSTALL-BOX-ROTATE 2s;
+  width: 116px;
+  margin-bottom: 20px;
+  margin-top: 40px;
 }

+ 4 - 4
ambari-admin/src/main/resources/ui/admin-web/app/views/clusters/clusterInformation.html

@@ -20,17 +20,17 @@
   <div ng-show="cluster.Clusters.provisioning_state !== 'INSTALLED'">
     <div class="welcome-header">
       <h1>{{'main.title' | translate}}</h1>
-      <span>{{'main.noClusterDescription' | translate}}</span>
+      <span class="help-block">{{'main.noClusterDescription' | translate}}</span>
     </div>
     <div class="create-cluster-section">
       <h2>{{'main.createCluster.title' | translate}}</h2>
       <div>
-        <span>
+        <span class="help-block">
           {{'main.createCluster.description' | translate}}
         </span>
       </div>
-      <div><i class="fa fa-cloud" aria-hidden="true"></i></div>
-      <div>
+      <div><img id="install-box" src="/img/install-box.svg"></div>
+      <div class="install-button">
         <a href="{{fromSiteRoot('/#/installer/step0')}}" class="btn btn-primary">
           {{'main.createCluster.launchInstallWizard' | translate}}
         </a>

+ 2 - 0
ambari-common/src/main/python/ambari_commons/os_check.py

@@ -164,6 +164,8 @@ class OS_CONST_TYPE(type):
 class OSConst:
   __metaclass__ = OS_CONST_TYPE
 
+  systemd_redhat_os_major_versions = ["7"]
+
 
 class OSCheck:
 

+ 6 - 37
ambari-infra/ambari-infra-assembly/pom.xml

@@ -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>
@@ -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>
@@ -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>
@@ -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>

+ 8 - 1
ambari-infra/ambari-infra-assembly/src/main/package/deb/manager/postinst

@@ -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

+ 8 - 0
ambari-infra/ambari-infra-assembly/src/main/package/deb/manager/postrm

@@ -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

+ 9 - 2
ambari-infra/ambari-infra-assembly/src/main/package/rpm/manager/postinstall.sh

@@ -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

+ 23 - 0
ambari-infra/ambari-infra-assembly/src/main/package/rpm/manager/postremove.sh

@@ -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

+ 7 - 4
ambari-infra/ambari-infra-manager/build.xml

@@ -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"/>

+ 0 - 10
ambari-infra/ambari-infra-manager/pom.xml

@@ -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>

+ 1 - 1
ambari-infra/ambari-infra-manager/src/main/java/org/apache/ambari/infra/InfraManager.java

@@ -41,7 +41,7 @@ import org.springframework.boot.system.ApplicationPidFileWriter;
 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))

+ 23 - 1
ambari-infra/ambari-infra-manager/src/main/resources/infra-manager-env.sh

@@ -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"

+ 1 - 1
ambari-infra/ambari-infra-manager/src/main/resources/infra-manager.properties

@@ -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

+ 252 - 8
ambari-infra/ambari-infra-manager/src/main/resources/infraManager.sh

@@ -14,15 +14,259 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-: ${JAVA_HOME:?"Please set the JAVA_HOME variable!"}
-
 JVM="java"
-sdir="`dirname \"$0\"`"
-ldir="`dirname "$(readlink -f "$0")"`"
 
-DIR="$sdir"
-if [ "$sdir" != "$ldir" ]; then
-  DIR="$ldir"
+if [ -x $JAVA_HOME/bin/java ]; then
+  JVM=$JAVA_HOME/bin/java
+fi
+
+if [ "$INFRA_MANAGER_JAVA_MEM" = "" ]; then
+    INFRA_MANAGER_JAVA_MEM="-Xmx1g"
+fi
+
+readlinkf(){
+  # get real path on mac OSX
+  perl -MCwd -e 'print Cwd::abs_path shift' "$1";
+}
+
+if [ "$(uname -s)" = 'Linux' ]; then
+  SCRIPT_DIR="`dirname "$(readlink -f "$0")"`"
+else
+  SCRIPT_DIR="`dirname "$(readlinkf "$0")"`"
+fi
+
+INFRA_MANAGER_ROOT_DIR="`dirname \"$SCRIPT_DIR\"`"
+INFRA_MANAGER_LIBS_DIR="$INFRA_MANAGER_ROOT_DIR/libs"
+
+if [ "$INFRA_MANAGER_CONF_DIR" = "" ]; then
+  if [ -d "$INFRA_MANAGER_ROOT_DIR/conf" ]; then
+    INFRA_MANAGER_CONF_DIR="$INFRA_MANAGER_ROOT_DIR/conf"
+  fi
+fi
+
+if [ -f "$INFRA_MANAGER_CONF_DIR/infra-manager-env.sh" ]; then
+  source $INFRA_MANAGER_CONF_DIR/infra-manager-env.sh
+fi
+
+if [ ! -z "$INFRA_MANAGER_SOLR_CLIENT_SSL_INCLUDE" ]; then
+  source $INFRA_MANAGER_SOLR_CLIENT_SSL_INCLUDE
+fi
+
+if [ -z "$INFRA_MANAGER_PID_FILE" ]; then
+  INFRA_MANAGER_PID_DIR=$HOME
+  export INFRA_MANAGER_PID_FILE=$INFRA_MANAGER_PID_DIR/infra-manager.pid
+fi
+
+if [ -z "$LOG_FILE" ]; then
+  export LOG_FILE="infra-manager.log"
+fi
+
+INFRA_MANAGER_GC_LOGFILE="infra-manager-gc.log"
+
+if [ -z "$LOG_PATH" ]; then
+  LOG_FILE="$HOME/$LOG_FILE"
+  INFRA_MANAGER_GC_LOGFILE="$HOME/$INFRA_MANAGER_GC_LOGFILE"
+else
+  LOG_PATH_WITHOUT_SLASH=${LOG_PATH%/}
+  LOG_FILE="$LOG_PATH_WITHOUT_SLASH/$LOG_FILE"
+  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"
+
+function print_usage() {
+  cat << EOF
+
+   Usage: [<command>] [<arguments with flags>]
+
+   commands:
+     start                         Start Infra Manager
+     stop                          Stop Infra Manager
+     status                        Check Infra Manager is running or not (pid file)
+     help                          Print usage
+
+
+   start command arguments:
+     -d, --debug                   Start java process in debug mode
+     -f, --foreground              Start java process in foreground
+
+EOF
+}
+
+function spinner() {
+  local pid=$1
+  local delay=0.5
+  local spinstr='|/-\'
+  while [ "$(ps aux | awk '{print $2}' | grep -w $pid)" ]; do
+      local temp=${spinstr#?}
+      printf " [%c]  " "$spinstr"
+      local spinstr=$temp${spinstr%"$temp"}
+      sleep $delay
+      printf "\b\b\b\b\b\b"
+  done
+  printf "    \b\b\b\b"
+}
+
+function status() {
+  echo "Checking Infra Manager status ..." >&2
+  if [ -f "$INFRA_MANAGER_PID_FILE" ]; then
+    INFRA_MANAGER_PID=`cat "$INFRA_MANAGER_PID_FILE"`
+  else
+    echo "Infra Manager pid not exists. (probably the process is not running)" >&2
+    return 1
+  fi
+
+  if ps -p $INFRA_MANAGER_PID > /dev/null
+   then
+   echo "Infra Manager process is running. (pid: $INFRA_MANAGER_PID)" >&2
+   return 0
+  else
+   echo "Infra Manager process is not running." >&2
+   return 1
+  fi
+}
+
+function start() {
+  exit_status=$(status; echo $?)
+  if [ "$exit_status" = "0" ]; then
+    echo "Skipping start process."
+    exit 0
+  fi
+
+  FG="false"
+  INFRA_MANAGER_DEBUG_SUSPEND=${INFRA_MANAGER_DEBUG_SUSPEND:-n}
+  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 "
+  fi
+
+  if [ "$INFRA_MANAGER_SSL" = "true" ]; then
+    INFRA_MANAGER_JAVA_OPTS="$INFRA_MANAGER_JAVA_OPTS -Djavax.net.ssl.keyStore=$INFRA_MANAGER_KEYSTORE_LOCATION -Djavax.net.ssl.keyStoreType=$INFRA_MANAGER_KEYSTORE_TYPE -Djavax.net.ssl.trustStore=$INFRA_MANAGER_TRUSTSTORE_LOCATION -Djavax.net.ssl.trustStoreType=$INFRA_MANAGER_TRUSTSTORE_TYPE"
+  fi
+
+  if [ "$INFRA_MANAGER_JMX" = "true" ]; then
+   INFRA_MANAGER_JAVA_OPTS="$INFRA_MANAGER_JAVA_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=2099"
+  fi
+
+  if [ $# -gt 0 ]; then
+    while true; do
+      case "$1" in
+          -f|--foreground)
+              FG="true"
+              shift
+          ;;
+          -d|--debug)
+              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 "
+              fi
+              shift
+          ;;
+          *)
+              if [ "${1:0:2}" == "-D" ]; then
+                # pass thru any opts that begin with -D (java system props)
+                INFRA_MANAGER_JAVA_OPTS+=("$1")
+                echo "$INFRA_MANAGER_JAVA_OPTS"
+                shift
+              else
+                if [ "$1" != "" ]; then
+                  print_usage
+                  exit 1
+                else
+                  break
+                fi
+              fi
+          ;;
+      esac
+    done
+  fi
+
+  if [ $FG == "true" ]; then
+    echo "Starting Infra Manager... (foreground) pid_file=$INFRA_MANAGER_PID_FILE"
+    echo "Run command $JVM -cp '$INFRA_MANAGER_CONF_DIR:$INFRA_MANAGER_LIBS_DIR/*' $INFRA_MANAGER_GC_OPTS $INFRA_MANAGER_JAVA_OPTS $INFRA_MANAGER_JAVA_MEM org.apache.ambari.infra.InfraManager"
+    $JVM -cp "$INFRA_MANAGER_CONF_DIR:$INFRA_MANAGER_LIBS_DIR/*" $INFRA_MANAGER_GC_OPTS $INFRA_MANAGER_JAVA_OPTS $INFRA_MANAGER_JAVA_MEM org.apache.ambari.infra.InfraManager
+  else
+   echo "Starting Infra Manager... Output file=$LOG_FILE pid_file=$INFRA_MANAGER_PID_FILE"
+   echo "Run command nohup $JVM -cp '$INFRA_MANAGER_CONF_DIR:$INFRA_MANAGER_LIBS_DIR/*' $INFRA_MANAGER_GC_OPTS $INFRA_MANAGER_JAVA_OPTS $INFRA_MANAGER_JAVA_MEM org.apache.ambari.infra.InfraManager"
+   nohup $JVM -cp "$INFRA_MANAGER_CONF_DIR:$INFRA_MANAGER_LIBS_DIR/*" $INFRA_MANAGER_GC_OPTS $INFRA_MANAGER_JAVA_OPTS $INFRA_MANAGER_JAVA_MEM org.apache.ambari.infra.InfraManager > $LOG_FILE 2>&1 &
+  fi
+}
+
+function stop() {
+  INFRA_MANAGER_STOP_WAIT=3
+  if [ -f "$INFRA_MANAGER_PID_FILE" ]; then
+    INFRA_MANAGER_PID=`cat "$INFRA_MANAGER_PID_FILE"`
+  fi
+
+  if [ "$INFRA_MANAGER_PID" != "" ]; then
+    echo -e "Sending stop command to Infra Manager... Checking PID: $INFRA_MANAGER_PID."
+    kill $INFRA_MANAGER_PID
+      (loops=0
+      while true
+      do
+        CHECK_PID=`ps auxww | awk '{print $2}' | grep -w $INFRA_MANAGER_PID | sort -r | tr -d ' '`
+        if [ "$CHECK_PID" != "" ]; then
+          slept=$((loops * 2))
+          if [ $slept -lt $INFRA_MANAGER_STOP_WAIT ]; then
+            sleep 2
+            loops=$[$loops+1]
+          else
+            exit # subshell!
+          fi
+        else
+          exit # subshell!
+        fi
+      done) &
+    spinner $!
+    rm -f "$INFRA_MANAGER_PID_FILE"
+  else
+    echo -e "No Infra Manager process found to stop."
+    exit 0
+  fi
+
+  CHECK_PID=`ps auxww | awk '{print $2}' | grep -w $INFRA_MANAGER_PID | sort -r | tr -d ' '`
+  if [ "$CHECK_PID" != "" ]; then
+    echo -e "Infra Manager process $INFRA_MANAGER_PID is still running; forcefully killing it now."
+    kill -9 $INFRA_MANAGER_PID
+    echo "Killed process $INFRA_MANAGER_PID"
+    rm -f "$INFRA_MANAGER_PID_FILE"
+    sleep 1
+  else
+    echo "Infra Manager is stopped."
+  fi
+
+  CHECK_PID=`ps auxww | awk '{print $2}' | grep -w $INFRA_MANAGER_PID | sort -r | tr -d ' '`
+  if [ "$CHECK_PID" != "" ]; then
+    echo "ERROR: Failed to kill Infra Manager Java process $INFRA_MANAGER_PID ... script fails."
+    exit 1
+  fi
+}
+
+if [ $# -gt 0 ]; then
+    SCRIPT_CMD="$1"
+    shift
+else
+   print_usage
+   exit 1
 fi
 
-PATH=$JAVA_HOME/bin:$PATH nohup $JVM -classpath "/etc/ambari-infra-manager/conf:$DIR:$DIR/libs/*" $INFRA_MANAGER_OPTS org.apache.ambari.infra.InfraManager ${1+"$@"} &
+case $SCRIPT_CMD in
+  start)
+    start ${1+"$@"}
+  ;;
+  stop)
+    stop
+  ;;
+  status)
+    status
+  ;;
+  help)
+    print_usage
+    exit 0
+  ;;
+  *)
+    print_usage
+    exit 1
+  ;;
+
+esac

+ 4 - 1
ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/logfeeder/postinstall.sh

@@ -17,9 +17,12 @@
 LOGFEEDER_SCRIPT_LINK_NAME="/usr/bin/logfeeder"
 LOGFEEDER_SCRIPT_SOURCE="/usr/lib/ambari-logsearch-logfeeder/bin/logfeeder.sh"
 
-LOGFEEDER_CONF_LINK="/etc/ambari-logsearch-logfeeder/conf"
+LOGFEEDER_ETC_FOLDER="/etc/ambari-logsearch-logfeeder"
+LOGFEEDER_CONF_LINK="$LOGFEEDER_ETC_FOLDER/conf"
 LOGFEEDER_CONF_SOURCE="/usr/lib/ambari-logsearch-logfeeder/conf"
 
+mkdir -p $LOGFEEDER_ETC_FOLDER
+
 ln -s $LOGFEEDER_SCRIPT_SOURCE $LOGFEEDER_SCRIPT_LINK_NAME
 ln -s $LOGFEEDER_CONF_SOURCE $LOGFEEDER_CONF_LINK
 

+ 4 - 2
ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/logfeeder/postremove.sh

@@ -15,7 +15,9 @@
 # limitations under the License
 
 LOGFEEDER_SCRIPT_LINK_NAME="/usr/bin/logfeeder"
-LOGFEEDER_CONF_DIR_LINK="/etc/ambari-logsearch-logfeeder/conf"
+LOGFEEDER_ETC_FOLDER="/etc/ambari-logsearch-logfeeder"
+LOGFEEDER_CONF_DIR_LINK="$LOGFEEDER_ETC_FOLDER/conf"
 
 rm -f $LOGFEEDER_SCRIPT_LINK_NAME
-rm -f $LOGFEEDER_CONF_DIR_LINK
+rm -f $LOGFEEDER_CONF_DIR_LINK
+rm -f $LOGFEEDER_ETC_FOLDER

+ 4 - 1
ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/portal/postinstall.sh

@@ -17,9 +17,12 @@
 LOGSEARCH_SCRIPT_LINK_NAME="/usr/bin/logsearch"
 LOGSEARCH_SCRIPT_SOURCE="/usr/lib/ambari-logsearch-portal/bin/logsearch.sh"
 
-LOGSEARCH_CONF_LINK="/etc/ambari-logsearch-portal/conf"
+LOGSEARCH_ETC_FOLDER="/etc/ambari-logsearch-portal"
+LOGSEARCH_CONF_LINK="$LOGSEARCH_ETC_FOLDER/conf"
 LOGSEARCH_CONF_SOURCE="/usr/lib/ambari-logsearch-portal/conf"
 
+mkdir -p $LOGSEARCH_ETC_FOLDER
+
 ln -s $LOGSEARCH_SCRIPT_SOURCE $LOGSEARCH_SCRIPT_LINK_NAME
 ln -s $LOGSEARCH_CONF_SOURCE $LOGSEARCH_CONF_LINK
 

+ 4 - 2
ambari-logsearch/ambari-logsearch-assembly/src/main/package/rpm/portal/postremove.sh

@@ -15,7 +15,9 @@
 # limitations under the License
 
 LOGSEARCH_SCRIPT_LINK_NAME="/usr/bin/logsearch"
-LOGSEARCH_CONF_DIR_LINK="/etc/ambari-logsearch-portal/conf"
+LOGSEARCH_ETC_FOLDER="/etc/ambari-logsearch-portal"
+LOGSEARCH_CONF_DIR_LINK="$LOGSEARCH_ETC_FOLDER/conf"
 
 rm -f $LOGSEARCH_SCRIPT_LINK_NAME
-rm -f $LOGSEARCH_CONF_DIR_LINK
+rm -f $LOGSEARCH_CONF_DIR_LINK
+rm -f $LOGSEARCH_ETC_FOLDER

+ 3 - 1
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java

@@ -24,6 +24,7 @@ import java.io.FileReader;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.Writer;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
@@ -90,6 +91,7 @@ import org.apache.commons.lang.math.NumberUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.base.Charsets;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.Sets;
 import com.google.gson.Gson;
@@ -2891,7 +2893,7 @@ public class Configuration {
 
     // load the properties
     try {
-      properties.load(inputStream);
+      properties.load(new InputStreamReader(inputStream, Charsets.UTF_8));
       inputStream.close();
     } catch (FileNotFoundException fnf) {
       LOG.info("No configuration file " + CONFIG_FILE + " found in classpath.", fnf);

+ 4 - 4
ambari-server/src/main/java/org/apache/ambari/server/state/services/MetricsRetrievalService.java

@@ -59,7 +59,7 @@ import com.google.inject.Inject;
  * The {@link MetricsRetrievalService} is used as a headless, autonomous service
  * which encapsulates:
  * <ul>
- * <li>An {@link ExecutorService} for fullfilling remote metric URL requests
+ * <li>An {@link ExecutorService} for fulfilling remote metric URL requests
  * <li>A cache for JMX metrics
  * <li>A cache for REST metrics
  * </ul>
@@ -270,7 +270,7 @@ public class MetricsRetrievalService extends AbstractService {
    * {@link #getCachedRESTMetric(String)}, depending on the type of metric
    * requested.
    * <p/>
-   * Callers need not worry about invoking this mulitple times for the same URL
+   * Callers need not worry about invoking this multiple times for the same URL
    * endpoint. A single endpoint will only be enqueued once regardless of how
    * many times this method is called until it has been fully retrieved and
    * parsed. If the last endpoint request was too recent, then this method will
@@ -349,7 +349,7 @@ public class MetricsRetrievalService extends AbstractService {
    * Gets a cached REST metric in the form of a {@link Map}. If there is no
    * metric data cached for the given URL, then {@code null} is returned.
    * <p/>
-   * The onky way this cache is populated is by requesting the data to be loaded
+   * The only way this cache is populated is by requesting the data to be loaded
    * asynchronously via
    * {@link #submitRequest(MetricSourceType, StreamProvider, String)} with the
    * {@link MetricSourceType#REST} type.
@@ -363,7 +363,7 @@ public class MetricsRetrievalService extends AbstractService {
   }
 
   /**
-   * Encapsulates the common logic for all metric {@link Runnable} instnaces.
+   * Encapsulates the common logic for all metric {@link Runnable} instances.
    */
   private static abstract class MetricRunnable implements Runnable {
 

+ 17 - 9
ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py

@@ -355,19 +355,27 @@ class PGConfig(LinuxDBMSConfig):
   PG_ERROR_BLOCKED = "is being accessed by other users"
   PG_STATUS_RUNNING = None
   PG_STATUS_STOPPED = "stopped"
-  SERVICE_CMD = "/usr/bin/env service"
   PG_SERVICE_NAME = "postgresql"
   PG_HBA_DIR = None
 
-  PG_ST_CMD = "%s %s status" % (SERVICE_CMD, PG_SERVICE_NAME)
-  if os.path.isfile("/usr/bin/postgresql-setup"):
-      PG_INITDB_CMD = "/usr/bin/postgresql-setup initdb"
+  if OSCheck.is_redhat_family() and OSCheck.get_os_major_version() in OSConst.systemd_redhat_os_major_versions:
+    SERVICE_CMD = "/usr/bin/env systemctl"
+    PG_ST_CMD = "%s status %s" % (SERVICE_CMD, PG_SERVICE_NAME)
+    PG_INITDB_CMD = "/usr/bin/postgresql-setup initdb"
+    PG_START_CMD = AMBARI_SUDO_BINARY + " %s start %s" % (SERVICE_CMD, PG_SERVICE_NAME)
+    PG_RESTART_CMD = AMBARI_SUDO_BINARY + " %s restart %s" % (SERVICE_CMD, PG_SERVICE_NAME)
+    PG_HBA_RELOAD_CMD = AMBARI_SUDO_BINARY + " %s reload %s" % (SERVICE_CMD, PG_SERVICE_NAME)
   else:
-      PG_INITDB_CMD = "%s %s initdb" % (SERVICE_CMD, PG_SERVICE_NAME)
+    SERVICE_CMD = "/usr/bin/env service"
+    PG_ST_CMD = "%s %s status" % (SERVICE_CMD, PG_SERVICE_NAME)
+    if os.path.isfile("/usr/bin/postgresql-setup"):
+        PG_INITDB_CMD = "/usr/bin/postgresql-setup initdb"
+    else:
+        PG_INITDB_CMD = "%s %s initdb" % (SERVICE_CMD, PG_SERVICE_NAME)
 
-  PG_START_CMD = AMBARI_SUDO_BINARY + " %s %s start" % (SERVICE_CMD, PG_SERVICE_NAME)
-  PG_RESTART_CMD = AMBARI_SUDO_BINARY + " %s %s restart" % (SERVICE_CMD, PG_SERVICE_NAME)
-  PG_HBA_RELOAD_CMD = AMBARI_SUDO_BINARY + " %s %s reload" % (SERVICE_CMD, PG_SERVICE_NAME)
+    PG_START_CMD = AMBARI_SUDO_BINARY + " %s %s start" % (SERVICE_CMD, PG_SERVICE_NAME)
+    PG_RESTART_CMD = AMBARI_SUDO_BINARY + " %s %s restart" % (SERVICE_CMD, PG_SERVICE_NAME)
+    PG_HBA_RELOAD_CMD = AMBARI_SUDO_BINARY + " %s %s reload" % (SERVICE_CMD, PG_SERVICE_NAME)
 
   PG_HBA_CONF_FILE = None
   PG_HBA_CONF_FILE_BACKUP = None
@@ -611,7 +619,7 @@ class PGConfig(LinuxDBMSConfig):
     retcode, out, err = run_os_command(PGConfig.PG_ST_CMD)
     # on RHEL and SUSE PG_ST_COMD returns RC 0 for running and 3 for stoppped
     if retcode == 0:
-      if out.strip() == "Running clusters:":
+      if out.strip() == "Running clusters:" or "active: inactive" in out.lower():
         pg_status = PGConfig.PG_STATUS_STOPPED
       else:
         pg_status = PGConfig.PG_STATUS_RUNNING

+ 5 - 0
ambari-server/src/test/java/org/apache/ambari/server/configuration/ConfigurationTest.java

@@ -914,4 +914,9 @@ public class ConfigurationTest {
     Assert.assertEquals(1024, new Configuration(properties).getTlsEphemeralDhKeySize());
   }
 
+  @Test
+  public void canReadNonLatin1Properties() {
+    Assert.assertEquals("árvíztűrő tükörfúrógép", new Configuration().getProperty("encoding.test"));
+  }
+
 }

+ 3 - 1
ambari-server/src/test/resources/ambari.properties

@@ -14,4 +14,6 @@
 # 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.
+# limitations under the License.
+
+encoding.test=árvíztűrő tükörfúrógép

+ 28 - 0
ambari-web/app/assets/img/install-box.svg

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 92 71.6" style="enable-background:new 0 0 92 71.6;" xml:space="preserve">
+<style type="text/css">
+	.st0{fill:#666666;}
+	.st1{fill:#DDDDDD;}
+	.st2{fill:#CCCCCC;}
+</style>
+<g>
+	<path class="st1" d="M46.6,68.1c-0.6,0-1-0.4-1-1v-41l-30-11.7c-0.5-0.2-0.8-0.8-0.6-1.3c0.2-0.5,0.8-0.8,1.3-0.6l30.7,12
+		c0.4,0.1,0.6,0.5,0.6,0.9V67C47.6,67.6,47.2,68.1,46.6,68.1z"/>
+	<path class="st1" d="M46.6,68.1c-0.1,0-0.3,0-0.4-0.1L15.5,54.7c-0.4-0.2-0.6-0.5-0.6-0.9V38.5c0-0.6,0.4-1,1-1s1,0.4,1,1v14.6
+		L47,66.2c0.5,0.2,0.7,0.8,0.5,1.3C47.4,67.8,47,68.1,46.6,68.1z"/>
+	<path class="st1" d="M36.3,42.8c-0.1,0-0.3,0-0.4-0.1L5.2,29.4c-0.3-0.1-0.5-0.4-0.6-0.6c-0.1-0.3,0-0.6,0.1-0.8L15,13
+		c0.3-0.4,0.8-0.5,1.2-0.4l30.7,12c0.3,0.1,0.5,0.3,0.6,0.6s0.1,0.6-0.1,0.8L37.1,42.4C36.9,42.7,36.6,42.8,36.3,42.8z"/>
+	<path class="st1" d="M15.9,14.5c-0.4,0-0.8-0.3-0.9-0.7c-0.2-0.5,0.1-1.1,0.6-1.3l26.2-9.6c0.5-0.2,1.1,0.1,1.3,0.6
+		S43,4.6,42.5,4.8l-26.2,9.6C16.2,14.5,16,14.5,15.9,14.5z"/>
+	<path class="st1" d="M46.6,68.1c-0.6,0-1-0.4-1-1V25.5c0-0.4,0.3-0.8,0.6-0.9l30.7-12c0.5-0.2,1.1,0.1,1.3,0.6
+		c0.2,0.5-0.1,1.1-0.6,1.3l-30,11.6V67C47.6,67.6,47.2,68.1,46.6,68.1z"/>
+	<path class="st1" d="M46.6,68.1c-0.4,0-0.8-0.2-0.9-0.6c-0.2-0.5,0-1.1,0.5-1.3l30.1-13.1V38.5c0-0.6,0.4-1,1-1s1,0.4,1,1v15.2
+		c0,0.4-0.2,0.8-0.6,0.9L47,68C46.9,68,46.7,68.1,46.6,68.1z"/>
+	<path class="st1" d="M56.9,42.8c-0.3,0-0.7-0.2-0.8-0.5L45.8,26c-0.2-0.3-0.2-0.6-0.2-0.8c0.1-0.3,0.3-0.5,0.6-0.6l30.7-12
+		c0.4-0.2,0.9,0,1.2,0.4l10.3,15c0.2,0.2,0.2,0.6,0.1,0.8c-0.1,0.3-0.3,0.5-0.6,0.6L57.3,42.8C57.2,42.8,57.1,42.8,56.9,42.8z"/>
+	<path class="st1" d="M77.3,14.5c-0.1,0-0.2,0-0.3-0.1L48.8,4.8C48.3,4.6,48,4,48.2,3.5s0.7-0.8,1.3-0.6l28.1,9.6
+		c0.5,0.2,0.8,0.8,0.6,1.3C78.1,14.2,77.7,14.5,77.3,14.5z"/>
+</g>
+</svg>

+ 1 - 1
ambari-web/app/templates/common/configs/service_config.hbs

@@ -188,7 +188,7 @@
   {{view App.SpinnerView}}
 {{/if}}
 
-<div class="configs-save-panel" {{bindAttr class="view.showSavePanel::hidden"}}>
+<div {{bindAttr class="view.showSavePanel::hidden :configs-save-panel"}}>
   <div class="pull-right">
     <button class="btn btn-default" {{action doCancel target="controller"}}
       {{bindAttr disabled="view.isDiscardDisabled"}}>

+ 1 - 1
ambari-web/app/views/common/configs/service_configs_by_category_view.js

@@ -189,7 +189,7 @@ App.ServiceConfigsByCategoryView = Em.View.extend(App.Persist, App.ConfigOverrid
    */
   isShowBlock: function () {
     const isFilterEmpty = this.get('controller.filter') === '';
-    const isFilterActive = this.get('mainView.columns').someProperty('selected');
+    const isFilterActive = this.get('mainView.columns') && this.get('mainView.columns').someProperty('selected');
     const isCustomPropertiesCategory = this.get('category.customCanAddProperty');
     const isCompareMode = this.get('controller.isCompareMode');
     const hasFilteredAdvancedConfigs = this.get('categoryConfigs').filter(function (config) {

+ 58 - 0
dev-support/build-ambari.sh

@@ -0,0 +1,58 @@
+#!/usr/bin/env bash
+#   Licensed 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.
+
+
+# Clean up files from previous build to make sure there are no artifacts that would trigger rat failure.
+pushd .
+cd $WORKSPACE
+git clean -xdf
+popd
+
+# We stash node.js installation into this weird place
+# because on one hand we want it to be somewhere inside
+# the current workspace and on the other hand we don't
+# want RAT to be ran on files that comprise it. The following
+# location is excluded from RAT by default
+REPO_NAME=contrib/views/node.js/target
+
+[ -d "$REPO_NAME"  ] && exit 0
+
+rm -rf $REPO_NAME
+mkdir -p $REPO_NAME.tmp
+pushd $REPO_NAME.tmp
+  curl --retry 3 --retry-delay 5 -k http://nodejs.org/dist/v4.5.0/node-v4.5.0-linux-x64.tar.gz | tar xzvf -
+  mv node-v4.5.0-linux-x64/* .
+  rmdir node-v4.5.0-linux-x64
+popd
+mv $REPO_NAME.tmp $REPO_NAME
+
+export PATH=`pwd`/$REPO_NAME/bin:$PATH
+npm install -g brunch@1.7.20
+
+export _JAVA_OPTIONS="-Xmx2048m -Djava.awt.headless=true"
+export JAVA_HOME=/home/jenkins/tools/java/latest1.8
+export MAVEN_HOME=/home/jenkins/tools/maven/latest
+export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
+PATH=`pwd`/contrib/views/node.js/target/bin:$PATH
+echo "Checking Hudson Java"
+ls -l /home/hudson/tools/java
+echo "Checking Jenkins Java"
+ls -l /home/jenkins/tools/java
+which java
+java -version
+python -V
+uname -a
+
+cd $WORKSPACE
+$MAVEN_HOME/bin/mvn -fae clean install
+

+ 1 - 0
pom.xml

@@ -251,6 +251,7 @@
         <artifactId>apache-rat-plugin</artifactId>
         <configuration>
           <excludes>
+            <exclude>.github/</exclude>
             <exclude>**/repo_*.j2</exclude>
             <exclude>**/ambari-log4j.spec</exclude>
             <exclude>**/version.txt</exclude>