This is the administrative guide to Cepheus-CEP.
- JAVA 8
- Maven 2 (for building only)
Get the code from the Github:
git clone https://github.com/Orange-OpenSource/fiware-cepheus.git
cd fiware-cepheus/cepheus-cep
To build a standalone JAR and Debian package, you need maven:
mvn clean package
To install the Cepheus-CEP, you just have to download the standalone JAR.
Download from Sonatype Central repository with Maven
If you have maven, you can run the following command:
mvn dependency:get -DgroupId=com.orange.cepheus -DartifactId=cepheus-cep -Dversion=XXXX -Dtransitive=false
where XXXX is the version you want, like 1.0.1-SNAPSHOT or LATEST.
Download from Sonatype Central repository using wget
If you don't have maven installed on your machine, you can still download the standalone JAR using wget or any browser:
wget -O cepheus-cep.jar "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.orange.cepheus&a=cepheus-cep&v=LATEST"
Cepheus-CEP is a SpringBoot application. You can run either run it directly from the source with maven:
mvn spring-boot:run
or from the standalone JAR:
java -jar cepheus-cep.jar
The Cepheus-CEP is also provided in a preconfigured Debian package to ease deployment on Debian and Raspbian systems.
Download the Debian package from Sonatype Central repository using wget:
wget -O cepheus-cep.deb "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.orange.cepheus&a=cepheus-cep&v=LATEST&p=deb"
Install using dpkg:
dpkg -i cepheus-cep.deb
The package will automatically:
- place the standalone JAR under
/usr/lib/cepheus - setup configuration file under
/etc/cepheus/cep.properties - add a
cepheus-cepinit.d startup script under/etc/init.d/cepheus-cep - start the
cepheus-cepon startup of the machine on port8080 - put logs under
/var/log/cepheus/cep.log - put data under
/var/cepheus/cep.json
To start and stop the Cepheus-CEP daemon, use the common service command:
service cepheus-cep start
service cepheus-cep stop
service cepheus-cep restart
You modify some application settings either editing:
- the
src/main/resources/application.propertiesfile when building from the source, - an external configuration like
/etc/cepheus/cep.propertiesfrom the Debian package.
This is a short list of the application properties:
| Name | Description | Default value |
|---|---|---|
| server.port | port used | 8080 |
| data.path | path to store data | /tmp/ |
| subscriptionManager.periodicity | Periodicity of the subscription manager task | 300000 |
| subscriptionManager.duration | Duration of a NGSI subscription | PT1H |
| logging.level.com.orange.cepheus.cep | log level | INFO |
Please look at the src/main/resources/application.properties for all the properties and their default values.
You can modify all the application properties from the command line:
java -jar cepheus-cep.jar --property=value
Example:
java -jar cepheus-cep.jar --server.port=8080 --data.path=/var/cepheus/
If you want to customize application properties after the application has been packaged, you can override the default properties in an external properties file.
You can either:
-
Put a
application.propertiesin the current path.or under./config/, -
or specify a custom location for the file using
--spring.config.location:java -jar cepheus.cep.jar --spring.config.location=/etc/cepheus/cep.properties
The Cepheus-CEP loads its data on startup and saves back data updates to a single JSON file.
The default location of the data file is defined by the data.file property.
This Cepheus-CEP process must have write access rights on this file.
You can enable the Spring Boot Actuator /infos, /health and /metrics endpoints with these application properties:
endpoints.info.enabled=true
endpoints.metrics.enabled=true
endpoints.health.enabled=true
Metrics will include the metrics for each EPL statement with the following data:
cpuTime, wallTime,numInput and numOutputIStream.
The complete user & programming guide can be found here