This is the administrative guide to Cepheus-Broker.
- JAVA 8
- Maven 2 (for building only)
- OS/CPU supported by Sqlite-JDBC
Get the code from the Github:
git clone https://github.com/Orange-OpenSource/fiware-cepheus.git
cd fiware-cepheus/cepheus-broker
To build a standalone JAR and Debian package, you need maven
:
mvn clean package
To install the Cepheus-Broker, 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-broker -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-broker.jar "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.orange.cepheus&a=cepheus-broker&v=LATEST"
Cepheus-Broker 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-broker.jar
The Cepheus-Broker 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-broker.deb "https://oss.sonatype.org/service/local/artifact/maven/redirect?r=snapshots&g=com.orange.cepheus&a=cepheus-broker&v=LATEST&p=deb"
Install using dpkg
:
dpkg -i cepheus-broker.deb
The package will automatically:
- place the standalone JAR under
/usr/lib/cepheus
- setup configuration file under
/etc/cepheus/broker.properties
- add a
cepheus-broker
init.d startup script under/etc/init.d/cepheus-broker
- start the
cepheus-broker
on startup of the machine on port8081
- put logs under
/var/log/cepheus/broker.log
To start and stop the Cepheus-Broker daemon, use the common service
command:
service cepheus-broker start
service cepheus-broker stop
service cepheus-broker restart
You modify some application settings either editing:
- the
src/main/resources/application.properties
file when building from the source, - an external configuration like
/etc/cepheus/broker.properties
from the Debian package.
This is a short list of the application properties:
Name | Description | Default Value |
---|---|---|
server.port | broker port | 8081 |
local.url | public URL to this instance | http://localhost:8081 |
remote.url | URL to the remote broker (Orion) | http://localhost:8082 |
remote.serviceName | remote broker Service Name | |
remote.servicePath | remote broker Service Path | |
remote.authToken | OAuth token for secured broker | |
remote.forward.updateContext | updateContext forwarding to remote broker | true |
logging.level.com.orange.cepheus.broker | log level | INFO |
spring.datasource.url | DataBase url | jdbc:sqlite:${java.io.tmpdir:-/tmp}/cepheus-broker.db |
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-broker.jar --property=value
Example:
java -jar cepheus-broker.jar --server.port=8081
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.properties
in the current path.
or under./config/
, -
or specify a custom location for the file using
--spring.config.location
:java -jar cepheus-broker.jar --spring.config.location=/etc/cepheus/broker.properties
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
The complete user & programming guide can be found here