Closed andtan91 closed 1 year ago
for testing or production ?
What exactly do you mean for testing? For myself, I'd use the swarm setup for both testing and production environments.
Noticed there are some compose files under /tests/compose
that I think arrange a Pulsar cluster, but use test images. Can this be adapted to use production images?
I've managed to get a cluster working with Docker Swarm by adapting the instructions from the bare metal cluster deployment outlined here in the official documentation.
There are 4 stacks defined with compose files, and are brought up in the natural order:
pulsar-zookeeper.yml
pulsar-metadata.yml
pulsar-bookies.yml
pulsar-brokers.yml
The source code can be found in the upload zip: pulsar-docker-swarm.zip
I'd appreciate any feedback, questions, or comments.
I'm hoping this can be developed further and soon be put up as official documentation. A few goals of mine with this setup in the future are:
Anything to help make deployment more convenient and production ready.
pulsar-metadata.yml:
Instead of hardcode each node; use swarm service name (note changes to pulsar-brokers.yml below):
--web-service-url http://broker:8080 --broker-service-url pulsar://broker:6650
pulsar-bookies.yml:
Instead of repeating bookie, use replicas instead
bookie: image: apachepulsar/pulsar command: > /bin/bash -c "bin/apply-config-from-env.py conf/bookkeeper.conf && bin/pulsar bookie" networks:
pulsar-brokers.yml:
Should expose 6650/8080 for ingestion
broker: image: apachepulsar/pulsar command: > /bin/bash -c "bin/apply-config-from-env.py conf/broker.conf && bin/pulsar broker" networks:
Closed as stale. Please open a new issue if it's still relevant in maintained versions.
We have the docker image so this is possible. But two years later there's little interest on implementing this feature among the community. If an optional improvement doesn't have a concrete proposal and no contributor works on it, it's valueless to keep it open.
通过调整官方文档中概述的裸机集群部分的说明,我已经设计方法让集群与 Docker Swarm 一起工作。
使用compose 文件确定了4个堆垛,并按自然顺序排列:
pulsar-zookeeper.yml
pulsar-metadata.yml
pulsar-bookies.yml
pulsar-brokers.yml
源代码可以在上传的zip中找到:pulsar-docker-swarm.zip
如果有任何反应、问题或意见,我将不胜感激。
I used version 2.11.0 of pulsar and encountered an issue at this time. When deploying meta.yml, I was unable to successfully create it.
Would be a nice feature to have support and documentation for deploying a cluster with Docker Swarm.