Skip to content

Commit

Permalink
[Documentation] update doc/use_multiple_volumes_how_to.md (#614)
Browse files Browse the repository at this point in the history
Signed-off-by: yandongxiao <[email protected]>
  • Loading branch information
yandongxiao authored Jan 9, 2025
1 parent a844cfc commit 549db92
Showing 1 changed file with 35 additions and 32 deletions.
67 changes: 35 additions & 32 deletions doc/use_multiple_volumes_how_to.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Deploy StarRocks with Multiple Volumes

This document describes how to use multiple volumes to store StarRocks data.
> Note: After installation, you are not allowed to modify the volume related fields no matter in the CRD or Helm Chart.
# Deploy StarRocks with Multiple Volumes By Helm Chart

Expand Down Expand Up @@ -47,36 +48,6 @@ starrocks:
name: be-storage
storageCount: 2 # specify the number of volumes
storageSize: 10Gi # the size of each volume
starrocksCluster:
enabledBe: true
enabledCn: true
starrocksCnSpec:
cnEnvVars:
# add storage_root_path in StarRocks config
config: |
sys_log_level = INFO
# ports for admin, web, heartbeat service
thrift_port = 9060
webserver_port = 8040
heartbeat_service_port = 9050
brpc_port = 8060
storage_root_path = /opt/starrocks/cn/storage0;/opt/starrocks/cn/storage1;/opt/starrocks/cn/storage2
image:
repository: starrocks/cn-ubuntu
tag: 3.2.2
replicas: 1
resources:
limits:
cpu: 8
memory: 8Gi
requests:
cpu: 1m
memory: 10Mi
storageSpec:
logStorageSize: 1Gi
name: cn
storageCount: 3 # specify the number of volumes
storageSize: 10Gi # the size of each volume
starrocksFESpec:
image:
repository: starrocks/fe-ubuntu
Expand All @@ -95,7 +66,39 @@ starrocks:
```
Note:
1. add `storage_root_path` field in StarRocks config.
2. use `storageCount` to specify the number of volumes.
3. the `storage` directory still exists in the container, but will not be used to store data.
3. the `storage` directory still exists in the container, but will not be used to store data.

## What if I want to use different storageClass or storageSize for each volume?

This feature is not supported in Helm Chart. The following is a workaround:

```bash
# starrocks-community is a helm chart repository, you can show yours by `helm repo list`
# kube-starrocks is the name of the helm chart
helm template starrocks starrocks-community/kube-starrocks -f ./values.yaml >./sr.yaml

# From the sr.yaml, there will a Custom Resource Definition (CRD) named StarRocksCluster.
# You can modify the CRD to use different storageClass or storageSize for each volume.
storageVolumes:
- name: be0-data
storageClassName: "standard" # you can change the storageClassName
storageSize: "10Gi" # you can change the storageSize
mountPath: /opt/starrocks/be/storage0
- name: be1-data
storageClassName: "standard"
storageSize: "10Gi"
mountPath: /opt/starrocks/be/storage1
- name: be-log
storageClassName:
storageSize: "1Gi"
mountPath: /opt/starrocks/be/log
- name: be-spill
storageClassName:
storageSize: "0Gi"
mountPath: /opt/starrocks/be/spill

# After modifying the CRD, you can apply it to your Kubernetes cluster.
kubectl apply -f sr.yaml
```

0 comments on commit 549db92

Please sign in to comment.