FROST-Server Documentation

Live documentation for the development version.

Tomcat or Wildfly

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.

Tomcat

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.

  1. Copy the Postgres JDBC jar and the postgis jar to $CATALINA_HOME/lib.
  2. Configure the database resource. Either in the Context, or elsewhere in server.xml:
        <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):

  1. Enviroment variables
  2. The Context entry either in
    • server.xml
    • $CATALINA_BASE/conf/[enginename]/[hostname]/appname.xml
    • /META-INF/context.xml inside the war file.
  3. web.xml

Next, read below for Database initialisation or upgrade.

Wildfly

For Wildfly, configuration options like the persistence.persistenceManagerImplementationClass option mentioned below, are taken from (in order of priority):

  1. Enviroment variables
  2. web.xml

Database initialisation or upgrade

  1. Choose which backend to use, by configuring the persistence.persistenceManagerImplementationClass option:
    • de.fraunhofer.iosb.ilt.sta.persistence.postgres.longid.PostgresPersistenceManagerLong
      Default value, using Long values for entity ids, generated in sequence
    • de.fraunhofer.iosb.ilt.sta.persistence.postgres.stringid.PostgresPersistenceManagerString
      Using String values for entity ids, with new values generated using uuid_generate_v1mc()
    • de.fraunhofer.iosb.ilt.sta.persistence.postgres.uuidid.PostgresPersistenceManagerUuid
      Using uuid values for entity ids, with new values generated using uuid_generate_v1mc()
  2. Browse to http://localhost:8080/FROST/DatabaseStatus
  3. Click the upgrade button

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.