From e274fe6dc9f3aede60aaf7d80ae5a10eac3b494d Mon Sep 17 00:00:00 2001 From: Hubert Deng Date: Wed, 18 Sep 2024 16:19:36 -0700 Subject: [PATCH] initial devservices configs --- devservices/clickhouse/config.xml | 6 +++ devservices/docker-compose.yml | 65 +++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 devservices/clickhouse/config.xml create mode 100644 devservices/docker-compose.yml diff --git a/devservices/clickhouse/config.xml b/devservices/clickhouse/config.xml new file mode 100644 index 0000000000..327d60661b --- /dev/null +++ b/devservices/clickhouse/config.xml @@ -0,0 +1,6 @@ + + 0.3 + + 1 + + diff --git a/devservices/docker-compose.yml b/devservices/docker-compose.yml new file mode 100644 index 0000000000..bd573e0060 --- /dev/null +++ b/devservices/docker-compose.yml @@ -0,0 +1,65 @@ +# Ignored by docker compose, used by devservices +x-sentry-service-config: + version: 0.1 + service_name: snuba + dependencies: + clickhouse: + description: "clickhouse" + redis: + description: "redis" + kafka: + description: "kafka" + modes: + default: [clickhouse, redis, kafka] + +services: + redis: + image: "redis:6.2.14-alpine" + healthcheck: + test: redis-cli ping + clickhouse: + image: "altinity/clickhouse-server:23.8.11.29.altinitystable" + ulimits: + nofile: + soft: 262144 + hard: 262144 + ports: + - "9000:9000" + - "9009:9009" + - "8123:8123" + volumes: + - "clickhouse:/var/lib/clickhouse" + - "./clickhouse/config.xml:/etc/clickhouse-server/config.d/sentry.xml" + kafka: + image: "confluentinc/cp-kafka:7.6.1" + environment: + # https://docs.confluent.io/platform/current/installation/docker/config-reference.html#cp-kakfa-example + KAFKA_PROCESS_ROLES: "broker,controller" + KAFKA_CONTROLLER_QUORUM_VOTERS: "1001@127.0.0.1:29093" + KAFKA_CONTROLLER_LISTENER_NAMES: "CONTROLLER" + KAFKA_NODE_ID: "1001" + CLUSTER_ID: "MkU3OEVBNTcwNTJENDM2Qk" + KAFKA_LISTENERS: "PLAINTEXT://0.0.0.0:29092,INTERNAL://0.0.0.0:9093,EXTERNAL://0.0.0.0:9092,CONTROLLER://0.0.0.0:29093" + KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://127.0.0.1:29092,INTERNAL://kafka:9093,EXTERNAL://127.0.0.1:9092" + KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "PLAINTEXT:PLAINTEXT,INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT,CONTROLLER:PLAINTEXT" + KAFKA_INTER_BROKER_LISTENER_NAME: "PLAINTEXT" + KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" + KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: "1" + KAFKA_LOG_RETENTION_HOURS: "24" + KAFKA_MESSAGE_MAX_BYTES: "50000000" #50MB or bust + KAFKA_MAX_REQUEST_SIZE: "50000000" #50MB on requests apparently too + CONFLUENT_SUPPORT_METRICS_ENABLE: "false" + KAFKA_LOG4J_LOGGERS: "kafka.cluster=WARN,kafka.controller=WARN,kafka.coordinator=WARN,kafka.log=WARN,kafka.server=WARN,state.change.logger=WARN" + KAFKA_LOG4J_ROOT_LOGLEVEL: "WARN" + KAFKA_TOOLS_LOG4J_LOGLEVEL: "WARN" + ulimits: + nofile: + soft: 4096 + hard: 4096 + volumes: + - "kafka:/var/lib/kafka/data" + ports: + - "9092:9092" +volumes: + clickhouse: + kafka: