Skip to content

Commit

Permalink
3.2 zeebe 8.5 (#134)
Browse files Browse the repository at this point in the history
Spring boot 3.3 / Camunda 8.5
  • Loading branch information
pierre-yves-monnet authored Aug 12, 2024
1 parent 59e7713 commit 7bd712c
Show file tree
Hide file tree
Showing 66 changed files with 1,198 additions and 1,128 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ buildNumber.properties
/cherry.*.db
/localstorage/classloader/*
/localstorage/upload/*
/docker/diskmonitor/
/docker/connectorruntime/
/localstorage/upload/
14 changes: 11 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# docker build -t zeebe-cherry-officepdf:1.0.0 .
# docker build -t zeebe-cherry:1.0.0 .
FROM openjdk:17-alpine
EXPOSE 9081
COPY target/zeebe-cherry-runtime-*-exec.jar /app.jar
ENTRYPOINT ["java","-jar","/app.jar"]
COPY target/zeebe-cherry-runtime-*-exec.jar /zeebe-cherry-runtime.jar
COPY pom.xml /pom.xml

# Create a directory
RUN mkdir -p /localstorage
RUN mkdir -p /localstorage/uploadpath
RUN mkdir -p /localstorage/classloader
WORKDIR /

ENTRYPOINT ["java","-jar","/zeebe-cherry-runtime.jar"]

80 changes: 69 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,28 @@
# What is the Cherry Runtime?

The Cherry Runtime is dedicated to executing Camunda 8 Connectors and Workers.
It provides administrative pages to administrators and business developers.

It provides
* Administrative pages
* to monitor the activity of connectors/workers: speed, number of execution
* To stop/restart the execution

* A connector can be uploaded
* From the UI,
* From a shared folder
* Download it from the marketplace or a GitHub repository (soon)

* Element template can be downloaded

* A farm of runtime, all are managed from one single page

![Cherry Runtime Overview](doc/images/architecture.png)

The Cherry runtime accepts any OUTBOUND connector. The definition can be downloaded from the MarketPlace or any GitHub repository (SOON).
It provides an Administrator page where
* a connector can be stop/start
* execution statistics are available to size the cluster: Are multiple runtimes necessary to handle the load?
The Cherry runtime accepts any OUTBOUND connector.


This documentation gives information:
* for administrators to start and administrate a Collection
* for administrators to start and administrate connector
* for BPM Designer, to access documentation and download Element-Template in your modeler
* For developers, which information can be added during the development, to propose more information for administrators and BPM Designer

Expand All @@ -32,6 +42,8 @@ What do you need to do to start the runtime?

Check the [Installation guide](doc/InstallationGuide/README.md) for more information.

Check the [Administration guide.md](doc/AdministrationGuide%2FREADME.md) for an explanation of the functions available.

In a short overview, to enable a Cherry runtime in your cluster:

## Download the application
Expand All @@ -53,15 +65,15 @@ Check the [application.yaml](src/main/resources/application.yaml) file to see al
It is possible to pass parameters as a variable, for example.

``
environment:
Environment:
- ZEEBE_CLIENT_BROKER_GATEWAY_ADDRESS=zeebe:26500
``
To connect a local engine in the same cluster.

An H2 database is configured by default to save information. Use a SQL database for a robust database.
Looks [docker-compose-cherry-postgres.yaml](docker-cherry/docker-compose-cherry-postgres.yaml) to see an example.

Using an SQL database allows you to configure not only one Cherry pod but a farm of pods. Each pod accesses the same database, and through Connectors, statistics are shared between all pots.
Using an SQL database allows you to configure one Cherry pod and a farm of pods. Each pod accesses the same database, and statistics are shared between all pots through connectors.

## Start the application

Expand All @@ -82,7 +94,7 @@ Connect to the Administration page and navigate to the `Content` page. Upload a
# BPMN Designer
Connectors can be accessible via the Cherry `Definition` page.

Multiple functions are available if the connectors come from the marketplace or implement the Cherry additional methods.
Multiple functions are available if the connectors come from the marketplace or additional Cherry methods are implemented.

## Documentation

Expand Down Expand Up @@ -143,7 +155,7 @@ Because the library contains Java and React script, to deploy it, the machine mu
run: CI=false mvn --batch-mode --update-snapshots package
`````
CI=false, else any warning will stop the construction.
CI=false; otherwise, any warning will stop the construction.
The docker image is then available in the package
`https://github.com/camunda-community-hub/zeebe-cherry-runtime/pkgs/container/zeebe-cherry-runtime`
Expand All @@ -153,7 +165,7 @@ The docker image is then available in the package


# Build
The project is configured to publish the JAR file automatically to Maven Central and to docker package a Docker image.
The project is configured to publish the JAR file automatically to Maven Central and docker package a Docker image.

If you want to build a local maven image, use

Expand All @@ -167,3 +179,49 @@ See .github/workflows/mvn-release.yml

Visit
https://github.com/camunda-community-hub/community-action-maven-release/tree/main


## Deploy manually the image

Rebuilt the image via
````
mvn clean install
mvn springboot:build-image
````

The docker image is built using the Dockerfile present on the root level.


Push the image to
```
ghcr.io/camunda-community-hub/zeebe-cherry-runtime:
```
## Detail
Run command
````
mvn clean install
````
Now, create a docker image.
````
docker build -t pierre-yves-monnet/zeebe-cherry-runtime:3.2.0 .
````
Push the image to the Camunda hub (you must be login first to the docker registry)
````
docker tag pierre-yves-monnet/zeebe-cherry-runtime:3.2.0 ghcr.io/camunda-community-hub/zeebe-cherry-runtime:3.2.0
docker push ghcr.io/camunda-community-hub/zeebe-cherry-runtime:3.2.0
````
Tag as the latest:
````
docker tag pierre-yves-monnet/zeebe-cherry-runtime:3.2.0 ghcr.io/camunda-community-hub/zeebe-cherry-runtime:latest
docker push ghcr.io/camunda-community-hub/zeebe-cherry-runtime:latest
````
Check on
https://github.com/camunda-community-hub/zeebe-cherry-runtime/pkgs/container/process-execution-automator
18 changes: 18 additions & 0 deletions doc/AdministrationGuide/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Administrator guide
the purpose of this document is a guide for the administrator

# Dashboard

# Definition

# Secrets

# Content

# Store

# Log

# Parameters


Binary file not shown.
62 changes: 0 additions & 62 deletions doc/CreateMyCollection/README.md

This file was deleted.

30 changes: 6 additions & 24 deletions doc/DeveloperGuide/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ The connector pattern embed the Connector SDK

In the next part of the documentation, we use the term of **Runner**. A Runner is a Connector or a Worker.

## Tutorial

Check the [Tutorial](../Tutorial/README.md) chapter to see how to create a connector / worker.



## Connector or Worker?

Expand Down Expand Up @@ -41,32 +41,14 @@ To take advantage of the different tool, two abstract class are present in the l

* The `AbstractWorker` is the second abstract class.

# Develop a connector

# Develop a worker

## Principle
Let's create a new runner in your project. In order to keep the project consistent, some view rules has to be followed.
The model is the collection message (``org.camunda.cherry.message``), and the worker ``SendMessageWorker``.

- The first level of the Cherry project is the collection name. Your connector must be attached in a collection, and may be under a sub collection.
A collection is a package. For example, the runner ``SendMessage`` is under the collection ``message``.

- The worker must be suffixed by the name ``Worker``, a connector by the name ``Connector``.
Example: Package is ``org.camunda.cherry.message``, class is ``SendMessageWorker``.
If this class need another class, it can be saved under the same package, or under a sub package.

- type name Convention: type should start by ``v-<collectionName>-`` to identify a Cherry connector and don't mixup with different connectors.
It must follow the snake case convention (https://en.wikipedia.org/wiki/Snake_case)
Example: ``c-message-send``.
# Add Cherry methods
This part works for connector and worker.

- README in each collection. This file explains all runners present in the collection. For each runner, this information has to be fulfilled:
- the runner name
- a description
- the type
- Inputs
- Outputs
- Errors the runner can throw.

# Reference guide


## Input declaration
Expand Down
60 changes: 40 additions & 20 deletions doc/InstallationGuide/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,48 @@
# Installation guide
The purpose of this document is to explain how to install the Runtime.


## Introduction
# Introduction
the purpose of this document is to explain how to install and execute the runtime. The target audience are the administrators.

The runtime is available in multiple forms.

* A GitHub project (this project). The repository can produce the different artefact or can be run directly

* A Docker image. The docker image is accessible via the Docker repository or can be built from the project.

The docker image is used in the docker-compose, and the Kubernetes installation.

The runtime accept new connectors / workers. They come from a JAR file.

The runtime accepts multiple way to upload them:
* Start the runtime. Access the Administration page, section `content`, and upload the JAR file. The Cherry runtime saved the JAR in a database, and it will be started if you stop / restart the runtime.

* Start the runtime. Access the Administration page, section `Store`. Upload the JAR file. It is saved in the local database, and wil be started if you stop / restart the runtime

* share (mount) a PVC with the runtime. Place in this PVC all connectors / worker JAR. At the beginning, the Cherry Runtime check the PVC, and any JAR or new version is uploaded in the database. This does not require any manual intervention
Check the section "Load connectors and workers at startup from a PVC"

* in the configuration, update the variable `ConnectorsAtStartup`. The MarketPlace is contacted, and connectors are downloaded. This does not require any manual intervention.
Visit the section "Load Connectors from MarketPlace"




The Cherry runtime comes with some Runners.
You can start it as it is, and then upload any connectors or workers in the runtime.
# From a docker-compose

You can find some collection available on the community (PDF, CMIS). You can start directly each collections, or you can download the JAR file and upload it in a runtime.
Visit [Docker Compose Installation](..%2F..%2Fdocker%2FREADME.md). This folder contains a H2 and a Postgres execution.

## Different packages
# Kubernetes Cluster

# Locally in a development environment

The runtime is available in multiple forms.

* A GitHub project (this project). The repository can produce the different artefact or can be run directly

* A Docker image. The docker image is accessible via the Docker repository or can be built from the project.


## Start from the project

Clone the project on your machine, or download it as a ZIP. When the project is on your machine, start it via:
Expand All @@ -40,7 +64,7 @@ java -jar .\target\zeebe-cherry-runtime-<version>-exec.jar
````
Note: you need to replace the version by the correct value. Check the current value by listing the contents of the directory

## Start from the docker image
## Create your docker image

Note: you may want to specify the Zeebe connection before starting. Check the next item.

Expand Down Expand Up @@ -138,7 +162,7 @@ Use this information in the application.properties, and provide the IP address t
zeebe.client.broker.gateway-address=127.0.0.1:26500
````

# Load connectors and workers at startup
# Load connectors and workers at startup from a PVC

The Cherry runtime monitor a path. This path is part of the configuration

Expand All @@ -157,6 +181,14 @@ runtime checks at the startup if the JAR is already loaded and ignores it if thi

Doing this way, it is possible to start a complete runtime, with all the connectors and workers, in a completely automatic way.

TODO: describe an example



# Load Connectors from MarketPlace
TODO


# Database
The runtime use a database to save statistics, state (active/inactive) on connector / worker.
By default, a H2 database is used, for each runtime.
Expand All @@ -180,15 +212,3 @@ For any new driver, the `pom.xml` must be upgraded, and the application must be

Check the `docker-cherry/docker-compose-postgres.yml` example to see a different access.


## Access the Web Application

Access the webapp here: `http://localhost:<portNumber>`.

Currently, there is just a single welcome page that calls the `/cherry/api/runner/list` to show
Runners found in system:

![Dashboard page](./DashboardPage.png?raw=true)

All connectors / Worker available in the runtime are visible. Click on a Runner to access the detail.

Loading

0 comments on commit 7bd712c

Please sign in to comment.