Skip to content

Commit

Permalink
Merge branch 'main' into peng/node-label
Browse files Browse the repository at this point in the history
  • Loading branch information
shanicky authored Nov 25, 2024
2 parents 9fe686f + 420b60b commit 54d1e45
Show file tree
Hide file tree
Showing 54 changed files with 1,011 additions and 500 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing to RisingWave

Contributing documentation has moved to the **[RisingWave Developer Guide](https://risingwavelabs.github.io/risingwave/)**.

Read the **[RisingWave Developer Guide](https://risingwavelabs.github.io/risingwave/)** for
how to develop and contribute to RisingWave.

## Before hacking on RisingWave

Expand All @@ -13,4 +13,4 @@ Please read [the process] of how to submit your change to RisingWave.

[Community Slack]: https://risingwave.com/slack
[file an issue]: https://github.com/risingwavelabs/risingwave/issues/new/choose
[the process]: https://risingwavelabs.github.io/risingwave/contribution
[the process]: https://risingwavelabs.github.io/risingwave/contributing.html
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ parquet = { version = "53.2", features = ["async"] }
mysql_async = { version = "0.34", default-features = false, features = [
"default",
] }
thiserror-ext = "0.1.2"
thiserror-ext = { version = "0.2.1", features = ["backtrace"] }
tikv-jemalloc-ctl = { git = "https://github.com/risingwavelabs/jemallocator.git", rev = "64a2d9" }
tikv-jemallocator = { git = "https://github.com/risingwavelabs/jemallocator.git", features = [
"profiling",
Expand Down
100 changes: 47 additions & 53 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -1,69 +1,49 @@
# Docker Images
# RisingWave Docker Images

## Published images
## Run RisingWave with Docker Compose

- `latest` on GHCR (latest nightly build): `ghcr.io/risingwavelabs/risingwave:latest`
- `latest` on Docker Hub (latest release): `risingwavelabs/risingwave:latest`
- Other tags available on both GHCR and Docker Hub:
- `nightly-yyyyMMdd`, e.g., `nightly-20230108`
- `vX.Y.Z`, e.g., `v0.1.15`
Docker Compose allows you to easily launch a RisingWave instance on a single node. If you are using more than one server, please refer to [Deploy RisingWave on Kubernetes](https://docs.risingwave.com/deploy/risingwave-kubernetes).

## Build the images

The docker images for x86_64 are built with AVX2 SIMD extensions, while the images for aarch64 are built with NEON SIMD extensions. These must be available on your machine. If your machine does not support these extensions, you must build the docker image with the build-arg `simd_disabled=true`.

To build the images, simply run:

```
docker build . -f docker/Dockerfile
```

from the project root.

To build the images without SIMD vector extensions, run

```
docker build . -f docker/Dockerfile --build-arg simd_disabled=true
```

from the project root and run any subsequent docker commands on the resultant image.

## Use the images

To ensure you are using the latest version of RisingWave image,
Ensure you are using the latest version of RisingWave image:

```
# Ensure risingwave image is of latest version
docker pull ghcr.io/risingwavelabs/risingwave:latest
```

### playground
### Playground

Playground mode does not persist any data. **Never** use it for production purpose.

To start a RisingWave playground, run

```
# Start playground
docker run -it --pull=always -p 4566:4566 -p 5691:5691 ghcr.io/risingwavelabs/risingwave:latest playground
```

### standalone minio
To start a RisingWave standalone mode with minio backend, run
### Standalone (MinIO backend)

To start a RisingWave standalone instance with MinIO backend, run

```
# Start all components
docker-compose up
```

### distributed cluster minio
To start a RisingWave cluster with minio backend, run
**⚠️ Important Notes: Memory is crucial for RisingWave!** Inappropriate memory configuration may lead to OOM (out-of-memory) errors or poor performance. Before deploying Docker Compose, ensure that the correct memory settings are configured in the `docker-compose.yaml` file. Here are examples of some typical settings.

| Memory for RW container (`resource.limits.memory`) | 8 GiB | 14 GiB | 28 GiB | 58 GiB |
|----------------------------------------------------|---|---|---|---|
| `compute-opts.total-memory-bytes` | 6 GiB | 10 GiB | 20 GiB | 46 GiB |
| `frontend-opts.frontend-total-memory-bytes` | 1 GiB | 2 GiB | 4 GiB | 6 GiB |
| `compactor-opts.compactor-total-memory-bytes` | 1 GiB | 2 GiB | 4 GiB | 6 GiB |
| `compute-opts.memory-manager-target-bytes` | 5.6 GiB | 9.8 GiB | 20.8 GiB | 44.8 GiB |

```
# Start all components
docker-compose -f docker-compose-distributed.yml up
```

It will start a minio, a meta node, a compute node, a frontend, a compactor, a prometheus and a redpanda instance.
### Standalone (S3 backend)

### s3 and other s3-compatible storage backend
To start a RisingWave cluster with s3 backend, configure the aws credit in [aws.env](https://github.com/risingwavelabs/risingwave/blob/main/docker/aws.env).
If you want to use some s3 compatible storage like Tencent Cloud COS, just configure one more [endpoint](https://github.com/risingwavelabs/risingwave/blob/a2684461e379ce73f8d730982147439e2379de16/docker/aws.env#L7).
After configuring the environment and fill in your [bucket name](https://github.com/risingwavelabs/risingwave/blob/a2684461e379ce73f8d730982147439e2379de16/docker/docker-compose-with-s3.yml#L196), run
Expand All @@ -75,7 +55,8 @@ docker-compose -f docker-compose-with-s3.yml up

It will run with s3 (compatible) object storage with a meta node, a compute node, a frontend, a compactor, a prometheus and a redpanda instance.

### Start with other storage products of public cloud vendors
### Standalone (other backend)

To start a RisingWave cluster with other storage backend, like Google Cloud Storage, Alicloud OSS or Azure Blob Storage, configure the authentication information in [multiple_object_storage.env](https://github.com/risingwavelabs/risingwave/blob/main/docker/multiple_object_storage.env), fill in your [bucket name](https://github.com/risingwavelabs/risingwave/blob/a2684461e379ce73f8d730982147439e2379de16/docker/docker-compose-with-gcs.yml#L196).
and run

Expand All @@ -86,27 +67,39 @@ docker-compose -f docker-compose-with-xxx.yml up

It will run RisingWave with corresponding (object) storage products.

### Start with HDFS backend
To start a RisingWave cluster with HDFS, mount your `HADDOP_HOME` in [compactor node volumes](https://github.com/risingwavelabs/risingwave/blob/a2684461e379ce73f8d730982147439e2379de16/docker/docker-compose-with-hdfs.yml#L28), [compute node volumes](https://github.com/risingwavelabs/risingwave/blob/a2684461e379ce73f8d730982147439e2379de16/docker/docker-compose-with-hdfs.yml#L112) [compute node volumes](https://github.com/risingwavelabs/risingwave/blob/a2684461e379ce73f8d730982147439e2379de16/docker/docker-compose-with-hdfs.yml#L218), fill in the [cluster_name/namenode](https://github.com/risingwavelabs/risingwave/blob/a2684461e379ce73f8d730982147439e2379de16/docker/docker-compose-with-hdfs.yml#L202),
and run
> [!NOTE]
>
> For RisingWave kernel hackers, we always recommend using [risedev](../src/risedevtool/README.md) to start the full cluster, instead of using docker images.
> See [CONTRIBUTING](../CONTRIBUTING.md) for more information.

## Published images

- `latest` on GHCR (latest nightly build): `ghcr.io/risingwavelabs/risingwave:latest`
- `latest` on Docker Hub (latest release): `risingwavelabs/risingwave:latest`
- Other tags available on both GHCR and Docker Hub:
- `nightly-yyyyMMdd`, e.g., `nightly-20230108`
- `vX.Y.Z`, e.g., `v0.1.15`

## Build the images

The docker images for x86_64 are built with AVX2 SIMD extensions, while the images for aarch64 are built with NEON SIMD extensions. These must be available on your machine. If your machine does not support these extensions, you must build the docker image with the build-arg `simd_disabled=true`.

To build the images, simply run:

```
# Start all components
docker-compose -f docker-compose-with-hdfs.yml up
docker build . -f docker/Dockerfile
```

It will run RisingWave with HDFS.
from the project root.

To clean all data, run:
To build the images without SIMD vector extensions, run

```
docker-compose down -v
docker build . -f docker/Dockerfile --build-arg simd_disabled=true
```

> [!NOTE]
>
> For RisingWave kernel hackers, we always recommend using [risedev](../src/risedevtool/README.md) to start the full cluster, instead of using docker images.
> See [CONTRIBUTING](../CONTRIBUTING.md) for more information.
from the project root and run any subsequent docker commands on the resultant image.

## Generate docker-compose.yml

Expand All @@ -122,4 +115,5 @@ Error { code: "XMinioStorageFull", message: "Storage backend has reached its min
```

Solution:

This usually happens on MacOS with Docker Desktop. The Docker Deskup runs in the macOS Hypervisor. All the data, including logs, images, volumes, and so on, is stored in this hypervisor and the hypervisor has a default disk capacity limit. So when this message emerges, simply cleaning up the unused container or image can help mitigate. You can also increase capacity limit by clicking the Docker Desktop icon in the menu bar, then clicking Preferences > Resources > `Increase Disk image size`.
13 changes: 8 additions & 5 deletions docker/docker-compose-with-azblob.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,25 @@ services:
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:5688 \
--async-stack-trace verbose \
#--parallelism 4 \
#--total-memory-bytes 8589934592 \
--parallelism 8 \
--total-memory-bytes 21474836480 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--meta-address http://0.0.0.0:5690 \
--memory-manager-target-bytes 22333829939 \" \
--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:1250 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690\" \
--meta-addr http://0.0.0.0:5690 \
--frontend-total-memory-bytes=4294967296\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:6660 \
--meta-address http://0.0.0.0:5690\""
--meta-address http://0.0.0.0:5690 \
--compactor-total-memory-bytes=4294967296\""
expose:
- "6660"
- "4566"
Expand Down
13 changes: 8 additions & 5 deletions docker/docker-compose-with-gcs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,25 @@ services:
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:5688 \
--async-stack-trace verbose \
#--parallelism 4 \
#--total-memory-bytes 8589934592 \
--parallelism 8 \
--total-memory-bytes 21474836480 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--meta-address http://0.0.0.0:5690 \
--memory-manager-target-bytes 22333829939 \" \
--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:1250 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690\" \
--meta-addr http://0.0.0.0:5690 \
--frontend-total-memory-bytes=4294967296\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:6660 \
--meta-address http://0.0.0.0:5690\""
--meta-address http://0.0.0.0:5690 \
--compactor-total-memory-bytes=4294967296\""
expose:
- "6660"
- "4566"
Expand Down
12 changes: 8 additions & 4 deletions docker/docker-compose-with-local-fs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,25 @@ services:
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:5688 \
--async-stack-trace verbose \
# --parallelism 4 \
--parallelism 8 \
--total-memory-bytes 21474836480 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--meta-address http://0.0.0.0:5690 \
--memory-manager-target-bytes 22333829939 \" \
--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:1250 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690\" \
--meta-addr http://0.0.0.0:5690 \
--frontend-total-memory-bytes=4294967296\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:6660 \
--meta-address http://0.0.0.0:5690\""
--meta-address http://0.0.0.0:5690 \
--compactor-total-memory-bytes=4294967296\""
expose:
- "6660"
- "4566"
Expand Down
13 changes: 8 additions & 5 deletions docker/docker-compose-with-obs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,25 @@ services:
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:5688 \
--async-stack-trace verbose \
#--parallelism 4 \
#--total-memory-bytes 8589934592 \
--parallelism 8 \
--total-memory-bytes 21474836480 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--meta-address http://0.0.0.0:5690 \
--memory-manager-target-bytes 22333829939 \" \
--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:1250 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690\" \
--meta-addr http://0.0.0.0:5690 \
--frontend-total-memory-bytes=4294967296\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:6660 \
--meta-address http://0.0.0.0:5690\""
--meta-address http://0.0.0.0:5690 \
--compactor-total-memory-bytes=4294967296\""
expose:
- "6660"
- "4566"
Expand Down
13 changes: 8 additions & 5 deletions docker/docker-compose-with-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,25 @@ services:
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:5688 \
--async-stack-trace verbose \
#--parallelism 4 \
#--total-memory-bytes 8589934592 \
--parallelism 8 \
--total-memory-bytes 21474836480 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--meta-address http://0.0.0.0:5690 \
--memory-manager-target-bytes 22333829939 \" \
--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:1250 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690\" \
--meta-addr http://0.0.0.0:5690 \
--frontend-total-memory-bytes=4294967296\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:6660 \
--meta-address http://0.0.0.0:5690\""
--meta-address http://0.0.0.0:5690 \
--compactor-total-memory-bytes=4294967296\""
expose:
- "6660"
- "4566"
Expand Down
13 changes: 8 additions & 5 deletions docker/docker-compose-with-s3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,25 @@ services:
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:5688 \
--async-stack-trace verbose \
#--parallelism 4 \
#--total-memory-bytes 8589934592 \
--parallelism 8 \
--total-memory-bytes 21474836480 \
--role both \
--meta-address http://0.0.0.0:5690\" \
--meta-address http://0.0.0.0:5690 \
--memory-manager-target-bytes 22333829939 \" \
--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:1250 \
--health-check-listener-addr 0.0.0.0:6786 \
--meta-addr http://0.0.0.0:5690\" \
--meta-addr http://0.0.0.0:5690 \
--frontend-total-memory-bytes=4294967296\" \
--compactor-opts=\" \
--listen-addr 0.0.0.0:6660 \
--prometheus-listener-addr 0.0.0.0:1250 \
--advertise-addr 0.0.0.0:6660 \
--meta-address http://0.0.0.0:5690\""
--meta-address http://0.0.0.0:5690 \
--compactor-total-memory-bytes=4294967296\""
expose:
- "6660"
- "4566"
Expand Down
Loading

0 comments on commit 54d1e45

Please sign in to comment.