Skip to content

Commit

Permalink
Merge release 1.1.1 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
MTwelkemeier committed Jun 7, 2019
2 parents 3ca69e8 + c6e8cb3 commit a5864d8
Show file tree
Hide file tree
Showing 8 changed files with 85 additions and 30 deletions.
25 changes: 21 additions & 4 deletions Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
@@ -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"]
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion camunda-kafka-model/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>de.viadee.camunda</groupId>
<artifactId>camunda-kafka-polling-client-parent</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
26 changes: 25 additions & 1 deletion camunda-kafka-polling-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>de.viadee.camunda</groupId>
<artifactId>camunda-kafka-polling-client-parent</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -285,6 +285,30 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<!-- unpack spring boot fat jar to allow using its components in docker build -->
<id>unpack</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
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.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;
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;

/**
* <p>
Expand All @@ -22,7 +26,6 @@
* @version $Id: $Id
*/
@Configuration
@ImportAutoConfiguration(DataSourceAutoConfiguration.class)
@EnableConfigurationProperties(CamundaJdbcPollingProperties.class)
@Profile("jdbc")
public class CamundaJdbcPollingConfiguration {
Expand Down Expand Up @@ -69,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;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -17,12 +20,14 @@
* <p>
* CamundaRestPollingConfiguration class.
* </p>
* {@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 {

Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>de.viadee.camunda</groupId>
<artifactId>camunda-kafka-polling-client-parent</artifactId>
<version>1.1.0</version>
<version>1.1.1</version>
<packaging>pom</packaging>

<modules>
Expand All @@ -21,10 +21,10 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>

<spring-boot.version>2.1.3.RELEASE</spring-boot.version>
<spring-boot.version>2.1.5.RELEASE</spring-boot.version>
<camunda.version>7.10.0</camunda.version>
<kafka.version>1.0.0</kafka.version>
<jackson.version>2.9.8</jackson.version>
<jackson.version>2.9.9</jackson.version>
<postgresql.version>42.2.5</postgresql.version>
<junit.version>5.4.0</junit.version>
<mockito.version>2.25.0</mockito.version>
Expand Down

0 comments on commit a5864d8

Please sign in to comment.