Public | Automated Build

Last pushed: 2 years ago
Short Description
Dockerfile for Apache Zookeeper.
Full Description

zookeeper

Multi-node Setup

For this setup, we will need 3 servers with Docker installed on it.

  1. Export out the 3 servers' IP that we will be using on each server

      ZOOKEEPER_HOST_IP_1=192.168.22.82
      ZOOKEEPER_HOST_IP_2=192.168.22.87
      ZOOKEEPER_HOST_IP_3=192.168.22.92
    
  2. Run the ZooKeepers on docker

    On host #1

      docker run -d \
      --net="host" \
      -e SERVER_ID=1 \
      -e ADDITIONAL_ZOOKEEPER_1=server.1=${ZOOKEEPER_HOST_IP_1}:2888:3888 \
      -e ADDITIONAL_ZOOKEEPER_2=server.2=${ZOOKEEPER_HOST_IP_2}:2888:3888 \
      -e ADDITIONAL_ZOOKEEPER_3=server.3=${ZOOKEEPER_HOST_IP_3}:2888:3888 \
      mesosinfo/zookeeper
    

    On host #2

      docker run -d \
      --net="host" \
      -e SERVER_ID=2 \
      -e ADDITIONAL_ZOOKEEPER_1=server.1=${ZOOKEEPER_HOST_IP_1}:2888:3888 \
      -e ADDITIONAL_ZOOKEEPER_2=server.2=${ZOOKEEPER_HOST_IP_2}:2888:3888 \
      -e ADDITIONAL_ZOOKEEPER_3=server.3=${ZOOKEEPER_HOST_IP_3}:2888:3888 \
      mesosinfo/zookeeper
    

    On host #3

      docker run -d \
      --net="host" \
      -e SERVER_ID=3 \
      -e ADDITIONAL_ZOOKEEPER_1=server.1=${ZOOKEEPER_HOST_IP_1}:2888:3888 \
      -e ADDITIONAL_ZOOKEEPER_2=server.2=${ZOOKEEPER_HOST_IP_2}:2888:3888 \
      -e ADDITIONAL_ZOOKEEPER_3=server.3=${ZOOKEEPER_HOST_IP_3}:2888:3888 \
      mesosinfo/zookeeper
    
Docker Pull Command
Owner
mesosinfo
Source Repository