Skip to content

Commit

Permalink
change kafka to bitnami (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
ukclivecox authored May 5, 2022
1 parent b0461c5 commit b6964ca
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 25 deletions.
46 changes: 33 additions & 13 deletions scheduler/all-base.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
version: "3.9"

volumes:
zookeeper_data:
driver: local
kafka_data:
driver: local

services:

agent-mlserver:
Expand Down Expand Up @@ -47,7 +53,10 @@ services:
- SELDON_UPSTREAM_PORT=${SCHEDULER_DATAFLOW_PORT}
- SELDON_KAFKA_BOOTSTRAP_SERVERS=kafka:${KAFKA_BROKER_INTERNAL_PORT}
- SELDON_CORES_COUNT=4

depends_on:
- kafka
- otel-collector

envoy:
build:
dockerfile: ./Dockerfile.envoy
Expand Down Expand Up @@ -120,6 +129,9 @@ services:
- "envoy"
- "--envoy-port"
- ${ENVOY_DATA_PORT}
depends_on:
- kafka
- otel-collector

pipelinegateway:
build:
Expand All @@ -136,19 +148,20 @@ services:
- ${PIPELINEGATEWAY_HTTP_PORT}
- "--grpc-port"
- ${PIPELINEGATEWAY_GRPC_PORT}

depends_on:
- kafka
- otel-collector

kafka:
image: "${KAFKA_IMAGE_AND_TAG}"
command: [
"sh", "-c",
"./bin/kafka-storage.sh format -t $$(./bin/kafka-storage.sh random-uuid) -c ./config/kraft/server.properties && ./bin/kafka-server-start.sh ./config/kraft/server.properties"
]
ports:
- "${KAFKA_BROKER_INTERNAL_PORT}:${KAFKA_BROKER_INTERNAL_PORT}"
- "${KAFKA_BROKER_EXTERNAL_PORT}:${KAFKA_BROKER_EXTERNAL_PORT}"
image: docker.io/bitnami/kafka:3.1
volumes:
- "kafka_data:/bitnami"
environment:
LOG_DIR: "/tmp/logs"

- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper

jaeger-all-in-one:
image: jaegertracing/all-in-one:latest
ports:
Expand All @@ -170,4 +183,11 @@ services:
- "55670:55679" # zpages extension
depends_on:
- jaeger-all-in-one


zookeeper:
image: docker.io/bitnami/zookeeper:3.8
volumes:
- "zookeeper_data:/bitnami"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes

12 changes: 12 additions & 0 deletions scheduler/all-host-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,15 @@ services:
- ${PIPELINEGATEWAY_HTTP_PORT}
- "--grpc-port"
- ${PIPELINEGATEWAY_GRPC_PORT}

kafka:
network_mode: "host"
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=127.0.0.1:2181
- ALLOW_PLAINTEXT_LISTENER=yes
depends_on:
- zookeeper

zookeeper:
ports:
- "2181:2181"
17 changes: 7 additions & 10 deletions scheduler/all-internal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,16 +150,6 @@ services:
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=${OTEL_EXPORTER_OTLP_ENDPOINT}

kafka:
command: [
"sh", "-c",
"./bin/kafka-storage.sh format -t $$(./bin/kafka-storage.sh random-uuid) -c ./config/kraft/server.properties && ./bin/kafka-server-start.sh ./config/kraft/server.properties --override advertised.listeners=$${KAFKA_ADVERTISED_LISTENERS} --override listener.security.protocol.map=$${KAFKA_LISTENER_SECURITY_PROTOCOL_MAP} --override listeners=$${KAFKA_LISTENERS}"
]
environment:
LOG_DIR: "/tmp/logs"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_LISTENERS: PLAINTEXT://:29092,PLAINTEXT_HOST://:9092,CONTROLLER://:9093
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:29092,PLAINTEXT_HOST://localhost:9092

dataflow:
environment:
Expand All @@ -175,3 +165,10 @@ services:
- "-c"
- "/etc/envoy-compose.yaml"

kafka:
ports:
- "9092:9092"

zookeeper:
ports:
- "2181:2181"
2 changes: 1 addition & 1 deletion scheduler/config/agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ rclone:
- '{"type":"google cloud storage","name":"gs","parameters":{"anonymous":true}}'
kafka:
active: true
broker: "kafka:29092"
broker: "kafka:9092"
#broker: "0.0.0.0:9092"
2 changes: 1 addition & 1 deletion scheduler/env.all
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SERVER_TRITON_HTTP_PORT=8082
SERVER_TRITON_GRPC_PORT=8083
PIPELINEGATEWAY_HTTP_PORT=9010
PIPELINEGATEWAY_GRPC_PORT=9011
KAFKA_BROKER_INTERNAL_PORT=29092
KAFKA_BROKER_INTERNAL_PORT=9092
KAFKA_BROKER_EXTERNAL_PORT=9092

AGENT_IMAGE_AND_TAG=seldonio/seldon-agent:latest
Expand Down

0 comments on commit b6964ca

Please sign in to comment.