You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ol...@apache.org on 2016/04/09 12:15:27 UTC
[31/61] [abbrv] [partial] ambari git commit: AMBARI-15679. Initial
commit for LogSearch service definition (oleewre)
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/run.sh
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/run.sh b/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/run.sh
new file mode 100755
index 0000000..256b227
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/run.sh
@@ -0,0 +1,86 @@
+#!/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.
+
+curr_dir=`pwd`
+cd `dirname $0`; script_dir=`pwd`; cd $curr_dir
+
+if [ ! -z "$LOGSEARCH_INCLUDE" ]; then
+ source $LOGSEARCH_INCLUDE
+fi
+
+JAVA=java
+if [ -x $JAVA_HOME/bin/java ]; then
+ JAVA=$JAVA_HOME/bin/java
+fi
+
+if [ "$LOGSEARCH_JAVA_MEM" = "" ]; then
+ LOGSEARCH_JAVA_MEM="-Xmx1g"
+fi
+
+if [ "$LOGFILE" = "" ]; then
+ LOGFILE="/var/log/logsearch/logsearch.out"
+ touch $LOGFILE 2> /dev/null
+ if [ $? -ne 0 ]; then
+ LOGFILE=/tmp/${USER}_logsearch.out
+ fi
+fi
+
+
+#Temporarily enabling JMX so we can monitor the memory and CPU utilization of the process
+#JMX="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=3098"
+
+if [ "$LOGSEARCH_DEBUG" = "true" ] && [ ! -z "$LOGSEARCH_DEBUG_PORT" ]; then
+ LOGSEARCH_JAVA_OPTS="$LOGSEARCH_JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=$LOGSEARCH_DEBUG_PORT,server=y,suspend=n "
+fi
+
+if [ "$PID_FILE" = "" ]; then
+ LOGSEARCH_PID_DIR=$HOME
+ PID_FILE=$LOGSEARCH_PID_DIR/logsearch-search-$USER.pid
+fi
+
+if [ -f ${PID_FILE} ]; then
+ PID=`cat ${PID_FILE}`
+ if kill -0 $PID 2>/dev/null; then
+ echo "logsearch already running (${PID}) killing..."
+ kill $PID 2>/dev/null
+ sleep 5
+ if kill -0 $PID 2>/dev/null; then
+ echo "logsearch still running. Will kill process forcefully in another 10 seconds..."
+ sleep 10
+ kill -9 $PID 2>/dev/null
+ sleep 2
+ fi
+ fi
+
+ if kill -0 $PID 2>/dev/null; then
+ echo "ERROR: Even after all efforts to stop logsearch, it is still running. pid=$PID. Please manually kill the service and try again."
+ exit 1
+ fi
+fi
+
+if [ -z "$LOGSEARCH_CONF_DIR" ]; then
+ LOGSEARCH_CONF_DIR="/etc/logsearch/conf"
+ echo "LOGSEARCH_CONF_DIR not found. Use default: $LOGSEARCH_CONF_DIR"
+fi
+
+LOGSEARCH_GC_LOGFILE=`dirname $LOGFILE`/logsearch_gc.log
+LOGSEARCH_GC_OPTS="-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$LOGSEARCH_GC_LOGFILE"
+
+echo "Starting logsearch. Output file=$LOGFILE pid_file=$PID_FILE"
+#LOGSEARCH_CLI_CLASSPATH=
+#set -x
+nohup $JAVA -cp "$LOGSEARCH_CLI_CLASSPATH:$LOGSEARCH_CONF_DIR:$script_dir/libs/*:$script_dir/classes:$script_dir/LogProcessor.jar" $LOGSEARCH_GC_OPTS $LOGSEARCH_JAVA_MEM $LOGSEARCH_JAVA_OPTS $JMX org.apache.ambari.logsearch.LogSearch $* > $LOGFILE 2>&1 &
+echo $! > $PID_FILE
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/run.sh.j2
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/run.sh.j2 b/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/run.sh.j2
new file mode 100755
index 0000000..cb78c58
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/run.sh.j2
@@ -0,0 +1,86 @@
+#!/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.
+
+curr_dir=`pwd`
+cd `dirname $0`; script_dir=`pwd`; cd $curr_dir
+
+if [ ! -z "$LOGSEARCH_INCLUDE" ]; then
+ source $LOGSEARCH_INCLUDE
+fi
+
+JAVA=java
+if [ -x $JAVA_HOME/bin/java ]; then
+ JAVA=$JAVA_HOME/bin/java
+fi
+
+if [ "$LOGSEARCH_JAVA_MEM" = "" ]; then
+ LOGSEARCH_JAVA_MEM="-Xmx1g"
+fi
+
+if [ "$LOGFILE" = "" ]; then
+ LOGFILE="{{logsearch_log_dir}}/logsearch.out"
+ touch $LOGFILE 2> /dev/null
+ if [ $? -ne 0 ]; then
+ LOGFILE=/tmp/${USER}_logsearch.out
+ fi
+fi
+
+
+#Temporarily enabling JMX so we can monitor the memory and CPU utilization of the process
+#JMX="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=3098"
+
+if [ "$LOGSEARCH_DEBUG" = "true" ] && [ ! -z "$LOGSEARCH_DEBUG_PORT" ]; then
+ LOGSEARCH_JAVA_OPTS="$LOGSEARCH_JAVA_OPTS -Xdebug -Xrunjdwp:transport=dt_socket,address=$LOGSEARCH_DEBUG_PORT,server=y,suspend=n "
+fi
+
+if [ "$PID_FILE" = "" ]; then
+ LOGSEARCH_PID_DIR=$HOME
+ PID_FILE=$LOGSEARCH_PID_DIR/logsearch-search-$USER.pid
+fi
+
+if [ -f ${PID_FILE} ]; then
+ PID=`cat ${PID_FILE}`
+ if kill -0 $PID 2>/dev/null; then
+ echo "logsearch already running (${PID}) killing..."
+ kill $PID 2>/dev/null
+ sleep 5
+ if kill -0 $PID 2>/dev/null; then
+ echo "logsearch still running. Will kill process forcefully in another 10 seconds..."
+ sleep 10
+ kill -9 $PID 2>/dev/null
+ sleep 2
+ fi
+ fi
+
+ if kill -0 $PID 2>/dev/null; then
+ echo "ERROR: Even after all efforts to stop logsearch, it is still running. pid=$PID. Please manually kill the service and try again."
+ exit 1
+ fi
+fi
+
+if [ -z "$LOGSEARCH_CONF_DIR" ]; then
+ LOGSEARCH_CONF_DIR="/etc/logsearch/conf"
+ echo "LOGSEARCH_CONF_DIR not found. Use default: $LOGSEARCH_CONF_DIR"
+fi
+
+LOGSEARCH_GC_LOGFILE=`dirname $LOGFILE`/logsearch_gc.log
+LOGSEARCH_GC_OPTS="-XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$LOGSEARCH_GC_LOGFILE"
+
+echo "Starting logsearch. Output file=$LOGFILE pid_file=$PID_FILE"
+#LOGSEARCH_CLI_CLASSPATH=
+#set -x
+nohup $JAVA -cp "$LOGSEARCH_CLI_CLASSPATH:$LOGSEARCH_CONF_DIR:$script_dir/libs/*:$script_dir/classes:$script_dir/LogProcessor.jar" $LOGSEARCH_GC_OPTS $LOGSEARCH_JAVA_MEM $LOGSEARCH_JAVA_OPTS $JMX org.apache.ambari.logsearch.LogSearch $* > $LOGFILE 2>&1 &
+echo $! > $PID_FILE
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/stop.sh
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/stop.sh b/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/stop.sh
new file mode 100755
index 0000000..3612f08
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/scripts/stop.sh
@@ -0,0 +1,44 @@
+#!/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.
+
+curr_dir=`pwd`
+cd `dirname $0`; script_dir=`pwd`; cd $curr_dir
+
+if [ "$PID_FILE" = "" ]; then
+ LOGSEARCH_PID_DIR=$HOME
+ PID_FILE=$LOGSEARCH_PID_DIR/logsearch-search-$USER.pid
+fi
+
+if [ -f ${PID_FILE} ]; then
+ PID=`cat ${PID_FILE}`
+ if kill -0 $PID 2>/dev/null; then
+ echo "logsearch running with process id (${PID}). Killing..."
+ kill $PID 2>/dev/null
+ sleep 5
+ if kill -0 $PID 2>/dev/null; then
+ echo "logsearch still running. Will kill process forcefully in another 10 seconds..."
+ sleep 10
+ kill -9 $PID 2>/dev/null
+ sleep 2
+ fi
+ fi
+
+ if kill -0 $PID 2>/dev/null; then
+ echo "ERROR: Even after all efforts to stop logsearch, it is still running. pid=$PID. Please manually kill the service and try again."
+ exit 1
+ fi
+fi
+
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/404.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/404.html b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/404.html
new file mode 100644
index 0000000..76ac201
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/404.html
@@ -0,0 +1,170 @@
+<!--
+ 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.
+-->
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+
+ <meta charset="utf-8">
+ <title>Page Not Found :(</title>
+ <style>
+ ::-moz-selection {
+ background: #b3d4fc;
+ text-shadow: none;
+ }
+
+ ::selection {
+ background: #b3d4fc;
+ text-shadow: none;
+ }
+
+ html {
+ padding: 30px 10px;
+ font-size: 20px;
+ line-height: 1.4;
+ color: #737373;
+ background: #f0f0f0;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+ }
+
+ html,
+ input {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ }
+
+ body {
+ max-width: 500px;
+ _width: 500px;
+ padding: 30px 20px 50px;
+ border: 1px solid #b3b3b3;
+ border-radius: 4px;
+ margin: 0 auto;
+ box-shadow: 0 1px 10px #a7a7a7, inset 0 1px 0 #fff;
+ background: #fcfcfc;
+ }
+
+ h1 {
+ margin: 0 10px;
+ font-size: 50px;
+ text-align: center;
+ }
+
+ h1 span {
+ color: #bbb;
+ }
+
+ h3 {
+ margin: 1.5em 0 0.5em;
+ }
+
+ p {
+ margin: 1em 0;
+ }
+
+ ul {
+ padding: 0 0 0 40px;
+ margin: 1em 0;
+ }
+
+ .container {
+ max-width: 380px;
+ _width: 380px;
+ margin: 0 auto;
+ }
+
+ /* google search */
+
+ #goog-fixurl ul {
+ list-style: none;
+ padding: 0;
+ margin: 0;
+ }
+
+ #goog-fixurl form {
+ margin: 0;
+ }
+
+ #goog-wm-qt,
+ #goog-wm-sb {
+ border: 1px solid #bbb;
+ font-size: 16px;
+ line-height: normal;
+ vertical-align: top;
+ color: #444;
+ border-radius: 2px;
+ }
+
+ #goog-wm-qt {
+ width: 220px;
+ height: 20px;
+ padding: 5px;
+ margin: 5px 10px 0 0;
+ box-shadow: inset 0 1px 1px #ccc;
+ }
+
+ #goog-wm-sb {
+ display: inline-block;
+ height: 32px;
+ padding: 0 10px;
+ margin: 5px 0 0;
+ white-space: nowrap;
+ cursor: pointer;
+ background-color: #f5f5f5;
+ background-image: -webkit-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -moz-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -ms-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ background-image: -o-linear-gradient(rgba(255,255,255,0), #f1f1f1);
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ *overflow: visible;
+ *display: inline;
+ *zoom: 1;
+ }
+
+ #goog-wm-sb:hover,
+ #goog-wm-sb:focus {
+ border-color: #aaa;
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
+ background-color: #f8f8f8;
+ }
+
+ #goog-wm-qt:hover,
+ #goog-wm-qt:focus {
+ border-color: #105cb6;
+ outline: 0;
+ color: #222;
+ }
+
+ input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+ }
+ </style>
+ </head>
+ <body>
+ <div class="container">
+ <h1>Not found <span>:(</span></h1>
+ <p>Sorry, but the page you were trying to view does not exist.</p>
+ <p>It looks like this was the result of either:</p>
+ <ul>
+ <li>a mistyped address</li>
+ <li>an out-of-date link</li>
+ </ul>
+ </div>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/META-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/META-INF/applicationContext.xml b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/META-INF/applicationContext.xml
new file mode 100644
index 0000000..6a73d60
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/META-INF/applicationContext.xml
@@ -0,0 +1,52 @@
+<?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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+xmlns:aop="http://www.springframework.org/schema/aop" xmlns:jee="http://www.springframework.org/schema/jee"
+xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
+xmlns:task="http://www.springframework.org/schema/task" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:util="http://www.springframework.org/schema/util"
+xsi:schemaLocation="http://www.springframework.org/schema/aop
+http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
+http://www.springframework.org/schema/beans
+http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
+http://www.springframework.org/schema/context
+http://www.springframework.org/schema/context/spring-context-4.2.xsd
+http://www.springframework.org/schema/jee
+http://www.springframework.org/schema/jee/spring-jee-4.2.xsd
+http://www.springframework.org/schema/tx
+http://www.springframework.org/schema/tx/spring-tx-4.2.xsd
+http://www.springframework.org/schema/task
+http://www.springframework.org/schema/task/spring-task-4.2.xsd
+http://www.springframework.org/schema/util
+http://www.springframework.org/schema/util/spring-util.xsd">
+
+ <context:component-scan base-package="org.apache.ambari.logsearch" />
+ <bean id="xmlPropertyConfigurer" class="org.apache.ambari.logsearch.util.XMLPropertiesUtil" />
+
+ <bean id="propertyConfigurer" class="org.apache.ambari.logsearch.util.PropertiesUtil">
+ <property name="locations">
+ <list>
+ <value>classpath:default.properties</value>
+ <value>classpath:logsearch.properties</value>
+ <value>classpath:logsearch-admin-site.xml</value>
+ </list>
+ </property>
+ <property name="propertiesPersister" ref="xmlPropertyConfigurer" />
+ </bean>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/META-INF/security-applicationContext.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/META-INF/security-applicationContext.xml b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/META-INF/security-applicationContext.xml
new file mode 100644
index 0000000..468552b
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/META-INF/security-applicationContext.xml
@@ -0,0 +1,74 @@
+<?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.
+-->
+<beans:beans xmlns="http://www.springframework.org/schema/security"
+xmlns:beans="http://www.springframework.org/schema/beans"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+xmlns:security="http://www.springframework.org/schema/security"
+xsi:schemaLocation="http://www.springframework.org/schema/beans
+http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
+http://www.springframework.org/schema/security
+http://www.springframework.org/schema/security/spring-security-4.0.xsd">
+
+ <security:http pattern="/login.jsp" security="none" />
+ <security:http pattern="/**/*.css" security="none" />
+ <security:http pattern="/**/jquery.*.js" security="none" />
+ <security:http pattern="/**/*.css.map" security="none" />
+ <security:http pattern="/service/public/**" security="none" />
+
+ <security:http disable-url-rewriting="true" use-expressions="true" create-session="always" entry-point-ref="authenticationProcessingFilterEntryPoint">
+ <csrf disabled="true"/>
+ <security:session-management session-fixation-protection="newSession" />
+ <intercept-url pattern="/**" access="isAuthenticated()"/>
+ <security:custom-filter position="FORM_LOGIN_FILTER" ref="logsearchUsernamePasswordAuthenticationFilter"/>
+ <security:custom-filter position="LAST" ref="userContextFormationFilter"/>
+ <security:logout delete-cookies="JSESSIONID" logout-url="/logout.html" success-handler-ref="logsearchLogoutSuccessHandler" />
+ <http-basic entry-point-ref="authenticationProcessingFilterEntryPoint"/>
+ </security:http>
+
+ <beans:bean id="userContextFormationFilter" class="org.apache.ambari.logsearch.web.filters.LogsearchSecurityContextFormationFilter"/>
+
+ <beans:bean id="logsearchUsernamePasswordAuthenticationFilter" class="org.apache.ambari.logsearch.web.filters.LogsearchUsernamePasswordAuthenticationFilter">
+ <beans:property name="authenticationManager" ref="authenticationManager"/>
+ <beans:property name="authenticationSuccessHandler" ref="authSuccessHandler"/>
+ <beans:property name="authenticationFailureHandler" ref="authFailureHandler"/>
+ </beans:bean>
+
+ <beans:bean id="authenticationProcessingFilterEntryPoint" class="org.apache.ambari.logsearch.web.filters.LogsearchAuthenticationEntryPoint">
+ <beans:constructor-arg index="0" value="/login.jsp"/>
+ <beans:property name="forceHttps" value="false"/>
+ </beans:bean>
+
+ <beans:bean id="authSuccessHandler" class="org.apache.ambari.logsearch.web.authenticate.LogsearchAuthSuccessHandler">
+ </beans:bean>
+
+ <beans:bean id="authFailureHandler" class="org.apache.ambari.logsearch.web.authenticate.LogsearchAuthFailureHandler">
+ </beans:bean>
+
+ <beans:bean id="logsearchLogoutSuccessHandler" class="org.apache.ambari.logsearch.web.authenticate.LogsearchLogoutSuccessHandler">
+ </beans:bean>
+
+ <beans:bean id="logsearchAuthenticationProvider" class="org.apache.ambari.logsearch.web.security.LogsearchAuthenticationProvider" >
+ </beans:bean>
+
+ <security:authentication-manager alias="authenticationManager">
+ <security:authentication-provider ref="logsearchAuthenticationProvider"/>
+ </security:authentication-manager>
+
+ <beans:bean id="securityEventListener" class ="org.apache.ambari.logsearch.web.listeners.SpringEventListener"/>
+
+</beans:beans>
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/WEB-INF/web.xml b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/WEB-INF/web.xml
new file mode 100755
index 0000000..2ba4481
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,72 @@
+<?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.
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">
+
+
+ <display-name>LogSearch</display-name>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>META-INF/applicationContext.xml
+ META-INF/security-applicationContext.xml
+ </param-value>
+ </context-param>
+
+
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+
+ <listener>
+ <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
+ </listener>
+ <filter>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- Servlet mapping for REST -->
+ <servlet>
+ <servlet-name>REST service</servlet-name>
+ <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
+ <init-param>
+ <param-name>com.sun.jersey.config.property.packages</param-name>
+ <param-value>org.apache.ambari.logsearch.rest</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
+ <param-value>org.apache.ambari.logsearch.common.RESTAPIFilter</param-value>
+ </init-param>
+ <init-param>
+ <param-name>com.sun.jersey.spi.container.ContainerResponseFilters</param-name>
+ <param-value>org.apache.ambari.logsearch.common.RESTAPIFilter</param-value>
+ </init-param>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>REST service</servlet-name>
+ <url-pattern>/service/*</url-pattern>
+ </servlet-mapping>
+
+
+</web-app>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/ajax_failure.jsp
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/ajax_failure.jsp b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/ajax_failure.jsp
new file mode 100644
index 0000000..d00cbfb
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/ajax_failure.jsp
@@ -0,0 +1,31 @@
+<!--
+ 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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<%
+ int ajaxReturnCode = 401;
+ //PropertiesUtil.getIntProperty("xa.ajax.auth.required.code", 401);
+ response.sendError(ajaxReturnCode);
+%>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+Failure
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/ajax_success.html
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/ajax_success.html b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/ajax_success.html
new file mode 100644
index 0000000..52023ca
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/ajax_success.html
@@ -0,0 +1,26 @@
+<!--
+ 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.
+-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+</head>
+<body>
+Success
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/favicon.ico
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/favicon.ico b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/favicon.ico
new file mode 100644
index 0000000..62604cb
Binary files /dev/null and b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/favicon.ico differ
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/fonts/fontawesome/FontAwesome.otf
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/fonts/fontawesome/FontAwesome.otf b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/fonts/fontawesome/FontAwesome.otf
new file mode 100644
index 0000000..7012545
Binary files /dev/null and b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/fonts/fontawesome/FontAwesome.otf differ
http://git-wip-us.apache.org/repos/asf/ambari/blob/f7294694/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/fonts/fontawesome/fontawesome-webfont.eot
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/fonts/fontawesome/fontawesome-webfont.eot b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/fonts/fontawesome/fontawesome-webfont.eot
new file mode 100644
index 0000000..0662cb9
Binary files /dev/null and b/ambari-logsearch/ambari-logsearch-portal/src/main/webapp/fonts/fontawesome/fontawesome-webfont.eot differ