Last active
March 12, 2018 21:44
-
-
Save jhines2k7/4c9e8d4c2c6ac60a076072cc28fad998 to your computer and use it in GitHub Desktop.
Docker service create commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker service create \ | |
--network kafka-net \ | |
--name zk1 \ | |
-e ZOOKEEPER_SERVER_ID=1 \ | |
-e ZOOKEEPER_CLIENT_PORT=22181 \ | |
-e ZOOKEEPER_TICK_TIME=2000 \ | |
-e ZOOKEEPER_INIT_LIMIT=5 \ | |
-e ZOOKEEPER_SYNC_LIMIT=2 \ | |
-e ZOOKEEPER_SERVERS="0.0.0.0:22888:23888;zk2:32888:33888;zk3:42888:43888" \ | |
--constraint "engine.labels.node.type==kafka-node-1" \ | |
confluentinc/cp-zookeeper:4.0.0 | |
docker service create \ | |
--network kafka-net \ | |
--name zk2 \ | |
-e ZOOKEEPER_SERVER_ID=2 \ | |
-e ZOOKEEPER_CLIENT_PORT=32181 \ | |
-e ZOOKEEPER_TICK_TIME=2000 \ | |
-e ZOOKEEPER_INIT_LIMIT=5 \ | |
-e ZOOKEEPER_SYNC_LIMIT=2 \ | |
-e ZOOKEEPER_SERVERS="zk1:22888:23888;0.0.0.0:32888:33888;zk3:42888:43888" \ | |
--constraint "engine.labels.node.type==kafka-node-2" \ | |
confluentinc/cp-zookeeper:4.0.0 | |
docker service create \ | |
--network kafka-net \ | |
--name zk3 \ | |
-e ZOOKEEPER_SERVER_ID=3 \ | |
-e ZOOKEEPER_CLIENT_PORT=42181 \ | |
-e ZOOKEEPER_TICK_TIME=2000 \ | |
-e ZOOKEEPER_INIT_LIMIT=5 \ | |
-e ZOOKEEPER_SYNC_LIMIT=2 \ | |
-e ZOOKEEPER_SERVERS="zk1:22888:23888;zk2:32888:33888;0.0.0.0:42888:43888" \ | |
--constraint "engine.labels.node.type==kafka-node-3" \ | |
confluentinc/cp-zookeeper:4.0.0 | |
docker service create \ | |
--network=kafka-net \ | |
--name=kafka1 \ | |
-e KAFKA_ZOOKEEPER_CONNECT=zk1:22181,zk2:32181,zk3:42181 \ | |
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka1:29092 \ | |
--constraint "engine.labels.node.type==kafka-node-1" \ | |
confluentinc/cp-kafka:4.0.0 | |
docker service create \ | |
--network=kafka-net \ | |
--name=kafka2 \ | |
-e KAFKA_ZOOKEEPER_CONNECT=zk1:22181,zk2:32181,zk3:42181 \ | |
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka2:39092 \ | |
--constraint "engine.labels.node.type==kafka-node-2" \ | |
confluentinc/cp-kafka:4.0.0 | |
docker service create \ | |
--network=kafka-net \ | |
--name=kafka3 \ | |
-e KAFKA_ZOOKEEPER_CONNECT=zk1:22181,zk2:32181,zk3:42181 \ | |
-e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka3:49092 \ | |
--constraint "engine.labels.node.type==kakfa-node-3" \ | |
confluentinc/cp-kafka:4.0.0 | |
docker service create \ | |
--network=kafka-net \ | |
--name=schema-registry \ | |
-e SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL=zk1:22181 \ | |
-e SCHEMA_REGISTRY_HOST_NAME=schema-registry \ | |
-e SCHEMA_REGISTRY_LISTENERS=http://schema-registry:8081 \ | |
--constraint "engine.labels.node.type==webtools" \ | |
confluentinc/cp-schema-registry:4.0.0 | |
docker service create \ | |
--network=kafka-net \ | |
--name=kafka-rest \ | |
-e KAFKA_REST_ZOOKEEPER_CONNECT=zk1:22181 \ | |
-e KAFKA_REST_LISTENERS=http://kafka-rest:8082 \ | |
-e KAFKA_REST_SCHEMA_REGISTRY_URL=http://schema-registry:8081 \ | |
-e KAFKA_REST_HOST_NAME=kafka-rest \ | |
--constraint "engine.labels.node.type==webtools" \ | |
confluentinc/cp-kafka-rest:4.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment