khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 1 | version: '3.7' |
| 2 | services: |
| 3 | zookeeper-1: |
| 4 | image: 'confluentinc/cp-zookeeper:${CONFLUENT_PLATFORM_VERSION:-6.1.1}' |
| 5 | restart: always |
| 6 | environment: |
| 7 | ZOOKEEPER_SERVER_ID: '1' |
| 8 | ZOOKEEPER_SERVERS: 'zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888' |
| 9 | ZOOKEEPER_CLIENT_PORT: '2181' |
| 10 | ZOOKEEPER_PEER_PORT: '2888' |
| 11 | ZOOKEEPER_LEADER_PORT: '3888' |
| 12 | ZOOKEEPER_INIT_LIMIT: '10' |
| 13 | ZOOKEEPER_SYNC_LIMIT: '5' |
| 14 | ZOOKEEPER_MAX_CLIENT_CONNS: '0' |
| 15 | zookeeper-2: |
| 16 | image: 'confluentinc/cp-zookeeper:${CONFLUENT_PLATFORM_VERSION:-6.1.1}' |
| 17 | restart: always |
| 18 | environment: |
| 19 | ZOOKEEPER_SERVER_ID: '2' |
| 20 | ZOOKEEPER_SERVERS: 'zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888' |
| 21 | ZOOKEEPER_CLIENT_PORT: '2181' |
| 22 | ZOOKEEPER_PEER_PORT: '2888' |
| 23 | ZOOKEEPER_LEADER_PORT: '3888' |
| 24 | ZOOKEEPER_INIT_LIMIT: '10' |
| 25 | ZOOKEEPER_SYNC_LIMIT: '5' |
| 26 | ZOOKEEPER_MAX_CLIENT_CONNS: '0' |
| 27 | zookeeper-3: |
| 28 | image: 'confluentinc/cp-zookeeper:${CONFLUENT_PLATFORM_VERSION:-6.1.1}' |
| 29 | restart: always |
| 30 | environment: |
| 31 | ZOOKEEPER_SERVER_ID: '3' |
| 32 | ZOOKEEPER_SERVERS: 'zookeeper-1:2888:3888;zookeeper-2:2888:3888;zookeeper-3:2888:3888' |
| 33 | ZOOKEEPER_CLIENT_PORT: '2181' |
| 34 | ZOOKEEPER_PEER_PORT: '2888' |
| 35 | ZOOKEEPER_LEADER_PORT: '3888' |
| 36 | ZOOKEEPER_INIT_LIMIT: '10' |
| 37 | ZOOKEEPER_SYNC_LIMIT: '5' |
| 38 | ZOOKEEPER_MAX_CLIENT_CONNS: '0' |
| 39 | kafka-1: |
| 40 | image: 'confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-6.1.1}' |
| 41 | restart: always |
| 42 | environment: |
| 43 | KAFKA_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181' |
| 44 | KAFKA_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29091' |
| 45 | KAFKA_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-1:9091,LISTENER_LOCAL://localhost:29091' |
| 46 | KAFKA_INTER_BROKER_LISTENER_NAME: 'LISTENER_INTERNAL' |
| 47 | KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'LISTENER_INTERNAL:PLAINTEXT,LISTENER_LOCAL:PLAINTEXT' |
| 48 | KAFKA_DEFAULT_REPLICATION_FACTOR: '2' |
| 49 | KAFKA_BROKER_ID: '1' |
| 50 | KAFKA_BROKER_RACK: '1' |
| 51 | KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: '3000' |
| 52 | KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: '3000' |
| 53 | KAFKA_REPLICA_SELECTOR_CLASS: 'org.apache.kafka.common.replica.RackAwareReplicaSelector' |
| 54 | KAFKA_DELETE_TOPIC_ENABLE: 'true' |
| 55 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false' |
| 56 | kafka-2: |
| 57 | image: 'confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-6.1.1}' |
| 58 | restart: always |
| 59 | environment: |
| 60 | KAFKA_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181' |
| 61 | KAFKA_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29092' |
| 62 | KAFKA_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-2:9091,LISTENER_LOCAL://localhost:29092' |
| 63 | KAFKA_INTER_BROKER_LISTENER_NAME: 'LISTENER_INTERNAL' |
| 64 | KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'LISTENER_INTERNAL:PLAINTEXT,LISTENER_LOCAL:PLAINTEXT' |
| 65 | KAFKA_DEFAULT_REPLICATION_FACTOR: '2' |
| 66 | KAFKA_BROKER_ID: '2' |
| 67 | KAFKA_BROKER_RACK: '2' |
| 68 | KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: '3000' |
| 69 | KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: '3000' |
| 70 | KAFKA_REPLICA_SELECTOR_CLASS: 'org.apache.kafka.common.replica.RackAwareReplicaSelector' |
| 71 | KAFKA_DELETE_TOPIC_ENABLE: 'true' |
| 72 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false' |
| 73 | kafka-3: |
| 74 | image: 'confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-6.1.1}' |
| 75 | restart: always |
| 76 | environment: |
| 77 | KAFKA_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181' |
| 78 | KAFKA_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29093' |
| 79 | KAFKA_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-3:9091,LISTENER_LOCAL://localhost:29093' |
| 80 | KAFKA_INTER_BROKER_LISTENER_NAME: 'LISTENER_INTERNAL' |
| 81 | KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'LISTENER_INTERNAL:PLAINTEXT,LISTENER_LOCAL:PLAINTEXT' |
| 82 | KAFKA_DEFAULT_REPLICATION_FACTOR: '2' |
| 83 | KAFKA_BROKER_ID: '3' |
| 84 | KAFKA_BROKER_RACK: '3' |
| 85 | KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: '3000' |
| 86 | KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: '3000' |
| 87 | KAFKA_REPLICA_SELECTOR_CLASS: 'org.apache.kafka.common.replica.RackAwareReplicaSelector' |
| 88 | KAFKA_DELETE_TOPIC_ENABLE: 'true' |
| 89 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false' |
| 90 | kafka-4: |
| 91 | image: 'confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-6.1.1}' |
| 92 | restart: always |
| 93 | environment: |
| 94 | KAFKA_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181' |
| 95 | KAFKA_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29094' |
| 96 | KAFKA_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-4:9091,LISTENER_LOCAL://localhost:29094' |
| 97 | KAFKA_INTER_BROKER_LISTENER_NAME: 'LISTENER_INTERNAL' |
| 98 | KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'LISTENER_INTERNAL:PLAINTEXT,LISTENER_LOCAL:PLAINTEXT' |
| 99 | KAFKA_DEFAULT_REPLICATION_FACTOR: '2' |
| 100 | KAFKA_BROKER_ID: '4' |
| 101 | KAFKA_BROKER_RACK: '4' |
| 102 | KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: '3000' |
| 103 | KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: '3000' |
| 104 | KAFKA_REPLICA_SELECTOR_CLASS: 'org.apache.kafka.common.replica.RackAwareReplicaSelector' |
| 105 | KAFKA_DELETE_TOPIC_ENABLE: 'true' |
| 106 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false' |
| 107 | kafka-5: |
| 108 | image: 'confluentinc/cp-kafka:${CONFLUENT_PLATFORM_VERSION:-6.1.1}' |
| 109 | restart: always |
| 110 | environment: |
| 111 | KAFKA_ZOOKEEPER_CONNECT: 'zookeeper-1:2181,zookeeper-2:2181,zookeeper-3:2181' |
| 112 | KAFKA_LISTENERS: 'LISTENER_INTERNAL://:9091,LISTENER_LOCAL://:29095' |
| 113 | KAFKA_ADVERTISED_LISTENERS: 'LISTENER_INTERNAL://kafka-5:9091,LISTENER_LOCAL://localhost:29095' |
| 114 | KAFKA_INTER_BROKER_LISTENER_NAME: 'LISTENER_INTERNAL' |
| 115 | KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'LISTENER_INTERNAL:PLAINTEXT,LISTENER_LOCAL:PLAINTEXT' |
| 116 | KAFKA_DEFAULT_REPLICATION_FACTOR: '2' |
| 117 | KAFKA_BROKER_ID: '5' |
| 118 | KAFKA_BROKER_RACK: '5' |
| 119 | KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: '3000' |
| 120 | KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: '3000' |
| 121 | KAFKA_REPLICA_SELECTOR_CLASS: 'org.apache.kafka.common.replica.RackAwareReplicaSelector' |
| 122 | KAFKA_DELETE_TOPIC_ENABLE: 'true' |
| 123 | KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false' |
| 124 | toxiproxy: |
| 125 | image: 'shopify/toxiproxy:2.1.4' |
| 126 | ports: |
| 127 | # The tests themselves actually start the proxies on these ports |
| 128 | - '29091:29091' |
| 129 | - '29092:29092' |
| 130 | - '29093:29093' |
| 131 | - '29094:29094' |
| 132 | - '29095:29095' |
| 133 | # This is the toxiproxy API port |
| 134 | - '8474:8474' |