Skip to content
Closed
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
99 changes: 99 additions & 0 deletions external/storm-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
##Package
* package war

```
mvn clean package -DskipTests=true -Dwar
cp ./target/storm-ui.war $TOMCAT_HOME/webapps/
```

* package jar

```
mvn clean package -DskipTests=true
cp ./target/storm-ui-*.jar $STORM_HOME/external/storm-ui/
```
## MUST Config STORM_CONF_DIR

You can specify the storm configuration directory by setting system environment variable. By default,
you can create a new directory named ".storm" in the user home,and set the storm configuration by storm.yaml

* config by setting system environment variable

```
export STORM_CONF_DIR
```

* Create a new directory named ".storm" in the user home. Like "~/.storm"

```
cd ~
mkdir .storm
vim storm.yaml
```

## How to Deploy to Tomcat
* Download apache-tomcat

```
wget http://apache.fayea.com/apache-mirror/tomcat/tomcat-7/v7.0.56/bin/apache-tomcat-7.0.56.tar.gz
```
* Config Env

```
vi /etc/profile
JAVA_HOME=~/software/jdk-current
CLASS_PATH=$JAVA_HOME/lib:JAVA_HOME/jre/lib:JAVA_HOME/lib/tools.jar:$CLASS_PATH
PATH=$JAVA_HOME/bin:$PATH

TOMCAT_HOME=~/software/apache-tomcat-7.0.56
CATALINA_HOME=$TOMCAT_HOME
PATH=$TOMCAT_HOME/bin:$PATH

export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC CLASS_PATH JAVA_HOME TOMCAT_HOME CATALINA_HOME
```
*modify $TOMCAT_HOME/conf/server.xml

```
add "<Context path="" docBase="storm-ui" debug="0" reloadable="true" crossContext="true"/>" between <host> and </host>.
Like:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">

<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->

<!-- Access log processes all example.
Documentation at: /docs/config/valve.html
Note: The pattern used is equivalent to using pattern="common" -->
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />

<Context path="" docBase="storm-ui" debug="0" reloadable="true" crossContext="true"/>

</Host>
```

* modify ./startup.sh & shutdown.sh

```
write Config Env to ./startup.sh & shutdown.sh
```
* Start TomCat Server

```
# $TOMCAT_HOME/bin/startup.sh
Using CATALINA_BASE: ~/software/apache-tomcat-7.0.56
Using CATALINA_HOME: ~/software/apache-tomcat-7.0.56
Using CATALINA_TMPDIR: ~/software/apache-tomcat-7.0.56/temp
Using JRE_HOME: ~/software/jdk1.6.0_45
Using CLASSPATH: ~/software/apache-tomcat-7.0.56/bin/bootstrap.jar:~/software/apache-tomcat-7.0.56/bin/tomcat-juli.jar
```
* Shut Down TomCat Server

```
# $TOMCAT_HOME/bin/shutdown.sh
```
98 changes: 98 additions & 0 deletions external/storm-ui/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<?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.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.storm</groupId>
<artifactId>storm</artifactId>
<version>0.11.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<artifactId>storm-ui</artifactId>
<name>${project.artifactId}</name>
<description>storm ui</description>
<properties>
<packaging.type>jar</packaging.type>
<scope.type>provided</scope.type>
</properties>
<profiles>
<profile>
<activation>
<property>
<name>war</name>
</property>
</activation>
<properties>
<packaging.type>war</packaging.type>
<scope.type>compile</scope.type>
</properties>
<build>
<finalName>storm-ui</finalName>
</build>
</profile>
</profiles>
<packaging>${packaging.type}</packaging>
<dependencies>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>${project.version}</version>
<scope>${scope.type}</scope>
</dependency>
<dependency>
<groupId>compojure</groupId>
<artifactId>compojure</artifactId>
<version>${compojure.version}</version>
</dependency>
<dependency>
<groupId>hiccup</groupId>
<artifactId>hiccup</artifactId>
<version>${hiccup.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<sourceDirectories>
<sourceDirectory>src/main/clj</sourceDirectory>
</sourceDirectories>
<warnOnReflection>false</warnOnReflection>
<copyDeclaredNamespaceOnly>true</copyDeclaredNamespaceOnly>
<copiedNamespaces>
<copiedNamespace>none</copiedNamespace>
</copiedNamespaces>
<runWithTests>false</runWithTests>
</configuration>
<executions>
<execution>
<id>compile-clojure</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
32 changes: 32 additions & 0 deletions external/storm-ui/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?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 version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>Storm UI</display-name>
<context-param>
<param-name>debug</param-name>
<param-value>false</param-value>
</context-param>

<session-config>
<!-- 10 minutes -->
<session-timeout>10</session-timeout>
</session-config>
</web-app>
51 changes: 26 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@
<module>storm-buildtools/maven-shade-clojure-transformer</module>
<module>storm-buildtools/storm-maven-plugins</module>
<module>storm-core</module>
<module>external/storm-ui</module>
<module>external/storm-kafka</module>
<module>external/storm-hdfs</module>
<module>external/storm-hbase</module>
Expand Down Expand Up @@ -569,14 +570,14 @@
<version>${ring-json.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty.version}</version>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-servlets</artifactId>
<version>${jetty.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
Expand Down Expand Up @@ -936,25 +937,25 @@
<exclude>**/src/py/**</exclude>

<!-- the following are in the LICENSE file -->
<exclude>**/src/ui/public/js/jquery.dataTables.1.10.4.min.js</exclude>
<exclude>**/src/ui/public/css/jquery.dataTables.1.10.4.min.css</exclude>
<exclude>**/src/ui/public/images/*</exclude>
<exclude>**/src/ui/public/js/bootstrap-3.3.1.min.js</exclude>
<exclude>**/src/ui/public/css/bootstrap-3.3.1.min.css</exclude>
<exclude>**/src/ui/public/js/dataTables.bootstrap.min.js</exclude>
<exclude>**/src/ui/public/css/dataTables.bootstrap.css</exclude>
<exclude>**/src/ui/public/js/jsonFormatter.min.js</exclude>
<exclude>**/src/ui/public/css/jsonFormatter.min.css</exclude>
<exclude>**/src/ui/public/js/jquery-1.11.1.min.js</exclude>
<exclude>**/src/ui/public/js/jquery.cookies.2.2.0.min.js</exclude>
<exclude>**/src/ui/public/js/moment.min.js</exclude>
<exclude>**/src/ui/public/js/jquery.blockUI.min.js</exclude>
<exclude>**/src/ui/public/js/url.min.js</exclude>
<exclude>**/src/ui/public/js/arbor.js</exclude>
<exclude>**/src/ui/public/js/arbor-graphics.js</exclude>
<exclude>**/src/ui/public/js/arbor-tween.js</exclude>
<exclude>**/src/ui/public/js/jquery.mustache.js</exclude>
<exclude>**/src/ui/public/js/typeahead.jquery.min.js</exclude>
<exclude>**/src/main/webapp/js/jquery.dataTables.1.10.4.min.js</exclude>
<exclude>**/src/main/webapp/css/jquery.dataTables.1.10.4.min.css</exclude>
<exclude>**/src/main/webapp/images/*</exclude>
<exclude>**/src/main/webapp/js/bootstrap-3.3.1.min.js</exclude>
<exclude>**/src/main/webapp/css/bootstrap-3.3.1.min.css</exclude>
<exclude>**/src/main/webapp/js/dataTables.bootstrap.min.js</exclude>
<exclude>**/src/main/webapp/css/dataTables.bootstrap.css</exclude>
<exclude>**/src/main/webapp/js/jsonFormatter.min.js</exclude>
<exclude>**/src/main/webapp/css/jsonFormatter.min.css</exclude>
<exclude>**/src/main/webapp/js/jquery-1.11.1.min.js</exclude>
<exclude>**/src/main/webapp/js/jquery.cookies.2.2.0.min.js</exclude>
<exclude>**/src/main/webapp/js/moment.min.js</exclude>
<exclude>**/src/main/webapp/js/jquery.blockUI.min.js</exclude>
<exclude>**/src/main/webapp/js/url.min.js</exclude>
<exclude>**/src/main/webapp/js/arbor.js</exclude>
<exclude>**/src/main/webapp/js/arbor-graphics.js</exclude>
<exclude>**/src/main/webapp/js/arbor-tween.js</exclude>
<exclude>**/src/main/webapp/js/jquery.mustache.js</exclude>
<exclude>**/src/main/webapp/js/typeahead.jquery.min.js</exclude>

<!-- generated by shade plugin -->
<exclude>**/dependency-reduced-pom.xml</exclude>
Expand Down
25 changes: 17 additions & 8 deletions storm-dist/binary/src/main/assembly/binary.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,6 @@
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../storm-core/src/ui/public</directory>
<outputDirectory>public</outputDirectory>
<includes>
<include>*/**</include>
</includes>
<excludes/>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../examples</directory>
<outputDirectory>examples</outputDirectory>
Expand All @@ -68,6 +60,23 @@
<outputDirectory>bin</outputDirectory>
</fileSet>
<!-- EXTERNAL -->
<!-- $STORM_HOME/webapps/storm-ui -->
<fileSet>
<directory>${project.basedir}/../../external/storm-ui/src/main/webapp</directory>
<outputDirectory>webapps/storm-ui</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<!-- $STORM_HOME/external/storm-ui/ -->
<fileSet>
<directory>${project.basedir}/../../external/storm-ui/target</directory>
<outputDirectory>external/storm-ui/</outputDirectory>
<includes>
<include>storm-ui-${project.version}.jar</include>
<include>storm-ui.war</include>
</includes>
</fileSet>
<fileSet>
<directory>${project.basedir}/../../external/storm-kafka/target</directory>
<outputDirectory>external/storm-kafka</outputDirectory>
Expand Down