Skip to content

Commit

Permalink
feat(docker): standalone mode for docker compose with different objec…
Browse files Browse the repository at this point in the history
…t storage (#13854)
  • Loading branch information
wcy-fdu authored Dec 11, 2023
1 parent d270f10 commit a3c71aa
Show file tree
Hide file tree
Showing 5 changed files with 303 additions and 183 deletions.
122 changes: 76 additions & 46 deletions docker/docker-compose-with-azblob.yml
Original file line number Diff line number Diff line change
@@ -1,65 +1,95 @@
---
version: "3"
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v1.4.0}
services:
compactor-0:
extends:
file: docker-compose.yml
service: compactor-0
depends_on:
- meta-node-0
env_file: multiple_object_storage.env
compute-node-0:
extends:
file: docker-compose.yml
service: compute-node-0
risingwave-standalone:
<<: *image
command: "standalone --meta-opts=\" \
--listen-addr 0.0.0.0:5690 \
--advertise-addr 0.0.0.0:5690 \
--dashboard-host 0.0.0.0:5691 \
--prometheus-host 0.0.0.0:1250 \
--connector-rpc-endpoint 0.0.0.0:50051 \
--backend etcd \
--etcd-endpoints etcd-0:2388 \
--state-store hummock+azblob://<container_name> \
--data-directory hummock_001 \
--config-path /risingwave.toml\" \
--compute-opts=\" \
--config-path /risingwave.toml \
--listen-addr 0.0.0.0:5688 \
--prometheus-listener-addr 0.0.0.0:1222 \
--advertise-addr 0.0.0.0:5688 \
--async-stack-trace verbose \
--connector-rpc-endpoint 0.0.0.0:50051 \
#--parallelism 4 \
#--total-memory-bytes 8589934592 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--frontend-opts=\" \
--config-path /risingwave.toml \
--listen-addr 0.0.0.0:4566 \
--advertise-addr 0.0.0.0:4566 \
--prometheus-listener-addr 0.0.0.0:2222 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1260 \
--advertise-addr 0.0.0.0:6660 \
--meta-address http://0.0.0.0:5690\""
expose:
- "6660"
- "1260"
- "4566"
- "5688"
- "1222"
- "5690"
- "1250"
- "5691"
ports:
- "4566:4566"
- "5690:5690"
- "5691:5691"
depends_on:
- meta-node-0
- etcd-0
env_file: multiple_object_storage.env
volumes:
- "./risingwave.toml:/risingwave.toml"
environment:
RUST_BACKTRACE: "1"
# If ENABLE_TELEMETRY is not set, telemetry will start by default
ENABLE_TELEMETRY: ${ENABLE_TELEMETRY:-true}
container_name: risingwave-standalone
healthcheck:
test:
- CMD-SHELL
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/6660; exit $$?;'
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/5688; exit $$?;'
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/4566; exit $$?;'
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/5690; exit $$?;'
interval: 1s
timeout: 5s
restart: always
deploy:
resources:
limits:
memory: 28G
reservations:
memory: 28G
etcd-0:
extends:
file: docker-compose.yml
service: etcd-0
frontend-node-0:
extends:
file: docker-compose.yml
service: frontend-node-0
depends_on:
- meta-node-0
grafana-0:
extends:
file: docker-compose.yml
service: grafana-0
meta-node-0:
extends:
file: docker-compose.yml
service: meta-node-0
command:
- meta-node
- "--listen-addr"
- "0.0.0.0:5690"
- "--advertise-addr"
- "meta-node-0:5690"
- "--dashboard-host"
- "0.0.0.0:5691"
- "--prometheus-host"
- "0.0.0.0:1250"
- "--backend"
- etcd
- "--etcd-endpoints"
- "etcd-0:2388"
- "--state-store"
- "hummock+azblob://<container_name>"
- "--data-directory"
- "hummock_001"
- "--config-path"
- /risingwave.toml
depends_on:
- etcd-0
env_file: multiple_object_storage.env
prometheus-0:
extends:
file: docker-compose.yml
service: prometheus-
service: prometheus-0
message_queue:
extends:
file: docker-compose.yml
Expand Down
120 changes: 75 additions & 45 deletions docker/docker-compose-with-gcs.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,91 @@
---
version: "3"
x-image: &image
image: ${RW_IMAGE:-risingwavelabs/risingwave:v1.4.0}
services:
compactor-0:
extends:
file: docker-compose.yml
service: compactor-0
risingwave-standalone:
<<: *image
command: "standalone --meta-opts=\" \
--listen-addr 0.0.0.0:5690 \
--advertise-addr 0.0.0.0:5690 \
--dashboard-host 0.0.0.0:5691 \
--prometheus-host 0.0.0.0:1250 \
--connector-rpc-endpoint 0.0.0.0:50051 \
--backend etcd \
--etcd-endpoints etcd-0:2388 \
--state-store hummock+gcs://<bucket-name> \
--data-directory hummock_001 \
--config-path /risingwave.toml\" \
--compute-opts=\" \
--config-path /risingwave.toml \
--listen-addr 0.0.0.0:5688 \
--prometheus-listener-addr 0.0.0.0:1222 \
--advertise-addr 0.0.0.0:5688 \
--async-stack-trace verbose \
--connector-rpc-endpoint 0.0.0.0:50051 \
#--parallelism 4 \
#--total-memory-bytes 8589934592 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--frontend-opts=\" \
--config-path /risingwave.toml \
--listen-addr 0.0.0.0:4566 \
--advertise-addr 0.0.0.0:4566 \
--prometheus-listener-addr 0.0.0.0:2222 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1260 \
--advertise-addr 0.0.0.0:6660 \
--meta-address http://0.0.0.0:5690\""
expose:
- "6660"
- "1260"
- "4566"
- "5688"
- "1222"
- "5690"
- "1250"
- "5691"
ports:
- "4566:4566"
- "5690:5690"
- "5691:5691"
depends_on:
- meta-node-0
env_file: multiple_object_storage.env
compute-node-0:
extends:
file: docker-compose.yml
service: compute-node-0
depends_on:
- meta-node-0
- etcd-0
env_file: multiple_object_storage.env
volumes:
- "./risingwave.toml:/risingwave.toml"
environment:
RUST_BACKTRACE: "1"
# If ENABLE_TELEMETRY is not set, telemetry will start by default
ENABLE_TELEMETRY: ${ENABLE_TELEMETRY:-true}
container_name: risingwave-standalone
healthcheck:
test:
- CMD-SHELL
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/6660; exit $$?;'
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/5688; exit $$?;'
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/4566; exit $$?;'
- bash -c 'printf \"GET / HTTP/1.1\n\n\" > /dev/tcp/127.0.0.1/5690; exit $$?;'
interval: 1s
timeout: 5s
restart: always
deploy:
resources:
limits:
memory: 28G
reservations:
memory: 28G
etcd-0:
extends:
file: docker-compose.yml
service: etcd-0
frontend-node-0:
extends:
file: docker-compose.yml
service: frontend-node-0
depends_on:
- meta-node-0
grafana-0:
extends:
file: docker-compose.yml
service: grafana-0
meta-node-0:
extends:
file: docker-compose.yml
service: meta-node-0
command:
- meta-node
- "--listen-addr"
- "0.0.0.0:5690"
- "--advertise-addr"
- "meta-node-0:5690"
- "--dashboard-host"
- "0.0.0.0:5691"
- "--prometheus-host"
- "0.0.0.0:1250"
- "--backend"
- etcd
- "--etcd-endpoints"
- "etcd-0:2388"
- "--state-store"
- "hummock+gcs://<bucket-name>"
- "--data-directory"
- "hummock_001"
- "--config-path"
- /risingwave.toml
depends_on:
- "etcd-0"
env_file: multiple_object_storage.env
prometheus-0:
extends:
file: docker-compose.yml
Expand Down
Loading

0 comments on commit a3c71aa

Please sign in to comment.