- Grafana
- PostgreSQL/MySQL
- MinIO
- Prometheus
Download the source file
As a prerequisite, you need to install Docker Desktop in your environment. Ensure that it is running before launching the cluster. Then, clone the risingwave repository.docker directory.
Customize your cluster configuration
You can customize your RisingWave deployment configuration by changing the options for the state store and meta store.Customize state store
For state store, RisingWave supports using these systems or services, and for each of the options, we have a Docker Compose configuration file that you can use after the necessary configurations.- MinIO
- S3 or S3-compatible storage
- Google Cloud Storage, Alibaba Cloud OSS, or Azure Blob Storage
- HDFS
- Huawei Cloud OBS
MinIO
This is the default option. To start a standalone RisingWave cluster with MinIO as the state store, run the following command:COMMAND NOT FOUND?The default command-line syntax in Compose V2 starts with
docker compose. See details in the Docker docs.If you’re using Compose V1, use docker-compose instead.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 RisingWave 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 |
I'd like to start RisingWave components separately in a multi-node cluster.
I'd like to start RisingWave components separately in a multi-node cluster.
You can also run a multi-node cluster, with each component (Serving, Streaming, Meta, and Compactor Nodes) running as a separate process.By default, this mode uses MinIO as the state store of RisingWave.To start a multi-node RisingWave cluster with MinIO as the state store, run the following command:
S3 or S3-compatible storage
To use S3 as the state store, configure your AWS credential information in/docker/aws.env.
To use S3-compatible storage options like Tencent Cloud COS, you need to configure the endpoint via the RW_S3_ENDPOINT parameter in /docker/aws.env. Don’t include the bucket name in the endpoint.
In docker-compose-with-s3.yml, specify the bucket name via the hummock+s3 parameter.
Google Cloud Storage, Alibaba Cloud OSS, or Azure Blob Storage
Configure the credentials for the cloud service you want to use in/docker/multiple_object_storage.env.
In the corresponding docker-compose-with-service_name.yml file (for example, docker-compose-with-gcs.yml for Google Cloud Storage), specify the bucket name via the hummock+<service_name> parameter.
HDFS
Fill in your image name, cluster name (or namenode), and data directory Mount yourHADOOP_HOME to the volume <$HADOOP_HOME>:/opt/hadoop/, see docker-compose-with-hdfs.yml for more information.
Huawei Cloud OBS
To use Huawei Cloud OBS as the state store, you need to configure your OBS credential information in themultiple_object_storage.env file. Uncomment and set the following environment variables: OBS_ENDPOINT, OBS_ACCESS_KEY_ID, and OBS_SECRET_ACCESS_KEY. Don’t include the bucket name in the endpoint.
In the docker-compose-with-obs.yml file, specify the bucket name via the hummock+obs parameter. Replace <bucket-name> with the name of your OBS bucket.
Customize meta store
For meta store, RisingWave uses postgresql as the default meta store backend and also supports the following meta store backends: To customize the meta store backend, you need to configure the following settings.--backend: The meta store backend you want to use.--sql-endpoint: The target SQL backend endpoint.- Some parameters that required for specified backends.
PostgreSQL
--backend: Set topostgres.--sql-endpoint: Configure in format{host}:{port}.- Three additional parameters are required:
--sql-username: Username of SQL backend.--sql-password: Password of SQL backend.--sql-database: Database of SQL backend.
SQLite
--backend: Set tosqlite.--sql-endpoint: Should be the file path.
MySQL or MySQL-compatible storage
--backend: Set tomysql.--sql-endpoint: Configure in format{host}:{port}. In docker-compose-with-sqlite.yml, specify the storage backend viamysqlparameter.
- Three additional parameters are required:
--sql-username: Username of SQL backend.--sql-password: Password of SQL backend.--sql-database: Database of SQL backend.
Start a RisingWave cluster
You can now run the following command to start a RisingWave cluster:docker-compose-with-storage_backend_name.yml with the full file name of the corresponding configuration file.
Connect to RisingWave
After RisingWave is up and running, you need to connect to it via the Postgres interactive terminalpsql so that you can issue queries to RisingWave and see the query results. If you don’t have psql installed, install psql first.
psql options:
- The
-hoption is used to specify the hostname or IP address of the PostgreSQL server to connect to. - The
-poption is used to specify the port number that the server is listening on. - The
-doption is used to specify the name of the database to connect to. - The
-Uoption is used to specify the name of the database user to connect as. - By default, the PostgreSQL server uses the
rootuser account to authenticate connections to thedevdatabase. Note that this user account does not require a password to connect.
Manage your RisingWave cluster
When the cluster is running, you can monitor the status of RisingWave and the additional components and make adjustments when necessary.- RisingWave Dashboard
- Grafana
risingwave_dashboard. In this dashboard, you can view the internal metrics such as node count, memory consumption, throughput, and latencies. You can use these metrics to troubleshoot and optimize the cluster performance.
- MinIO
- User name:
hummockadmin - Password:
hummockadmin - Prometheus