0

I am able to run apache-pulsar standalone in local machine as docker container.

docker-compose.yml

pulsar-standalone:
    image: apachepulsar/pulsar
    ports:
      - "8080:8080"
      - "6650:6650"
    expose:
      - 8080
      - 6650
    environment:
      - PULSAR_MEM=" -Xms512m -Xmx512m -XX:MaxDirectMemorySize=1g"
    command: >
      /bin/bash -c
      "bin/apply-config-from-env.py conf/standalone.conf
      && bin/pulsar standalone"

Can anyone let me know how I can run multi broker setup for the same?

Thanks!

RATTLESNAKE
  • 3,218
  • 2
  • 21
  • 24

2 Answers2

2

Based on @Sergii's answer, I created a docker-compose file above in a manner similar to the kafka stack depoyment.

The necessary configuration and yaml can be found in this repo

This is a single pulsar cluster setup containing:

  1. 3 node ZooKeeper cluster
  2. 3 node BookKeeper cluster
  3. 2 Pulsar broker nodes
  4. 1 Pulsar proxy to allow access to pulsar from outside the docker-compose setup.

The setup uses apachepulsar/pulsar:2.4.1 docker image.

ConfusedSoul
  • 67
  • 1
  • 8
0

My assumption is that by "multi-broker setup" you mean Pulsar cluster. It is needed a bit more than a couple of brokers to achieve this goal. To create a Pulsar cluster the following tasks should be completed:

  • Deploy ZooKeeper cluster

  • Initialize Cluster metadata

  • Deploy BookKeeper cluster

  • (Finally) Deploy one or more Pulsar brokers

I am not aware of any existing docker-compose configurations to deploy a Pulsar cluster, but there a plenty of options to deploy in Kubernetes. For testing on a local machine, it is possible to start a Pulsar cluster in minikube using helm.

Sergii Zhevzhyk
  • 4,074
  • 22
  • 28