Skip to content

Commit

Permalink
shrink cassandra memmory consumption and unify cassandra setup in all…
Browse files Browse the repository at this point in the history
… docker-compose files (#5482)
  • Loading branch information
3vilhamster authored Dec 18, 2023
1 parent 40018f1 commit 07018fe
Show file tree
Hide file tree
Showing 13 changed files with 172 additions and 39 deletions.
17 changes: 14 additions & 3 deletions docker/buildkite/docker-compose-es7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ version: "3.5"
services:
cassandra:
image: cassandra:4.1.3
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
networks:
services-network:
aliases:
- cassandra
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10

zookeeper:
image: wurstmeister/zookeeper:3.4.6
Expand Down Expand Up @@ -53,9 +61,12 @@ services:
- BUILDKITE_BUILD_ID
- BUILDKITE_BUILD_NUMBER
depends_on:
- cassandra
- elasticsearch
- kafka
cassandra:
condition: service_healthy
elasticsearch:
condition: service_started
kafka:
condition: service_started
volumes:
- ../../:/cadence
- /usr/bin/buildkite-agent:/usr/bin/buildkite-agent
Expand Down
17 changes: 14 additions & 3 deletions docker/buildkite/docker-compose-local-es7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,20 @@ version: "3.5"
services:
cassandra:
image: cassandra:4.1.3
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
ports:
- "9042:9042"
networks:
services-network:
aliases:
- cassandra
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10

zookeeper:
image: wurstmeister/zookeeper:3.4.6
Expand Down Expand Up @@ -68,9 +76,12 @@ services:
- "TEST_TAG=esintegration"
- "ES_VERSION=v7"
depends_on:
- cassandra
- elasticsearch
- kafka
cassandra:
condition: service_healthy
elasticsearch:
condition: service_started
kafka:
condition: service_started
volumes:
- ../../:/cadence
networks:
Expand Down
3 changes: 3 additions & 0 deletions docker/buildkite/docker-compose-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ version: "3.5"
services:
cassandra:
image: cassandra:4.1.3
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
expose:
- "9042"
networks:
Expand Down
17 changes: 14 additions & 3 deletions docker/buildkite/docker-compose-opensearch2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@ version: "3.5"
services:
cassandra:
image: cassandra:4.1.3
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
networks:
services-network:
aliases:
- cassandra
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10

zookeeper:
image: wurstmeister/zookeeper:3.4.6
Expand Down Expand Up @@ -54,9 +62,12 @@ services:
- BUILDKITE_BUILD_ID
- BUILDKITE_BUILD_NUMBER
depends_on:
- cassandra
- elasticsearch
- kafka
cassandra:
condition: service_healthy
elasticsearch:
condition: service_started
kafka:
condition: service_started
volumes:
- ../../:/cadence
- /usr/bin/buildkite-agent:/usr/bin/buildkite-agent
Expand Down
3 changes: 3 additions & 0 deletions docker/buildkite/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ version: "3.5"
services:
cassandra:
image: cassandra:4.1.3
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
networks:
services-network:
aliases:
Expand Down
20 changes: 16 additions & 4 deletions docker/docker-compose-es-v7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ services:
image: cassandra:4.1.3
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10
prometheus:
image: prom/prometheus:latest
volumes:
Expand Down Expand Up @@ -56,10 +64,14 @@ services:
- "ES_VERSION=v7"
- "KAFKA_SEEDS=kafka"
depends_on:
- cassandra
- prometheus
- kafka
- elasticsearch
cassandra:
condition: service_healthy
prometheus:
condition: service_started
kafka:
condition: service_started
elasticsearch:
condition: service_started
cadence-web:
image: ubercadence/web:latest
environment:
Expand Down
20 changes: 16 additions & 4 deletions docker/docker-compose-es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ services:
image: cassandra:4.1.3
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10
prometheus:
image: prom/prometheus:latest
volumes:
Expand Down Expand Up @@ -55,10 +63,14 @@ services:
- "ES_SEEDS=elasticsearch"
- "KAFKA_SEEDS=kafka"
depends_on:
- cassandra
- prometheus
- kafka
- elasticsearch
cassandra:
condition: service_healthy
prometheus:
condition: service_started
kafka:
condition: service_started
elasticsearch:
condition: service_started
cadence-web:
image: ubercadence/web:latest
environment:
Expand Down
14 changes: 12 additions & 2 deletions docker/docker-compose-http-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ services:
image: cassandra:4.1.3
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10
prometheus:
image: prom/prometheus:latest
volumes:
Expand Down Expand Up @@ -39,8 +47,10 @@ services:
- "FRONTEND_HTTP_PORT=8800"
- "FRONTEND_HTTP_PROCEDURES=uber.cadence.api.v1.WorkflowAPI::StartWorkflowExecution,uber.cadence.api.v1.WorkflowAPI::SignalWorkflowExecution,uber.cadence.api.v1.WorkflowAPI::QueryWorkflow,uber.cadence.api.v1.WorkflowAPI::DescribeWorkflowExecution,uber.cadence.api.v1.VisibilityAPI::ListWorkflowExecutions"
depends_on:
- cassandra
- prometheus
cassandra:
condition: service_healthy
prometheus:
condition: service_started
cadence-web:
image: ubercadence/web:latest
environment:
Expand Down
20 changes: 16 additions & 4 deletions docker/docker-compose-multiclusters-cass-mysql-es.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ services:
image: cassandra:4.1.3
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10
mysql:
image: mysql:8.0
ports:
Expand Down Expand Up @@ -71,10 +79,14 @@ services:
- "VISIBILITY_NAME=cadence-visibility-primary"
- "FRONTEND_SERVICE=cadence"
depends_on:
- cassandra
- prometheus
- kafka
- elasticsearch
cassandra:
condition: service_healthy
prometheus:
condition: service_started
kafka:
condition: service_started
elasticsearch:
condition: service_started
cadence-secondary:
image: ubercadence/server:master-auto-setup
ports:
Expand Down
32 changes: 24 additions & 8 deletions docker/docker-compose-multiclusters-es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ services:
image: cassandra:4.1.3
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10
prometheus:
image: prom/prometheus:latest
volumes:
Expand Down Expand Up @@ -65,10 +73,14 @@ services:
- "VISIBILITY_NAME=cadence-visibility-primary"
- "FRONTEND_SERVICE=cadence"
depends_on:
- cassandra
- prometheus
- kafka
- elasticsearch
cassandra:
condition: service_healthy
prometheus:
condition: service_started
kafka:
condition: service_started
elasticsearch:
condition: service_started
cadence-secondary:
image: ubercadence/server:master-auto-setup
ports:
Expand Down Expand Up @@ -103,10 +115,14 @@ services:
- "VISIBILITY_NAME=cadence-visibility-secondary"
- "FRONTEND_SERVICE=cadence-secondary"
depends_on:
- cassandra
- prometheus
- kafka
- elasticsearch
cassandra:
condition: service_healthy
prometheus:
condition: service_started
kafka:
condition: service_started
elasticsearch:
condition: service_started
cadence-web:
image: ubercadence/web:latest
environment:
Expand Down
20 changes: 16 additions & 4 deletions docker/docker-compose-multiclusters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ services:
image: cassandra:4.1.3
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10
prometheus:
image: prom/prometheus:latest
volumes:
Expand Down Expand Up @@ -39,8 +47,10 @@ services:
- "STATSD_HISTORY_PREFIX=cadence-history-primary"
- "STATSD_WORKER_PREFIX=cadence-worker-primary"
depends_on:
- cassandra
- prometheus
cassandra:
condition: service_healthy
prometheus:
condition: service_started
cadence-secondary:
image: ubercadence/server:master-auto-setup
ports:
Expand Down Expand Up @@ -69,8 +79,10 @@ services:
- "STATSD_HISTORY_PREFIX=cadence-history-secondary"
- "STATSD_WORKER_PREFIX=cadence-worker-secondary"
depends_on:
- cassandra
- prometheus
cassandra:
condition: service_healthy
prometheus:
condition: service_started
cadence-web:
image: ubercadence/web:latest
environment:
Expand Down
14 changes: 12 additions & 2 deletions docker/docker-compose-statsd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ services:
image: cassandra:4.1.3
ports:
- "9042:9042"
environment:
- "MAX_HEAP_SIZE=256M"
- "HEAP_NEWSIZE=128M"
healthcheck:
test: ["CMD", "cqlsh", "-u cassandra", "-p cassandra" ,"-e describe keyspaces"]
interval: 15s
timeout: 30s
retries: 10
statsd:
image: graphiteapp/graphite-statsd
ports:
Expand All @@ -24,8 +32,10 @@ services:
- "STATSD_ENDPOINT=statsd:8125"
- "DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml"
depends_on:
- cassandra
- statsd
cassandra:
condition: service_healthy
statsd:
condition: service_started
cadence-web:
image: ubercadence/web:latest
environment:
Expand Down
Loading

0 comments on commit 07018fe

Please sign in to comment.