zeebe docker-compose 运行(包含monitor)
环境准备
- docker-compose 文件
version: "3"
services:
db:
image: oscarfonts/h2
container_name: zeebe_db
ports:
- "1521:1521"
- "81:81"
monitor:
image: camunda/zeebe-simple-monitor
environment:
- spring.datasource.url=jdbc:h2:tcp://db:1521/zeebe-monitor
- io.zeebe.monitor.connectionString=app:26500
ports:
- "8080:8080"
app:
image: camunda/zeebe
environment:
- ZEEBE_LOG_LEVEL=debug
volumes:
- ./zeebe-simple-monitor-exporter-0.10.0.jar:/usr/local/zeebe/lib/zeebe-simple-monitor-exporter.jar
- ./zeebe.cfg.toml:/usr/local/zeebe/conf/zeebe.cfg.toml
ports:
- "26500:26500"
- "26501:26501"
- "26502:26502"
- "26503:26503"
- "26504:26504"
- exporter 配置
zeebe.cfg.toml
# Zeebe broker configuration file
# Overview -------------------------------------------
# This file contains a complete list of available configuration options.
# Default values:
#
# When the default value is used for a configuration option, the option is
# commented out. You can learn the default value from this file
# Conventions:
#
# Byte sizes
# For buffers and others must be specified as strings and follow the following
# format: "10U" where U (unit) must be replaced with K = Kilobytes, M = Megabytes or G = Gigabytes.
# If unit is omitted then the default unit is simply bytes.
# Example:
# sendBufferSize = "16M" (creates a buffer of 16 Megabytes)
#
# Time units
# Timeouts, intervals, and the likes, must be specified as strings and follow the following
# format: "VU", where:
# - V is a numerical value (e.g. 1, 1.2, 3.56, etc.)
# - U is the unit, one of: ms = Millis, s = Seconds, m = Minutes, or h = Hours
#
# Paths:
# Relative paths are resolved relative to the installation directory of the
# broker.
# ----------------------------------------------------
[network]
# This section contains the network configuration. Particularly, it allows to
# configure the hosts and ports the broker should bind to. the broker exposes 3
# ports: 1. client: the port on which client (Java, CLI, Go, ...) connections
# are handled 2. management: used internally by the cluster for the gossip
# membership protocol and other management interactions 3. replication: used
# internally by the cluster for replicating data across nodes using the raft
# protocol
# Controls the default host the broker should bind to. Can be overwritten on a
# per binding basis for client, management and replication
#
# This setting can also be overridden using the environment variable ZEEBE_HOST.
# host = "0.0.0.0"
# If a port offset is set it will be added to all ports specified in the config
# or the default values. This is a shortcut to not always specifying every port.
#
# The offset will be added to the second last position of the port, as Zeebe
# requires multiple ports. As example a portOffset of 5 will increment all ports
# by 50, i.e. 26500 will become 26550 and so on.
#
# This setting can also be overridden using the environment variable ZEEBE_PORT_OFFSET.
# portOffset = 0
# Controls the default size of the buffers that are used for buffering outgoing
# messages. Can be overwritten on a per binding basis for client, management and
# replication
# defaultSendBufferSize = "16M"
[network.gateway]
# Enables embedded gateway to start
# enabled = true
#
# Overrides the host the gateway binds to
# host = "localhost"
#
# Sets the port the gateway binds to
# port = 26500
[network.client]
# Allows to override the host the client api binds to
# host = "localhost"
#
# The port the client api binds to
# port = 26501
#
# Overrides the size of the buffer used for buffering outgoing messages to
# clients
# sendBufferSize = "16M"
#
# Sets the size of the buffer used for receiving control messages from clients
# (such as management of subscriptions)
# controlMessageBufferSize = "8M"
[network.management]
# Overrides the host the management api binds to
# host = "localhost"
#
# Sets the port the management api binds to
# port = 26502
#
# Overrides the size of the buffer to be used for buffering outgoing messages to
# other brokers through the management protocols
# sendBufferSize = "16M"
#
# Sets the buffer size used for receiving gossip messages and others
# receiveBufferSize = "8M"
[network.replication]
# Overrides the host the replication api binds to
# host = "localhost"
#
# Sets the port the replication api binds to
# port = 26503
#
# Sets the buffer size used for buffering outgoing raft (replication) messages
# sendBufferSize = "16M"
[network.subscription]
# Overrides the host the subscription api binds to
# host = "localhost"
#
# Sets the port the subscription api binds to
# port = 26504
#
# Overrides the size of the buffer to be used for buffering outgoing messages to
# other brokers through the subscription protocols
# sendBufferSize = "16M"
#
# Sets the buffer size used for receiving subscription messages and others
# receiveBufferSize = "8M"
[data]
# This section allows to configure Zeebe's data storage. Data is stored in
# "partition folders". A partition folder has the following structure:
#
# internal-system-0 (root partition folder)
# ├── partition.json (metadata about the partition)
# ├── segments (the actual data as segment files)
# │ ├── 00.data
# │ └── 01.data
# └── snapshots (snapshot data)
#
# Specify a list of directories in which data is stored. Using multiple
# directories makes sense in case the machine which is running Zeebe has
# multiple disks which are used in a JBOD (just a bunch of disks) manner. This
# allows to get greater throughput in combination with a higher io thread count
# since writes to different disks can potentially be done in parallel.
#
# This setting can also be overridden using the environment variable ZEEBE_DIRECTORIES.
# directories = [ "data" ]
# The default size of data segments.
# defaultSegmentSize = "512M"
# How often we take snapshots of streams (time unit)
# snapshotPeriod = "15m"
# How often follower partitions will check for new snapshots to replicate from
# the leader partitions. Snapshot replication enables faster failover by
# reducing how many log entries must be reprocessed in case of leader change.
# snapshotReplicationPeriod = "5m"
[cluster]
# This section contains all cluster related configurations, to setup an zeebe cluster
# Specifies the unique id of this broker node in a cluster.
# The id should be between 0 and number of nodes in the cluster (exclusive).
#
# This setting can also be overridden using the environment variable ZEEBE_NODE_ID.
# nodeId = 0
# Controls the number of partitions, which should exist in the cluster.
#
# This can also be overridden using the environment variable ZEEBE_PARTITIONS_COUNT.
# partitionsCount = 1
# Controls the replication factor, which defines the count of replicas per partition.
# The replication factor cannot be greater than the number of nodes in the cluster.
#
# This can also be overridden using the environment variable ZEEBE_REPLICATION_FACTOR.
# replicationFactor = 1
# Specifies the zeebe cluster size. This value is used to determine which broker
# is responsible for which partition.
#
# This can also be overridden using the environment variable ZEEBE_CLUSTER_SIZE.
# clusterSize = 1
# Allows to specify a list of known other nodes to connect to on startup
# The contact points of the management api must be specified.
# The format is [HOST:PORT]
# Example:
# initialContactPoints = [ "192.168.1.22:26502", "192.168.1.32:26502" ]
#
# This setting can also be overridden using the environment variable ZEEBE_CONTACT_POINTS
# specifying a comma-separated list of contact points.
#
# Default is empty list:
# initialContactPoints = []
[threads]
# Controls the number of non-blocking CPU threads to be used. WARNING: You
# should never specify a value that is larger than the number of physical cores
# available. Good practice is to leave 1-2 cores for ioThreads and the operating
# system (it has to run somewhere). For example, when running Zeebe on a machine
# which has 4 cores, a good value would be 2.
#
# The default value is 2.
#cpuThreadCount = 2
# Controls the number of io threads to be used. These threads are used for
# workloads that write data to disk. While writing, these threads are blocked
# which means that they yield the CPU.
#
# The default value is 2.
#ioThreadCount = 2
[metrics]
# Path to the file to which metrics are written. Metrics are written in a
# text-based format understood by prometheus.io
# metricsFile = "metrics/zeebe.prom"
# Controls the interval at which the metrics are written to the metrics file
# reportingInterval = "5s"
[gossip]
# retransmissionMultiplier = 3
# probeInterval = "1s"
# probeTimeout = "500ms"
# probeIndirectNodes = 3
# probeIndirectTimeout = "1s"
# suspicionMultiplier = 5
# syncTimeout = "3s"
# syncInterval = "15s"
# joinTimeout = "1s"
# joinInterval = "5s"
# leaveTimeout = "1s"
# maxMembershipEventsPerMessage = 32
# maxCustomEventsPerMessage = 8
[raft]
# heartbeatInterval = "250ms"
# electionInterval = "1s"
# leaveTimeout = "1s"
# Configure exporters below; note that configuration parsing conventions do not apply to exporter
# arguments, which will be parsed as normal TOML.
#
# Each exporter should be configured following this template:
#
# id:
# property should be unique in this configuration file, as it will server as the exporter
# ID for loading/unloading.
# jarPath:
# path to the JAR file containing the exporter class. JARs are only loaded once, so you can define
# two exporters that point to the same JAR, with the same class or a different one, and use args
# to parametrize its instantiation.
# className:
# entry point of the exporter, a class which *must* extend the io.zeebe.exporter.Exporter
# interface.
#
# A nested table as [exporters.args] will allow you to inject arbitrary arguments into your
# class through the use of annotations.
#
# Enable the following exporter to get debug output of the exporter records
#
# [[exporters]]
# id = "debug"
# className = "io.zeebe.broker.exporter.DebugExporter"
# [exporters.args]
# logLevel = "debug"
# prettyPrint = false
#
# An example configuration for the elasticsearch exporter:
#
[[exporters]]
id = "simple-monitor"
className = "io.zeebe.monitor.SimpleMonitorExporter"
[exporters.args]
jdbcUrl = "jdbc:h2:tcp://db:1521/zeebe-monitor"
# The driver name of the jdbc driver implementation. Make sure that the implementation is
# available in the exporter/broker classpath (add it to the broker lib folder).
# The name is used to load the driver implementation like this
# Class.forName(configuration.driverName);
#
driverName = "org.h2.Driver"
userName = "sa"
password = ""
# To configure the amount of records, which has to be reached before the records are exported to
# the database. Only counts the records which are in the end actually exported.
#
# batchSize = 100;
# To configure the time in milliseconds, when the batch should be executed regardless whether the
# batch size was reached or not.
#
#If the value is less then one, then no timer will be scheduled.
#
#batchTimerMilli = 1000
#id = "elasticsearch"
#className = "io.zeebe.exporter.ElasticsearchExporter"
#
# [exporters.args]
# url = "http://localhost:9200"
#
# [exporters.args.bulk]
# delay = 5
# size = 1_000
#
# [exporters.args.index]
# prefix = "zeebe-record"
# createTemplate = true
#
# command = false
# event = true
# rejection = false
#
# deployment = true
# incident = true
# job = true
# message = false
# messageSubscription = false
# raft = false
# workflowInstance = true
# workflowInstanceSubscription = false
- export
可以从github 下载,或者直接使用我项目的jar 包
运行
- 启动
docker-compose up -d
- 效果
monitor UI
- 部署一个简单流程
flow 内容如下:
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:zeebe="http://camunda.org/schema/zeebe/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="1.5.0-nightly">
<bpmn:process id="demoProcess" isExecutable="true">
<bpmn:startEvent id="start" name="start">
<bpmn:outgoing>SequenceFlow_1sz6737</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_1sz6737" sourceRef="start" targetRef="taskA" />
<bpmn:sequenceFlow id="SequenceFlow_06ytcxw" sourceRef="taskA" targetRef="taskB" />
<bpmn:sequenceFlow id="SequenceFlow_1oh45y7" sourceRef="taskB" targetRef="taskC" />
<bpmn:endEvent id="end" name="end">
<bpmn:incoming>SequenceFlow_148rk2p</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id="SequenceFlow_148rk2p" sourceRef="taskC" targetRef="end" />
<bpmn:serviceTask id="taskA" name="task A">
<bpmn:extensionElements>
<zeebe:taskDefinition type="foo" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1sz6737</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_06ytcxw</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="taskB" name="task B">
<bpmn:extensionElements>
<zeebe:taskDefinition type="bar" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_06ytcxw</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1oh45y7</bpmn:outgoing>
</bpmn:serviceTask>
<bpmn:serviceTask id="taskC" name="task C">
<bpmn:extensionElements>
<zeebe:taskDefinition type="foo" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_1oh45y7</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_148rk2p</bpmn:outgoing>
</bpmn:serviceTask>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="demoProcess">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="start">
<dc:Bounds x="173" y="102" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="180" y="138" width="22" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_1sz6737_di" bpmnElement="SequenceFlow_1sz6737">
<di:waypoint xsi:type="dc:Point" x="209" y="120" />
<di:waypoint xsi:type="dc:Point" x="310" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="260" y="105" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_06ytcxw_di" bpmnElement="SequenceFlow_06ytcxw">
<di:waypoint xsi:type="dc:Point" x="410" y="120" />
<di:waypoint xsi:type="dc:Point" x="502" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="456" y="105" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1oh45y7_di" bpmnElement="SequenceFlow_1oh45y7">
<di:waypoint xsi:type="dc:Point" x="602" y="120" />
<di:waypoint xsi:type="dc:Point" x="694" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="648" y="105" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="EndEvent_0gbv3sc_di" bpmnElement="end">
<dc:Bounds x="867" y="102" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="876" y="138" width="18" height="12" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_148rk2p_di" bpmnElement="SequenceFlow_148rk2p">
<di:waypoint xsi:type="dc:Point" x="794" y="120" />
<di:waypoint xsi:type="dc:Point" x="867" y="120" />
<bpmndi:BPMNLabel>
<dc:Bounds x="831" y="105" width="0" height="0" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id="ServiceTask_09m0goq_di" bpmnElement="taskA">
<dc:Bounds x="310" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_0sryj72_di" bpmnElement="taskB">
<dc:Bounds x="502" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ServiceTask_1xu4l3g_di" bpmnElement="taskC">
<dc:Bounds x="694" y="80" width="100" height="80" />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
使用UI 部署,文件后缀应该为bpmn
效果
参考资料
https://zeebe.io/
https://github.com/zeebe-io/zeebe
https://github.com/rongfengliang/zeebe-docker-compose
https://github.com/zeebe-io/zeebe-simple-monitor
zeebe docker-compose 运行(包含monitor)的更多相关文章
- dotnet跨平台 - 使用Nginx+Docker Compose运行.NETCore项目
参考文档: https://docs.docker.com/install/linux/docker-ce/centos/ http://www.dockerinfo.net/document htt ...
- .NET遇上Docker - 使用Docker Compose组织Ngnix和.NETCore运行
本文工具准备: Docker for Windows Visual Studio 2015 与 Visual Studio Tools for Docker 或 Visual Studio 2017 ...
- Docker:Docker Compose 详解
Docker Compose 概述与安装? 前面我们使用 Docker 的时候,定义 Dockerfile 文件,然后使用 docker build.docker run 等命令操作容器.然而微服务架 ...
- 使用 pycharm调试docker环境运行的Odoo
2019日 星期一 安装docker windows系统,参考 docker官方文档 Mac系统,参考 docker官方文档 构建自定义ODOO镜像 标准ODOO镜像可能不包含特别的python模块, ...
- Docker学习笔记 - Docker Compose 脚本命令
Docker Compose 配置文件包含 version.services.networks 三大部分,最关键的是 services 和 networks 两个部分, version: '2' se ...
- [phvia/dkc] Docker Compose 快速构建(LNMP+Node)运行环境
快速构建(LNMP+Node)运行环境. dkc 在此作为 docker-compose 的缩写,你可以理解为 alias dkc=docker-compose 准备 安装 docker 选择1) 从 ...
- 利用 Docker Compose 搭建 SpringBoot 运行环境(超详细步骤和分析)
0.前言 相信点进来看这篇文章的同学们已经对 Docker Dompose 有一定的了解了,下面,我们拿最简单的例子来介绍如何使用 Docker Compose 来管理项目. 本文例子: 一个应用服务 ...
- ASP.NET Core 如何在运行Docker容器时指定容器外部端口(docker compose)
前面我写了一系列关于持续集成的文章,最终构建出来的镜像运行之后,应该会发现每次构建运行之后端口都变了,这对于我们来说是十分不方便的,所以我们可以通过修改docker compose的配置文件来完成我们 ...
- [Docker6] Docker compose多容器运行与管理
六.Docker compose docker compose就是通过yml文件来定义和运行多个容器docker应用程序的工具,三步过程就能跑起一个compose: 定义应用程序的环境(yml中) 定 ...
- 附005.Docker Compose文件详解
一 Docker Compose文件简介 compose文件使用yml格式,主要分为了四个区域: version:用于指定当前docker-compose.yml语法遵循哪个版本 services:服 ...
随机推荐
- win10企业版激活
slmgr.vbs /upk slmgr /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43 slmgr /skms zh.us.to slmgr /ato
- ES6-循环
forEach 方法来遍历数组,不能使用break语句中断循环,也不能使用return语句返回到外层函数 myArray.forEach(function (value) { console.log( ...
- 初识数据库、初识MySQL
一.为什么要用数据库 # 1.将文件和程序存在一台机器上是很不合理的. # 2.操作文件是一件很麻烦的事. 所以就出现了一个新的概念 —— 数据库 你可以理解为 数据库 是一个可以在一台机器上独立工作 ...
- Asp.Net WebApi核心对象解析(一)
生活需要自己慢慢去体验和思考,对于知识也是如此.匆匆忙忙的生活,让人不知道自己一天到晚都在干些什么,似乎每天都在忙,但又好似不知道自己到底在忙些什么.不过也无所谓,只要我们知道最后想要什么就行.不管怎 ...
- .tar.gz 和.tgz 解压
wget {url} 下载 eg: wget http://mirrors.tuna.tsinghua.edu.cn/apache/tomcat/tomcat-8/v8.5.24/bin/apac ...
- fk输入地壳模型容易出错的地方
结束的那一层地壳模型后面不再有空格,否则不会有波形.
- [rancher-net]
ip rule命令 rancher网络全解读 arp命令查询 rancher managed network 实践 docker自定义网桥 iptables增删改查 shell脚本调试技术
- VOOKI:一款免费的Web应用漏洞扫描工具
Vooki是一款免费且用户界面友好的Web应用漏扫工具,它可以轻松地为你扫描任何Web应用并查找漏洞.Vooki主要包括三个部分,Web应用扫描器,Rest API扫描器以及报告.Web应用扫描器V ...
- 框架:MVC
MVC 一.介绍 MVC是模型-视图-控制器的缩写,一种软件思想,强制性的把应用程序的输入.处理和输出分开.可以和任何的重定向能解耦. 三部分的任务说明: 视图:获取数据,显示数据 模型:处理数据 控 ...
- ob 函数的使用
ob 函数的使用1. 页面静态化 $id = isset($_GET['id'])?$_GET['id']-0:0; $filename = "html/".date(" ...