Skip to content

Commit

Permalink
Finalize packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
stuehmer committed Jul 30, 2013
1 parent 0b28b35 commit a656aaa
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 97 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ events and there is no need to model mappings to binary formats.

Installation
------------
[Install Guide](INSTALL.md)
[Install Guide](https://github.com/play-project/play-dcep/tree/master/play-dcep-distribution)

Issues
------
Expand Down
58 changes: 16 additions & 42 deletions INSTALL.md → play-dcep-distribution/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ elastic CEP service which dynamically adapts to fluctuating event frequencies.
DCEP is a native RDF event processor, which means RDF can be used directly for
events and there is no need to model mappings to binary formats.

Installation
Dependencies
------------
Tested on `CentOS release 6.3 (Final)`:

Expand All @@ -40,11 +40,6 @@ rpm -i pl-*.rpm
```
Add `--nodeps` to the rpm command if there is a problem with an old version of libjpeg which is actually on your system already.

#### Tomcat (>=6)
```
yum install tomcat6 tomcat6-admin-webapps
chkconfig tomcat6 on
```
#### Virtuoso (>=6.1.7, optional)
I created an SRPM based on 6.1.6 myself using instructions from http://wiki.centos.org/HowTos/RebuildSRPM
```
Expand Down Expand Up @@ -73,48 +68,27 @@ Use the init.d start script from here: [RedHat, CentOS](https://gist.github.com/
```
chkconfig virtuoso on
```
#### PLAY DSB
https://github.com/PetalsLinkLabs/petals-dsb/

### Build Requirements:
#### Maven (3.x)
There is no well-packaged Maven 3 for CentOS, so you must unzip Maven yourself, somewhere in `/opt/maven` and add `/opt/maven/bin` to your `$PATH`
#### Git
```
yum install git
```

Building DCEP
-------------
We will build DCEP in `/tmp` and later run in in `/opt/play-platform-stable`:
Build
-----
To build DCEP in `/tmp`:
```
cd /tmp
git clone https://github.com/play-project/play-dcep.git
cd play-dcep/
mvn install
mkdir --parents /opt/play-platform-stable/
cp play-dcep-distribution/target/dcep-jar-with-dependencies.jar /opt/play-platform-stable/
mvn install -DskipTests
```
The installer package `dcep-install.zip` will be in `/tmp/play-dcep/play-dcep-distribution/target/`

Configuring DCEP
Unpack/Configure
----------------
The installation directory `/opt/play-platform-stable` will be on the Java classpath so you can place some customized configuration files there.

- `play-commons-constants.properties` adapt it from these defaults: [default properties](https://github.com/play-project/play-commons/blob/master/play-commons-constants/src/main/resources/play-commons-constants-defaults.properties)
- `play-dcep-distribution.properties` adapt it from these defaults: [default properties](https://github.com/play-project/play-dcep/blob/master/play-dcep-api/src/main/resources/play-dcep-distribution-defaults.properties)

Running DCEP
------------
We will run DCEP from `/opt/play-platform-stable`:
```
cd /opt/play-platform-stable
screen
java -Djava.security.policy=proactive.java.policy -Dproactive.communication.protocol=pnp -Dproactive.pnp.port=9150 -Dproactive.http.port=9151 -cp .:dcep-jar-with-dependencies.jar eu.play_project.dcep.distribution.Main
```
You can press `CTRL-A, D` to put the screen terminal in background and enter `screen -x` to re-attach it back in foreground later.

1. Download or build (see above) the file `dcep-install.zip`
2. Unzip
3. `cd dcep`
4. Edit `conf/play-commons-constants.properties` for endpoints where events can be received and sent. Adapt the file from these defaults: [default properties](https://github.com/play-project/play-commons/blob/master/play-commons-constants/src/main/resources/play-commons-constants-defaults.properties)
5. Edit `conf/play-dcep-distribution.properties` for startup behaviour. Adapt the file from these defaults: [default properties](https://github.com/play-project/play-dcep/blob/master/play-dcep-api/src/main/resources/play-dcep-distribution-defaults.properties)

Issues
------
For issues and bug reporting, please go to https://github.com/play-project/play/issues?labels=dcep&page=1&state=open
Run
---
1. Run `bin/dcep start` on Unix
2. The program can be terminated early using `bin/dcep stop`
51 changes: 32 additions & 19 deletions play-dcep-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
<properties>
<!-- Properties used in Assembly and Linux scripts -->
<service.name>dcep</service.name>
<java.arguments>-Djava.security.manager -Djava.security.policy=proactive.java.policy -Dproactive.communication.protocol=pnp -Dproactive.pnp.port=9000 -Dproactive.http.port=9001 -Dproactive.rmi.port=1099 -server</java.arguments>
<java.arguments><![CDATA[-Djava.security.manager -Djava.security.policy=proactive.java.policy -Dproactive.communication.protocol=pnp -Dproactive.pnp.port=9250 -Dproactive.http.port=9251 -Dproactive.rmi.port=1099 -server]]></java.arguments>
</properties>

<build>
<resources>
<resource>
Expand All @@ -48,29 +48,42 @@
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<finalName>dcep</finalName>
<descriptors>
<!-- Use descriptor for one-jar -->
<descriptor>src/main/assembly/jar-with-dependencies.xml</descriptor>
<!-- Use custom descriptor to build final install package -->
<descriptor>src/main/assembly/install.xml</descriptor>
</descriptors>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>eu.play_project.dcep.distribution.tests.srbench.performance.SingleDistributedEtalisInstanceRunner</mainClass>
</manifest>
</archive>
<argLine>${java.arguments}</argLine>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<!-- (I) First execution to build one-jar -->
<id>make-one-jar</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${service.name}</finalName>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<mainClass>eu.play_project.dcep.distribution.tests.srbench.performance.SingleDistributedEtalisInstanceRunner</mainClass>
</manifest>
</archive>
<argLine>${java.arguments}</argLine>
</configuration>
</execution>
<execution>
<!-- (II) Second execution to build installer zip -->
<id>make-installer-package</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>${service.name}</finalName>
<descriptors>
<!-- Use custom descriptor to build final install package -->
<descriptor>src/main/assembly/install.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
Expand Down
18 changes: 0 additions & 18 deletions play-dcep-distribution/src/main/assembly/jar-with-dependencies.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,9 @@
#

# Comma-separated list of query filenames to be loaded (from the classpath) upon DCEP startup:
dcep.startup.registerqueries = play-bdpl-crisis-01a-radiation.eprq, \
play-bdpl-crisis-02a-winddirection.eprq, \
play-bdpl-crisis-02b-windintensity.eprq, \
play-bdpl-crisis-03-drawgraph.eprq, \
play-epsparql-m12-jeans-example-query.eprq, \
play-epsparql-telco-recom-tweets.eprq, \
play-epsparql-clic2call.eprq, \
play-epsparql-iccs-telco-02.eprq, \
play-epsparql-iccs-telco-02a.eprq
dcep.startup.registerqueries = \
play-bdpl-crisis-01a-radiation.eprq

# Select one of: eventcloud, virtuoso, local
dcep.middleware = eventcloud

# Virtuoso specific configuration:
#dcep.virtuoso.servername = ${dcep.virtuoso.servername}
#dcep.virtuoso.port = ${dcep.virtuoso.port}
#dcep.virtuoso.user = ${dcep.virtuoso.user}
#dcep.virtuoso.password = ${dcep.virtuoso.password}

4 changes: 2 additions & 2 deletions play-dcep-distribution/src/main/scripts/dcep
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ serviceName="${project.name}"
# service name
serviceUser="root" # OS user name for the service
serviceGroup="root" # OS group name for the service
applDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )../"
applDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/../"
# home directory of the service application
serviceLogFile="${applDir}/log/$serviceNameLo.log" # log file for StdOut/StdErr
maxShutdownTime=15 # maximum number of seconds to wait for the daemon to terminate normally
Expand All @@ -44,7 +44,7 @@ javaExe="$javaCommand" # file name of the Java ap
javaArgs="${java.arguments} -cp ${applDir}/conf/:${applDir}/lib/dcep-jar-with-dependencies.jar eu.play_project.dcep.distribution.Main"
# arguments for Java launcher
javaCommandLine="$javaExe $javaArgs" # command line to start the Java service application
javaCommandLineKeyword="${project.build.finalName}"
javaCommandLineKeyword="dcep-jar-with-dependencies.jar"
# a keyword that occurs on the commandline, used to detect an already running service process and to distinguish it from others

# Makes the file $1 writable by the group $serviceGroup.
Expand Down

0 comments on commit a656aaa

Please sign in to comment.