From dcaf0c3edd4dfa2efdca343a3ca4c90bf10a4a2c Mon Sep 17 00:00:00 2001 From: wbsong111 Date: Wed, 20 Aug 2025 16:17:35 +0900 Subject: [PATCH] Add BUILD-README.md, CUSTOM-README.md, values.yaml --- charts/starrocks/BUILD-README.md | 72 +++++++ charts/starrocks/CUSTOM-README.md | 219 ++++++++++++++++++++ charts/starrocks/shared-data-values.yaml | 69 ++++++ charts/starrocks/shared-nothing-values.yaml | 34 +++ 4 files changed, 394 insertions(+) create mode 100644 charts/starrocks/BUILD-README.md create mode 100644 charts/starrocks/CUSTOM-README.md create mode 100644 charts/starrocks/shared-data-values.yaml create mode 100644 charts/starrocks/shared-nothing-values.yaml diff --git a/charts/starrocks/BUILD-README.md b/charts/starrocks/BUILD-README.md new file mode 100644 index 0000000..3fa7fd1 --- /dev/null +++ b/charts/starrocks/BUILD-README.md @@ -0,0 +1,72 @@ +# StarRocks 버전 갱신 가이드 +StarRocks Helm Chart의 버전의 갱신할 경우 작업의 시작은 항상 main에서 이루어져야 한다. + +## 1. git 작업 환경 구성 +- 서비스 카탈로그 git 다운로드 +``` +$ git clone https://github.com/paasup/dip-catalog.git +``` + +- 작업 브랜치로 체크아웃 +``` +$ git checkout -b update-starrocks/1.11.0 +``` + +## 2. 차트 갱신 +- BUILD-README.md, CUSTOM-README.md, custom-values.yaml을 제외한 파일 삭제 + ``` sh + # chart 디렉토리로 이동 + cd ~/dip-catalog/charts/starrocks + + # 파일 삭제 전 삭제할 파일 목록 확인 + find . -mindepth 1 \( -name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" \) -prune -o -print + + # 파일 삭제 + find . -mindepth 1 \( -name "CUSTOM-README.md" -o -name "BUILD-README.md" -o -name "custom-values.yaml" \) -prune -o -exec rm -rf {} + + ``` + +- starrocks 차트 다운로드 + ``` sh + # charts 디렉토리로 이동 + cd ~/dip-catalog/charts + + # helm repo 추가 + helm repo add starrocks https://starrocks.github.io/starrocks-kubernetes-operator + helm repo update + + # helm 차트 조회 + helm search repo starrocks/starrocks + + # helm 차트 다운로드 + helm pull starrocks/starrocks --version=1.11.0 + + # 차트 압축 해제 + tar xzvf starrocks-*.tgz + + # 필요 없는 파일 삭제 + rm starrocks-*.tgz + ``` + +## 3. github에 tag 추가 +- 갱신작업 진행후 commit +``` +$ git add . +$ git commit -m "update-starrocks/1.11.0" +``` + +- main 브랜치에 체크아웃 후 merge +``` +$ git checkout main +$ git merge update-starrocks/1.11.0 +``` + +- git에 push 후 작업 브랜치 삭제 +``` +$ git push -u origin main +$ git branch -d update-starrocks/1.11.0 +``` + +- git tag 추가 후 push +``` +$ git tag starrocks/1.11.0 +$ git push origin starrocks/1.11.0 \ No newline at end of file diff --git a/charts/starrocks/CUSTOM-README.md b/charts/starrocks/CUSTOM-README.md new file mode 100644 index 0000000..acb4df0 --- /dev/null +++ b/charts/starrocks/CUSTOM-README.md @@ -0,0 +1,219 @@ + +# StarRocks 배포 + +## 1. 배포 방법 + +### 1) 배포시 주의 사항 + +- StarRocks는 고성능 분석형 데이터베이스입니다 +- 배포 전 충분한 리소스(CPU, 메모리, 스토리지)가 확보되어야 합니다 +- FE(Frontend) 노드는 홀수 개로 구성하는 것을 권장합니다 (HA를 위해) +- StarRocks는 두 가지 아키텍처를 지원합니다: + - **Shared-Nothing**: 전통적인 아키텍처, BE 노드가 데이터 저장 및 처리 담당 + - **Shared-Data**: 클라우드 네이티브 아키텍처, CN 노드가 컴퓨팅 담당, 스토리지는 외부 객체 스토리지 사용 + +### 2) 배포 방법 + +#### 2.1) Shared-Nothing 아키텍처 배포 +``` sh +git clone https://github.com/paasup/dip-catalog.git +cd charts/starrocks +helm upgrade starrocks ./ -f shared-nothing-values.yaml --install -n starrocks --create-namespace +``` + +#### 2.2) Shared-Data 아키텍처 배포 +``` sh +git clone https://github.com/paasup/dip-catalog.git +cd charts/starrocks +helm upgrade starrocks ./ -f shared-data-values.yaml --install -n starrocks --create-namespace +``` + +## 2. Values 파일 설명 + +### 2.1) 공통 설정 + +| Name | 설명 | 기본값 | +| ---------------------- | ------------------------------------------------------------ | ------ | +| `initPassword.enabled` | 초기 root 패스워드 설정 활성화 | `true` | +| `initPassword.password` | 초기 root password | `""` | +| `initPassword.passwordSecret` | 패스워드가 저장된 Secret 이름 | `""` | +| `timeZone` | 시간대 설정 | `"Asia/Seoul"` | + +### 2.2) StarRocks FE (Frontend) 설정 + +``` yaml +starrocksFESpec: + replicas: 3 + service: + type: ClusterIP + resources: + requests: + cpu: 1 + memory: 1Gi + storageSpec: + name: fe + storageClassName: "" + storageSize: 10Gi + logStorageSize: 5Gi +``` + +### 2.3) Shared-Nothing 아키텍처 - BE (Backend) 설정 + +``` yaml +starrocksBeSpec: + replicas: 3 + resources: + requests: + cpu: 1 + memory: 2Gi + storageSpec: + name: be + storageSize: 15Gi +``` + +### 2.4) Shared-Data 아키텍처 - CN (Compute Node) 설정 + +``` yaml +starrocksCluster: + enabledBe: false + enabledCn: true + +starrocksCnSpec: + replicas: 3 + resources: + requests: + cpu: 1 + memory: 2Gi + storageSpec: + name: be + storageSize: 15Gi + logStorageSize: 10Gi + autoScalingPolicy: {} +``` + +### 2.5) Shared-Data 아키텍처 - S3/MinIO 설정 + +``` yaml +starrocksFESpec: + config: | + # enable shared data, set storage type, set endpoint + run_mode = shared_data + cloud_native_storage_type = S3 + aws_s3_endpoint = minio.minio.svc.cluster.local:9000 + + # set the path in MinIO + aws_s3_path = starrocks + + # credentials for MinIO object read/write + aws_s3_access_key = npLtq574rD9scLanDJCW + aws_s3_secret_key = jNW2dsu19y7Icb2gLBqId3xA4C2jErxJ0FQqbxXm + aws_s3_use_instance_profile = false + aws_s3_use_aws_sdk_default_behavior = false + + enable_load_volume_from_conf = true +``` + +### 2.6) FE Proxy 설정 + +- resolver의 기본값은 rke2로 배포된 클러스터이 대상 +``` yaml +starrocksFeProxySpec: + enabled: true + # set the resolver for nginx server + resolver: "rke2-coredns-rke2-coredns.kube-system.svc.cluster.local" + service: + type: ClusterIP +``` + +### 2.7) Node Selector, Affinity, Tolerations 설정 + +``` yaml +starrocksFESpec: + nodeSelector: {} + affinity: {} + tolerations: [] + +# BE 또는 CN 노드에도 동일하게 적용 가능 +starrocksBeSpec: # 또는 starrocksCnSpec + nodeSelector: {} + affinity: {} + tolerations: [] +``` + +## 3. 패스워드 설정 + +StarRocks 클러스터 배포 시 root 사용자의 초기 패스워드를 설정해야 합니다. + +### 3.1) Secret을 통한 패스워드 설정 + +``` sh +# 패스워드 Secret 생성 +kubectl create secret generic starrocks-root-pass \ + --from-literal=password='your-secure-password' \ + -n starrocks +``` + +### 3.2) Values 파일에서 패스워드 설정 + +``` yaml +initPassword: + enabled: true + password: "your-secure-password" # 직접 설정 (권장하지 않음) + passwordSecret: starrocks-root-pass # Secret 사용 (권장) +``` + +## 4. 아키텍처별 배포 가이드 + +### 4.1) Shared-Nothing 아키텍처 +- 전통적인 StarRocks 아키텍처 +- FE 노드: 메타데이터 관리 +- BE 노드: 데이터 저장 및 쿼리 처리 +- 로컬 스토리지 사용 + +### 4.2) Shared-Data 아키텍처 +- 클라우드 네이티브 아키텍처 +- FE 노드: 메타데이터 관리 +- CN 노드: 쿼리 처리 (컴퓨팅 전용) +- 외부 객체 스토리지 사용 (S3, MinIO 등) +- 스토리지와 컴퓨팅 분리로 확장성 향상 + +## 5. MinIO 연동 (Shared-Data 아키텍처) + +Shared-Data 아키텍처 사용 시 MinIO와 연동하여 객체 스토리지를 사용할 수 있습니다: + +``` yaml +starrocksFESpec: + config: | + run_mode = shared_data + cloud_native_storage_type = S3 + aws_s3_endpoint = minio.minio.svc.cluster.local:9000 + aws_s3_path = starrocks + aws_s3_access_key = your-access-key + aws_s3_secret_key = your-secret-key +``` + +## 6. 모니터링 및 관리 + +### 6.1) FE Proxy 활성화 +``` yaml +starrocksFeProxySpec: + enabled: true + resolver: "rke2-coredns-rke2-coredns.kube-system.svc.cluster.local" +``` + +### 6.2) 오토스케일링 (CN 노드) + +``` yaml +starrocksCnSpec: + autoScalingPolicy: + minReplicas: 1 + maxReplicas: 10 + hpaPolicy: + metrics: + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: 60 +``` \ No newline at end of file diff --git a/charts/starrocks/shared-data-values.yaml b/charts/starrocks/shared-data-values.yaml new file mode 100644 index 0000000..6e87a0d --- /dev/null +++ b/charts/starrocks/shared-data-values.yaml @@ -0,0 +1,69 @@ +initPassword: + enabled: true + password: "" + passwordSecret: starrocks-root-pass + +timeZone: Asia/Seoul + +starrocksCluster: + enabledBe: false + enabledCn: true + +starrocksFESpec: + replicas: 3 + service: + type: ClusterIP + resources: + requests: + cpu: 1 + memory: 1Gi + storageSpec: + name: fe + storageClassName: "" + storageSize: 10Gi + logStorageSize: 5Gi + + nodeSelector: {} + affinity: {} + tolerations: [] + + config: | + # enable shared data, set storage type, set endpoint + run_mode = shared_data + cloud_native_storage_type = S3 + aws_s3_endpoint = minio.minio.svc.cluster.local:9000 + + # set the path in MinIO + aws_s3_path = starrocks + + # credentials for MinIO object read/write + aws_s3_access_key = npLtq574rD9scLanDJCW + aws_s3_secret_key = jNW2dsu19y7Icb2gLBqId3xA4C2jErxJ0FQqbxXm + aws_s3_use_instance_profile = false + aws_s3_use_aws_sdk_default_behavior = false + + enable_load_volume_from_conf = true + + +starrocksCnSpec: + replicas: 3 + resources: + requests: + cpu: 1 + memory: 2Gi + storageSpec: + name: be + storageSize: 15Gi # default : 1Ti + logStorageSize: 10Gi # default : 20Gi + nodeSelector: {} + affinity: {} + tolerations: [] + autoScalingPolicy: {} + + +starrocksFeProxySpec: + enabled: true + # set the resolver for nginx server, default kube-dns.kube-system.svc.cluster.local + resolver: "rke2-coredns-rke2-coredns.kube-system.svc.cluster.local" + service: + type: ClusterIP \ No newline at end of file diff --git a/charts/starrocks/shared-nothing-values.yaml b/charts/starrocks/shared-nothing-values.yaml new file mode 100644 index 0000000..2bc4efd --- /dev/null +++ b/charts/starrocks/shared-nothing-values.yaml @@ -0,0 +1,34 @@ +initPassword: + enabled: true + password: "" + passwordSecret: starrocks-root-pass + +timeZone: Asia/Seoul + +starrocksFESpec: + replicas: 3 + service: + type: ClusterIP + resources: + requests: + cpu: 1 + memory: 1Gi + storageSpec: + name: fe + +starrocksBeSpec: + replicas: 3 + resources: + requests: + cpu: 1 + memory: 2Gi + storageSpec: + name: be + storageSize: 15Gi + +starrocksFeProxySpec: + enabled: true + # set the resolver for nginx server, default kube-dns.kube-system.svc.cluster.local + resolver: "rke2-coredns-rke2-coredns.kube-system.svc.cluster.local" + service: + type: ClusterIP \ No newline at end of file