From 52c5ff4d735488d06876710c4ca18b143df22c25 Mon Sep 17 00:00:00 2001 From: Luc Weinbrecht Date: Fri, 18 Oct 2024 11:26:35 +0200 Subject: [PATCH] updated dependencies to camunda 7.22, optimize 3.14 --- .env | 9 ------- camunda-platform-client/build.gradle | 2 +- .../java/de/lw/worker/ExampleTaskHandler.java | 4 +-- .../src/main/resources/application.yml | 2 ++ camunda-platform-server/build.gradle | 6 ++--- .../src/main/resources/application.yml | 4 --- docker-compose.yml | 24 +++++++---------- optimize-environment-config.yaml | 27 +++++++++++++++++++ 8 files changed, 43 insertions(+), 35 deletions(-) delete mode 100644 .env create mode 100644 optimize-environment-config.yaml diff --git a/.env b/.env deleted file mode 100644 index 1bde076..0000000 --- a/.env +++ /dev/null @@ -1,9 +0,0 @@ -# Password for the 'elastic' user (at least 6 characters) -ELASTIC_PASSWORD=password - -# Set to 'basic' or 'trial' to automatically start the 30-day trial -LICENSE=basic -#LICENSE=trial - -# Increase or decrease based on the available host memory (in bytes) -MEM_LIMIT=1073741824 diff --git a/camunda-platform-client/build.gradle b/camunda-platform-client/build.gradle index 7de759c..9e07f37 100644 --- a/camunda-platform-client/build.gradle +++ b/camunda-platform-client/build.gradle @@ -4,7 +4,7 @@ plugins { id("com.google.cloud.tools.jib") version "3.4.0" } -version = "0.2" +version = "0.3" group = "de.lw" repositories { diff --git a/camunda-platform-client/src/main/java/de/lw/worker/ExampleTaskHandler.java b/camunda-platform-client/src/main/java/de/lw/worker/ExampleTaskHandler.java index 6faf471..de24faf 100644 --- a/camunda-platform-client/src/main/java/de/lw/worker/ExampleTaskHandler.java +++ b/camunda-platform-client/src/main/java/de/lw/worker/ExampleTaskHandler.java @@ -7,8 +7,6 @@ import org.camunda.bpm.client.task.ExternalTaskHandler; import org.camunda.bpm.client.task.ExternalTaskService; -import static java.lang.Long.parseLong; - @Slf4j @Singleton @ExternalTaskSubscription(topicName = "exampleWorker") @@ -17,7 +15,7 @@ public class ExampleTaskHandler implements ExternalTaskHandler { @Override public void execute(ExternalTask externalTask, ExternalTaskService externalTaskService) { - boolean shouldBeExecuted = parseLong(externalTask.getId()) % 2 == 0; + boolean shouldBeExecuted = (Math.random() * 49 + 1) % 2 == 0; if (shouldBeExecuted) { externalTaskService.complete(externalTask); diff --git a/camunda-platform-client/src/main/resources/application.yml b/camunda-platform-client/src/main/resources/application.yml index e5bcabc..b7f6647 100644 --- a/camunda-platform-client/src/main/resources/application.yml +++ b/camunda-platform-client/src/main/resources/application.yml @@ -1,4 +1,6 @@ micronaut: + server: + port: 8081 application: name: camunda-platform-client camunda.external-client: diff --git a/camunda-platform-server/build.gradle b/camunda-platform-server/build.gradle index 2ce28a5..2f7f62d 100644 --- a/camunda-platform-server/build.gradle +++ b/camunda-platform-server/build.gradle @@ -4,7 +4,7 @@ plugins { id("com.google.cloud.tools.jib") version "3.4.0" } -version = "0.2" +version = "0.3" group = "de.lw" repositories { @@ -12,7 +12,7 @@ repositories { } dependencies { - implementation("info.novatec:micronaut-camunda-bpm-feature:2.14.0") + implementation("info.novatec:micronaut-camunda-bpm-feature:2.18.1") runtimeOnly("com.h2database:h2") implementation("io.micronaut:micronaut-http-client") @@ -23,7 +23,7 @@ dependencies { runtimeOnly("org.postgresql:postgresql") testImplementation("org.assertj:assertj-core") - testImplementation("org.camunda.bpm:camunda-bpm-assert:7.19.0") + testImplementation("org.camunda.bpm:camunda-bpm-assert:7.22.0") } diff --git a/camunda-platform-server/src/main/resources/application.yml b/camunda-platform-server/src/main/resources/application.yml index 3e1747b..7514946 100644 --- a/camunda-platform-server/src/main/resources/application.yml +++ b/camunda-platform-server/src/main/resources/application.yml @@ -9,10 +9,6 @@ camunda: firstName: Peter last-name: Parker email: peter@parker.com - generic-properties: - properties: - initialize-telemetry: false - telemetry-reporter-activate: false rest: enabled: true webapps: diff --git a/docker-compose.yml b/docker-compose.yml index b6ab453..a7a69a4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,3 @@ -version: "2" services: camunda-platform-server: @@ -12,11 +11,13 @@ services: image: lwluc/camunda-platform-client container_name: camunda-platform-client mem_limit: 512M + environment: + - MICRONAUT_ENVIRONMENTS=docker depends_on: - camunda-platform-server elasticsearch: - image: docker.elastic.co/elasticsearch/elasticsearch:8.6.2 + image: docker.elastic.co/elasticsearch/elasticsearch:8.13.4 container_name: elasticsearch ports: - 9200:9200 @@ -25,13 +26,13 @@ services: environment: - node.name=elasticsearch - discovery.type=single-node - - ELASTIC_PASSWORD=${ELASTIC_PASSWORD} + - ELASTIC_PASSWORD=password - bootstrap.memory_lock=true - xpack.security.enabled=false - xpack.security.http.ssl.enabled=false - xpack.security.transport.ssl.enabled=false - - xpack.license.self_generated.type=${LICENSE} - mem_limit: ${MEM_LIMIT} + - xpack.license.self_generated.type=basic + mem_limit: 1073741824 ulimits: memlock: soft: -1 @@ -47,22 +48,15 @@ services: retries: 120 camunda-optimize: - image: registry.camunda.cloud/optimize-ee/optimize:3.10.5 + image: registry.camunda.cloud/optimize-ee/optimize:3.14.0 mem_limit: 512M environment: - - OPTIMIZE_CAMUNDABPM_REST_URL=http://camunda-platform-server:8080/engine-rest - - OPTIMIZE_ELASTICSEARCH_HOST=elasticsearch - - OPTIMIZE_ELASTICSEARCH_HTTP_PORT=9200 - - OPTIMIZE_ES_SECURITY_USERNAME="elastic" - - OPTIMIZE_ES_SECURITY_PASSWORD=${ELASTIC_PASSWORD} - - OPTIMIZE_EVENT_BASED_PROCESSES_IMPORT_ENABLED=true - - OPTIMIZE_CAMUNDA_BPM_EVENT_IMPORT_ENABLED=true - - OPTIMIZE_EVENT_INGESTION_ACCESS_TOKEN=demo - - OPTIMIZE_EVENT_BASED_PROCESSES_USER_IDS=[admin] + - ABSOLUTE_PATH_ON_HOST_TO_CONFIGURATION_FILE:/optimize/config/environment-config.yaml:ro depends_on: - camunda-platform-server - elasticsearch volumes: + - ./optimize-environment-config.yaml:/optimize/config/environment-config.yaml - ./licenses/OptimizeLicense.txt:/optimize/config/OptimizeLicense.txt:ro restart: always ports: diff --git a/optimize-environment-config.yaml b/optimize-environment-config.yaml new file mode 100644 index 0000000..a0f8eaa --- /dev/null +++ b/optimize-environment-config.yaml @@ -0,0 +1,27 @@ +security: + auth: + token: + secret: demo + superUserIds: [admin] + +engines: + "demo-engine": + rest: "http://camunda-platform-server:8080/engine-rest" + authentication: + enabled: false + webapps: + enabled: false + +es: + connection: + nodes: + - host: elasticsearch + httpPort: 9200 + security: + username: elastic + password: password + +eventBasedProcess: + authorizedUserIds: [admin] + eventImport: + enabled: true \ No newline at end of file