Skip to content

Commit

Permalink
Merge pull request #1 from FraunhoferIOSB/master
Browse files Browse the repository at this point in the history
Sync to upstream
  • Loading branch information
selimnairb authored Nov 19, 2018
2 parents 2966cf5 + 4144266 commit b62910d
Show file tree
Hide file tree
Showing 409 changed files with 19,869 additions and 19,616 deletions.
15 changes: 11 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,17 @@ pom.xml.releaseBackup
release.properties

/target
/FROST-Server.MQTT.Moquette/target/
/FROST-Server.SQL.PGLong/target/
/FROST-Server.Core/target/
/FROST-Server.SQL/target/
/FROST-Server.SQL.PGLong/target/
/FROST-Server.SQL.PGString/target/
/FROST-Server.Core/target/
/FROST-Server.HTTP/target/
/FROST-Server.SQL.PGUuid/target/
/FROST-Server.HTTP/target/
/FROST-Server.HTTP.Common/target/
/FROST-Server.MQTT/target/
/FROST-Server.MQTT.Moquette/target/
/FROST-Server.MQTTP/target/

FROST-Server.HTTP/keycloak.json
FROST-Server.MQTT/FrostMqtt.properties
logs
64 changes: 58 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,71 @@ jdk:
branches:
only:
- master
- actuation
- "/^v[0-9]+(\\.[0-9]+)+/"

after_success:
- test "${TRAVIS_PULL_REQUEST}" == "false" && test "${TRAVIS_TAG}" != "" && mvn deploy --settings travis-settings.xml
- mvn dockerfile:build -pl FROST-Server.HTTP
- mvn dockerfile:tag@tag-version -pl FROST-Server.HTTP
- mvn dockerfile:push@push-latest -Ddockerfile.useMavenSettingsForAuth=true -pl FROST-Server.HTTP --settings travis-settings.xml
- mvn dockerfile:push@push-version -Ddockerfile.useMavenSettingsForAuth=true -pl FROST-Server.HTTP --settings travis-settings.xml
install:
- wget http://storage.googleapis.com/kubernetes-helm/helm-${HELM_VERSION}-linux-amd64.tar.gz -O /tmp/helm.tar.gz
- tar xzf /tmp/helm.tar.gz -C /tmp --strip-components=1
- chmod +x /tmp/helm
- /tmp/helm init --client-only
- chmod +x ./helm/build.sh
- chmod +x ./helm/upload.sh
- chmod +x ./travis-deploy.sh
- chmod +x ./travis-deploy-docker.sh
- chmod +x ./setBranchVariable.sh
- source ./setBranchVariable.sh

stages:
- compile
- test
- deploy

jobs:
include:
- stage: compile
name: "Maven build"
script:
- mvn package
- mvn org.jacoco:jacoco-maven-plugin:prepare-agent install sonar:sonar
- stage: compile
name: "Helm build"
script:
- ./helm/build.sh
- stage: test
name: "Maven test"
script:
- mvn test
- stage: deploy
name: "Deploy Docker"
script:
- ./travis-deploy-docker.sh
- stage: deploy
name: "Deploy helm chart"
script:
- ./helm/upload.sh
- stage: deploy
name: "Maven deploy version"
script:
- ./travis-deploy.sh

sudo: required

services:
- docker

addons:
sonarcloud:
organization: "fraunhofer-iosb"

cache:
directories:
- '$HOME/.m2/repository'
- '$HOME/.sonar/cache'

env:
global:
- HELM_VERSION="v2.9.1"
# travis encrypt BINTRAY_USER=[username]
- secure: pfl5pPDTyRB20+dX2PvVGChQoAVRYKiMefXZWX+tvosw40HR/XJ0cL+8skTVe6rJklKvnanWDUZUTJg1bRlq5AygHdF+g76dejaD95EcoMz/cecbxlXyAT+CISEdgzhuTpaVDEP653SCCQlUNyrJQEaROmfc/GxY9nQENZTeLxjQde+/JM1apktH0uIKvBfK7sZrdy9wNjO99fZqD3S6gVRdLLos/jha/f1rpcktnqxnF8Q6OQpmqGUiuuloIh4IYBQg3xcl/1tPauhnVqCdeMrYdLIeLEIM4U405UdOfPthvQkMHfrIkdA0ZZTaX8bgdDMebJc3+FtZSPL42PBC5O6/dQPoyp9iU86wbUnxX46pkQVTk5NyRWul0a930QjYeINdvfvg7Zh5WgBY7l42iSogknRzh5w8LHD5TTVY2jT825inuCV8aR5NHw4jguWBzeNrK5ZrXQk/J6hVxu16obd5OZe3/yw1qStGIxAOnda0LH8Y2jdT8ZQntD+FNv7nSWdUGcGxrMyaSH7PJisBQCvh8NghAmuwfN72zVM9UiDQPelHRdeUDLpTp7laHrbRKgb1rUfRLaopeLw3ORq0EyBtML5OqKEW8QHdkrgkAEYBUClu+9JN7NmttH1XGTIE5ZWm/SBd+iENAlElCh3hjWdCbjVeDF8gDoddS+3LHBg=
# travis encrypt BINTRAY_API_KEY=[api key]
Expand All @@ -28,3 +78,5 @@ env:
- secure: P+z967jQUEzWJkAtCUMWotUr2Ft/FkKYHJmXK2/LlzsFFSB7HP+wOlxLNVMFauek1M5ZZ5jyt1s0nvmftSP4STSIfE63I05Wkjz9A5rrmG4SzUvYFF5mDOS5fa8YTNgnZhBUBP2Ip6WtVnlbbi+bxK44GJFF70ymofWAy+uEmJ+qQFf+PMYa8CS4gY3jGrV/YCY/a3fl8tL240VdjDL0Bv35MTEtMH9x3DR04mAAFlq+6cuaYq/m8eTwivNV7BcC/hz69SroWIk7RnAht6pcVT08W32hib67TXF4zt5kljxuH7hsG+trh9bZFUh2XMGXTZV0ps89WFI6/qTe0olrj++xYuRgglhhUUmpqY3npxGpsq7Z65xoK6UyInVuy+JVUHm77/QIucQY6bxpWx1NyEVUSaQpLGVXp/ABZ6n98OJcosf1e18urBVoV8F2rZYNcRLtuHwmw1rtpI2PCZOvc4ewnJy6hGKmoDa1CzK7Xj8hQ9wtKR9+0m9x7X+qZ/vrfaN7jJ7uLPfgzgZlip4mWTkFw6GSeso6iYjgv+ARHPFwfe46M3K1QzNq5CRLrn++f2r2doWBfpYtd06YYKH8JT8u/q1IFL8nrqwJ6jT22CXO06+EZV5V5ZSEtrrK9/kII81LLG4xIFyvZ5C2csVLdzGg2Mdcna+UZU6zCbGvT3g=
# travis encrypt DOCKER_PASSWORD=[username]
- secure: tMi5jaBO/iaK/Lc3x5WTXqgGfP35v4KZFvc5AD59qEETI1GmQ22e0maqq5YZfZWz5g3ZzS2irWRzKfrYln1lgx2LJ1AI4qHW5CQI0dlEj7OIxzK8FXlJz5tkovlfIHkniL5XyFc4eUSo+d878h8CyNRDoKQlGQie3rP0oaMl5r+CfhsdA4FRxWFY3xerlxUF20XDceVOc2tW7+HB7ROf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E/6Cp4cs/KpLRLCHtp/3Qz7HOKjE3r1PEdD3BX3qdeK/QzcbbvtYbrgZ/T9CKJuoRYQoLaIx27b6bxsjZGdE7ypZkUng=
80 changes: 80 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
# Release Version 1.9
Version 1.9 is not released yet.

**New Features**
* Added experimental DELETE on Collections, with filters. Allows easier data cleanup.
See https://github.com/opengeospatial/sensorthings/issues/44
* Added experimental way to change the location of a Thing, without generating a
HistoricalLocation with a time of now(). See #66 and https://github.com/opengeospatial/sensorthings/issues/30


# Release Version 1.8
Version 1.8 was released on 2018-08-24.

**New Features**
* Upgraded moquette to v0.11.
* Allow setting of the moquette persistent store path and storage class.
* Enabling the tomcat CorsFilter to allow cross-site-scripting can be done from environment variables.
* Added option to automatically run the liquibase database upgrade.

**Bugfixes**
* Fixed #59, incorrect nextLink when filtering on unitOfMeasurement/name.
* Fixed `MultiDatastream.observationType` being required even though we set it automatically.
* Prioritise `persistence_db_url` over `persistence_db_jndi_datasource`. This way there is no longer the need to add an empty environment variable `persistence_db_jndi_datasource` for the HTTP and MQTTP component when configuring using environment variables.
* Fixed string ids in next- and selfLink not being urlEncoded.


# Release Version 1.7
Version 1.7 was released on 2018-07-02.

**New Features**
* Observation.result can be explicitly set to null. This is useful in cases where
an observation did not produce a value, but the fact that an observation was attempted
must still be recorded.
* Exposed database connection options `persistence.db.conn.max`, `persistence.db.conn.idle.max`, `persistence.db.conn.idle.min`

**Bugfixes**
* Fixed #53: Query parser not Unicode aware.
* Fixed #52: Generating FeatureOfInterest did not work for Things with multiple Location entities when some of these entities were not geoJSON.
* Fixed the 'year' function not working on interval properties.


# Release Version 1.6
Version 1.6 was released on 2018-05-09.

**New Features**
* User-defined-ids. FROST-Server can not be configured to allow the user to specify the id of created enitites.
The new setting `persistence.idGenerationMode` has three allowed values:
* `ServerGeneratedOnly`: No client defined ids allowed, database generates ids.
* `ServerAndClientGenerated`: Both, server and client generated ids, are allowed.
* `ClientGeneratedOnly`: Client has to provide @iot.id to create entities.

Thanks to Marcel Köpke for the patch.
* Improved time handling in queries. FROST-Server can now calculate with times:

```/Observations?$filter=phenomenonTime gt now() sub duration'P1D' mul Datastream/properties/days```

* Separated the MQTT and HTTP parts of the server.
The MQTT and HTTP parts of the server are now separated in to stand-alone programs:
* FROST-Server.HTTP: contains a web-app handling the HTTP part of the server.
* FROST-Server.MQTT: contains a java application handling the MQTT part of the server.
* FROST-Server.MQTTP: contains a web-app combining HTTP and MQTT, like it was before.

There can be multiple MQTT and HTTP instances using the same database, to allow for horizontal
scaling on a cloud infrastructure. The instances communicate over a pluggable message bus.
* There are now three docker images:
* The stand-alone HTTP package: fraunhoferiosb/frost-server-http.
* The stand-alone MQTT package: fraunhoferiosb/frost-server-mqtt.
* The all-in-one package: fraunhoferiosb/frost-server.

An example configuration for docker-compose can be found as docker-compose-separated.yaml,
that shows how the HTTP and MQTT packages can be started separately, with an MQTT message bus
for communication between the HTTP and MQTT instances.
* All configuration parameters can now be overridden using environment variables.

**Bugfixes**
* Fixed service prefix in default config file.
* Fixed Tomcat breaking selfLinks for ids that are URLs.
* Fixed $select not working for @iot.id, in MQTT.
* Fixed #48: creation in Observations in MultiDatastreams using DataArray formatting fails.


# Release Version 1.5
Version 1.5 was released on 2018-02-15.
Expand Down
59 changes: 46 additions & 13 deletions FROST-Server.Core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>de.fraunhofer.iosb.ilt.FROST-Server</groupId>
<artifactId>FROST-ServerParent</artifactId>
<version>1.6-SNAPSHOT</version>
<version>1.9-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>FROST-Server.Core</artifactId>
Expand Down Expand Up @@ -55,20 +55,35 @@
<artifactId>slf4j-api</artifactId>
<version>${slf4j-api.version}</version>
</dependency>
<dependency>
<groupId>org.eclipse.paho</groupId>
<artifactId>org.eclipse.paho.client.mqttv3</artifactId>
<version>${paho.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javacc-maven-plugin</artifactId>
<version>2.6</version>
<version>${javacc-maven-plugin.version}</version>
<executions>
<execution>
<id>jjtree-javacc</id>
Expand All @@ -81,14 +96,14 @@
<dependency>
<groupId>net.java.dev.javacc</groupId>
<artifactId>javacc</artifactId>
<version>6.1.2</version>
<version>${javacc.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
Expand All @@ -97,18 +112,10 @@
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<version>${maven-dependency-plugin.version}</version>
<executions>
<execution>
<phase>validate</phase>
Expand All @@ -130,6 +137,32 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>${git-commit-id-plugin.version}</version>
<executions>
<execution>
<id>get-the-git-infos</id>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<dotGitDirectory>${project.basedir}/../.git</dotGitDirectory>
<prefix>git</prefix>
<verbose>false</verbose>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
<generateGitPropertiesFilename>${project.build.outputDirectory}/git.json</generateGitPropertiesFilename>
<format>json</format>
<gitDescribe>
<skip>false</skip>
<always>false</always>
<dirty>-dirty</dirty>
</gitDescribe>
</configuration>
</plugin>
</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,7 @@ public void setDataArray(List<List<Object>> dataArray) {

@Override
public int hashCode() {
int hash = 7;
hash = 29 * hash + Objects.hashCode(this.datastream);
hash = 29 * hash + Objects.hashCode(this.multiDatastream);
hash = 29 * hash + Objects.hashCode(this.components);
hash = 29 * hash + Objects.hashCode(this.dataArray);
return hash;
return Objects.hash(datastream, multiDatastream, components, dataArray);
}

@Override
Expand All @@ -133,10 +128,7 @@ public boolean equals(Object obj) {
if (!Objects.equals(this.components, other.components)) {
return false;
}
if (!Objects.equals(this.dataArray, other.dataArray)) {
return false;
}
return true;
return Objects.equals(this.dataArray, other.dataArray);
}

public static String dataArrayIdFor(Observation observation) {
Expand Down
Loading

0 comments on commit b62910d

Please sign in to comment.