From 5f4f18b5b601add0a42ffc40707ef4d91516679e Mon Sep 17 00:00:00 2001 From: Michael Twelkemeier Date: Fri, 5 Apr 2019 09:43:57 +0200 Subject: [PATCH 1/7] Set next develop version 1.1.1-SNAPSHOT --- camunda-kafka-model/pom.xml | 2 +- camunda-kafka-polling-client/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/camunda-kafka-model/pom.xml b/camunda-kafka-model/pom.xml index d764e31..09b0985 100755 --- a/camunda-kafka-model/pom.xml +++ b/camunda-kafka-model/pom.xml @@ -7,7 +7,7 @@ de.viadee.camunda camunda-kafka-polling-client-parent - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT ../pom.xml diff --git a/camunda-kafka-polling-client/pom.xml b/camunda-kafka-polling-client/pom.xml index d657858..0fccf04 100755 --- a/camunda-kafka-polling-client/pom.xml +++ b/camunda-kafka-polling-client/pom.xml @@ -6,7 +6,7 @@ de.viadee.camunda camunda-kafka-polling-client-parent - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT ../pom.xml diff --git a/pom.xml b/pom.xml index 1547824..715e323 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.viadee.camunda camunda-kafka-polling-client-parent - 1.1.0-SNAPSHOT + 1.1.1-SNAPSHOT pom From c7277e5e36ab43d1ddc55df9e520c4e244e6df9c Mon Sep 17 00:00:00 2001 From: Michael Twelkemeier Date: Fri, 26 Apr 2019 16:03:45 +0200 Subject: [PATCH 2/7] Fix docker hub build badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6af24d4..761fc30 100755 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause) [![Status](https://travis-ci.org/viadee/camunda-kafka-polling-client.svg?branch=master)](https://travis-ci.org/viadee/camunda-kafka-polling-client/branches "See test builds") [![Sonarcloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=de.viadee.camunda:camunda-kafka-polling-client-parent&metric=coverage)](https://sonarcloud.io/dashboard?id=de.viadee.camunda:camunda-kafka-polling-client-parent) -[![](https://img.shields.io/docker/automated/viadee/camunda-kafka-polling-client.svg)](https://cloud.docker.com/u/viadee/repository/docker/viadee/camunda-kafka-polling-client) +![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/viadee/camunda-kafka-polling-client.svg) [![Maven Central](https://img.shields.io/maven-central/v/de.viadee.camunda/camunda-kafka-polling-client-parent.svg)](https://search.maven.org/search?q=g:de.viadee.camunda%20a:camunda-kafka-polling-client-parent) The Polling Client is a useful tool for the extraction of Camunda process data and their permanent storage in Apache Kafka. As such it is used in the projects [bpmn.ai](https://github.com/viadee/bpmn.ai) or [vPW](https://www.viadee.de/business-process-management/process-warehouse), that aim to open up standard process data for data mining and exploration. From d63743766721857cd0739e17d4638778939c0ec6 Mon Sep 17 00:00:00 2001 From: Michael Twelkemeier Date: Mon, 6 May 2019 14:53:25 +0200 Subject: [PATCH 3/7] #30 Adjust docker image structure to remove permission issues --- Dockerfile | 25 +++++++++++++++++++++---- README.md | 6 ++++++ camunda-kafka-polling-client/pom.xml | 24 ++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 4 deletions(-) mode change 100644 => 100755 Dockerfile diff --git a/Dockerfile b/Dockerfile old mode 100644 new mode 100755 index 8cd574f..ffc0c5c --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,24 @@ FROM openjdk:8-alpine -RUN addgroup -g 1000 -S appuser && adduser -u 1000 -S appuser -G appuser && \ - mkdir -p /data && chown appuser:appuser /data + +RUN addgroup -g 1000 -S appuser && \ + adduser -u 1000 -S appuser -G appuser && \ + mkdir -p /app && \ + mkdir -p /data + +ARG APP_COMPONENT_DIR=camunda-kafka-polling-client/target/dependency + +COPY ${APP_COMPONENT_DIR}/BOOT-INF/lib /app/lib +COPY ${APP_COMPONENT_DIR}/BOOT-INF/classes /app/bin +COPY ${APP_COMPONENT_DIR}/META-INF /app/bin/META-INF + +RUN chown -R appuser:appuser /app && \ + chown -R appuser:appuser /data && \ + find /app -type d -exec chmod 550 {} + && \ + find /app -type f -exec chmod 660 {} + && \ + chmod 770 /data + VOLUME /data USER appuser -COPY camunda-kafka-polling-client/target/camunda-kafka-polling-client.jar app.jar -ENTRYPOINT ["/usr/bin/java", "-jar", "/app.jar"] + +WORKDIR /data +ENTRYPOINT ["/usr/bin/java", "-cp", "/app/bin:/app/lib/*", "de.viadee.camunda.kafka.pollingclient.PollingClientApplication"] diff --git a/README.md b/README.md index 6af24d4..2eb534f 100755 --- a/README.md +++ b/README.md @@ -64,6 +64,12 @@ There are several tags available on [docker hub](https://hub.docker.com/r/viadee * `latest` is build from `master` branch. Thus, the tag normally reflects the latest release version. * `snapshot` is build from `develop` branch and provides the current development version for development and testing use. +## Extending Docker Image +All data is stored in `/data`. This is also the working directory and the only directory with write permissions. + +All JAR files available in `/app/lib` are included in applications classpath. Adding e.g. an additional jdbc +driver can thus be done by just adding the driver library to `/app/lib`. + ## Collaboration The project is operated and further developed by the viadee Consulting AG in Münster, Westphalia. diff --git a/camunda-kafka-polling-client/pom.xml b/camunda-kafka-polling-client/pom.xml index 0fccf04..3644c15 100755 --- a/camunda-kafka-polling-client/pom.xml +++ b/camunda-kafka-polling-client/pom.xml @@ -285,6 +285,30 @@ + + org.apache.maven.plugins + maven-dependency-plugin + + + + unpack + package + + unpack + + + + + ${project.groupId} + ${project.artifactId} + ${project.version} + + + + + + + org.apache.maven.plugins maven-deploy-plugin From cffa70f87745ffa3aa224c9feec4442b4359d9f1 Mon Sep 17 00:00:00 2001 From: jfriedenstab Date: Mon, 13 May 2019 16:05:29 +0200 Subject: [PATCH 4/7] #31 Fix data source auto configuration --- .../PollingClientApplication.java | 9 +++------ .../CamundaJdbcPollingConfiguration.java | 18 ++++++++++-------- .../CamundaRestPollingConfiguration.java | 5 +++++ 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/PollingClientApplication.java b/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/PollingClientApplication.java index 59b6b2e..31b056d 100755 --- a/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/PollingClientApplication.java +++ b/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/PollingClientApplication.java @@ -1,20 +1,17 @@ package de.viadee.camunda.kafka.pollingclient; -import de.viadee.camunda.kafka.pollingclient.config.properties.ApplicationProperties; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.scheduling.annotation.EnableScheduling; +import de.viadee.camunda.kafka.pollingclient.config.properties.ApplicationProperties; + /** - * DataSourceAutoConfiguration is disabled, since data source must not be configured if using rest. Thus data source - * auto configuration is enabled when using jdbc polling mode by polling configuration. - * * @author viadee * @version $Id: $Id */ -@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) +@SpringBootApplication @EnableScheduling @EnableConfigurationProperties(ApplicationProperties.class) public class PollingClientApplication { diff --git a/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaJdbcPollingConfiguration.java b/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaJdbcPollingConfiguration.java index 3d859b6..effefc3 100755 --- a/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaJdbcPollingConfiguration.java +++ b/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaJdbcPollingConfiguration.java @@ -1,17 +1,20 @@ package de.viadee.camunda.kafka.pollingclient.config; -import de.viadee.camunda.kafka.pollingclient.config.properties.CamundaJdbcPollingProperties; -import de.viadee.camunda.kafka.pollingclient.service.polling.PollingService; -import de.viadee.camunda.kafka.pollingclient.service.polling.jdbc.CamundaJdbcPollingServiceImpl; -import org.camunda.bpm.engine.*; -import org.springframework.boot.autoconfigure.ImportAutoConfiguration; -import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; +import javax.sql.DataSource; + +import org.camunda.bpm.engine.HistoryService; +import org.camunda.bpm.engine.ProcessEngine; +import org.camunda.bpm.engine.ProcessEngineConfiguration; +import org.camunda.bpm.engine.RepositoryService; +import org.camunda.bpm.engine.TaskService; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile; -import javax.sql.DataSource; +import de.viadee.camunda.kafka.pollingclient.config.properties.CamundaJdbcPollingProperties; +import de.viadee.camunda.kafka.pollingclient.service.polling.PollingService; +import de.viadee.camunda.kafka.pollingclient.service.polling.jdbc.CamundaJdbcPollingServiceImpl; /** *

@@ -22,7 +25,6 @@ * @version $Id: $Id */ @Configuration -@ImportAutoConfiguration(DataSourceAutoConfiguration.class) @EnableConfigurationProperties(CamundaJdbcPollingProperties.class) @Profile("jdbc") public class CamundaJdbcPollingConfiguration { diff --git a/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaRestPollingConfiguration.java b/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaRestPollingConfiguration.java index c36c5d5..0595b95 100755 --- a/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaRestPollingConfiguration.java +++ b/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaRestPollingConfiguration.java @@ -3,6 +3,9 @@ import de.viadee.camunda.kafka.pollingclient.config.properties.CamundaRestPollingProperties; import de.viadee.camunda.kafka.pollingclient.service.polling.PollingService; import de.viadee.camunda.kafka.pollingclient.service.polling.rest.CamundaRestPollingServiceImpl; + +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -17,12 +20,14 @@ *

* CamundaRestPollingConfiguration class. *

+ * {@link DataSourceAutoConfiguration} is disabled, since data source must not be configured if using rest. * * @author viadee * @version $Id: $Id */ @Configuration @EnableConfigurationProperties(CamundaRestPollingProperties.class) +@EnableAutoConfiguration(exclude = DataSourceAutoConfiguration.class) @Profile("rest") public class CamundaRestPollingConfiguration { From e3036652397181d6651fd6e1355e0bb5e12e9d9c Mon Sep 17 00:00:00 2001 From: jfriedenstab Date: Mon, 13 May 2019 16:15:56 +0200 Subject: [PATCH 5/7] Disable Camunda metrics reporting when running with jdbc profile (polling client should be read-only) --- .../config/CamundaJdbcPollingConfiguration.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaJdbcPollingConfiguration.java b/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaJdbcPollingConfiguration.java index effefc3..76b1c36 100755 --- a/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaJdbcPollingConfiguration.java +++ b/camunda-kafka-polling-client/src/main/java/de/viadee/camunda/kafka/pollingclient/config/CamundaJdbcPollingConfiguration.java @@ -7,6 +7,7 @@ import org.camunda.bpm.engine.ProcessEngineConfiguration; import org.camunda.bpm.engine.RepositoryService; import org.camunda.bpm.engine.TaskService; +import org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; @@ -71,12 +72,15 @@ public PollingService pollingService(HistoryService historyService, RepositorySe */ @Bean public ProcessEngine processEngine(DataSource dataSource) { - return ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration() - .setDataSource(dataSource) - .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE) - .setJobExecutorActivate(false) - .setHistory(camundaJdbcPollingProperties.getHistoryLevel()) - .buildProcessEngine(); + ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration() + .setDataSource(dataSource) + .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_FALSE) + .setJobExecutorActivate(false) + .setHistory(camundaJdbcPollingProperties.getHistoryLevel()) + .buildProcessEngine(); + ProcessEngineConfigurationImpl configuration = (ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration(); + configuration.setMetricsEnabled(false); + return processEngine; } /** From eae664f4ce2c603b9d785a277686c87dc39fdde3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frank=20K=C3=B6hne?= Date: Tue, 28 May 2019 11:47:55 +0200 Subject: [PATCH 6/7] Dep. maintenance (jackson, spring-boot). Jackson 2.9.8 has a security vulnerability: https://nvd.nist.gov/vuln/detail/CVE-2019-12086 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 715e323..c665086 100755 --- a/pom.xml +++ b/pom.xml @@ -21,10 +21,10 @@ 1.8 1.8 - 2.1.3.RELEASE + 2.1.5.RELEASE 7.10.0 1.0.0 - 2.9.8 + 2.9.9 42.2.5 5.4.0 2.25.0 From c6e8cb3cc609f7d2ba0d1cb24da0106faec7f3f2 Mon Sep 17 00:00:00 2001 From: Michael Twelkemeier Date: Fri, 7 Jun 2019 09:22:15 +0200 Subject: [PATCH 7/7] Update version (1.1.1) for release --- camunda-kafka-model/pom.xml | 2 +- camunda-kafka-polling-client/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/camunda-kafka-model/pom.xml b/camunda-kafka-model/pom.xml index 09b0985..395754a 100755 --- a/camunda-kafka-model/pom.xml +++ b/camunda-kafka-model/pom.xml @@ -7,7 +7,7 @@ de.viadee.camunda camunda-kafka-polling-client-parent - 1.1.1-SNAPSHOT + 1.1.1 ../pom.xml diff --git a/camunda-kafka-polling-client/pom.xml b/camunda-kafka-polling-client/pom.xml index 3644c15..4f8a1a9 100755 --- a/camunda-kafka-polling-client/pom.xml +++ b/camunda-kafka-polling-client/pom.xml @@ -6,7 +6,7 @@ de.viadee.camunda camunda-kafka-polling-client-parent - 1.1.1-SNAPSHOT + 1.1.1 ../pom.xml diff --git a/pom.xml b/pom.xml index c665086..9ce28e1 100755 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ de.viadee.camunda camunda-kafka-polling-client-parent - 1.1.1-SNAPSHOT + 1.1.1 pom