Live documentation for the development version.
There are several ways to deploy the different packages the make up the FROST-Server. The HTTP and all-in-one MQTTP packages can be run in Tomcat or Wildfly (see below), or as a docker image.
When deploying on a new or existing Tomcat or Wildfly installation, the following steps can be folowed. You will also need a PostgreSQL server with PostGIS extensions, see PostgreSQL Setup.
$CATALINA_HOME/lib
. <Resource
name="jdbc/sensorThings" auth="Container"
type="javax.sql.DataSource" driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://localhost:5432/sensorthings"
username="sensorthings" password="ChangeMe"
maxTotal="20" maxIdle="10" maxWaitMillis="-1"/>
For tomcat, configuration options like the persistence.persistenceManagerImplementationClass
option mentioned below, are taken from (in order of priority):
$CATALINA_BASE/conf/[enginename]/[hostname]/appname.xml
/META-INF/context.xml
inside the war file.Next, read below for Database initialisation or upgrade.
$WILDFLY_HOME/modules/org/postgresql/main
Create a file named module.xml and add the following:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.0" name="org.postgresql">
<resources>
<resource-root path="postgresql-42.2.16.jar"/>
<resource-root path="postgis-jdbc-2.4.0.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
$WILDFLY_HOME/standalone/configuration/[standalone.xml]
<subsystem xmlns="urn:jboss:domain:datasources:4.0">
<datasources>
<datasource jta="true" jndi-name="java:/comp/env/jdbc/sensorThings" pool-name="Sensorthings" enabled="true" use-ccm="true">
<connection-url>jdbc:postgresql://localhost:5432/sensorthings</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>postgres</driver>
<security>
<user-name>sensorthings</user-name>
<password>ChangeMe</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/>
<background-validation>true</background-validation>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/>
</validation>
</datasource>
</datasources>
</subsystem>
For Wildfly, configuration options like the persistence.persistenceManagerImplementationClass
option mentioned below, are taken from (in order of priority):
persistence.persistenceManagerImplementationClass
option:
de.fraunhofer.iosb.ilt.sta.persistence.postgres.longid.PostgresPersistenceManagerLong
de.fraunhofer.iosb.ilt.sta.persistence.postgres.stringid.PostgresPersistenceManagerString
de.fraunhofer.iosb.ilt.sta.persistence.postgres.uuidid.PostgresPersistenceManagerUuid
This should initialise/update the database to the latest version and the service is ready for use.
Now you may want to have a look at PostgreSQL Setup or Performance tips for PostgreSQL and PostGIS.