Repository for dip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

5.5 KiB

StarRocks 배포

1. 배포 방법

1) 배포시 주의 사항

  • StarRocks는 고성능 분석형 데이터베이스입니다
  • 배포 전 충분한 리소스(CPU, 메모리, 스토리지)가 확보되어야 합니다
  • FE(Frontend) 노드는 홀수 개로 구성하는 것을 권장합니다 (HA를 위해)
  • StarRocks는 두 가지 아키텍처를 지원합니다:
    • Shared-Nothing: 전통적인 아키텍처, BE 노드가 데이터 저장 및 처리 담당
    • Shared-Data: 클라우드 네이티브 아키텍처, CN 노드가 컴퓨팅 담당, 스토리지는 외부 객체 스토리지 사용

2) 배포 방법

2.1) Shared-Nothing 아키텍처 배포

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 아키텍처 배포

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) 설정

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) 설정

starrocksBeSpec:
  replicas: 3
  resources:
    requests:
      cpu: 1
      memory: 2Gi
  storageSpec:
    name: be
    storageSize: 15Gi

2.4) Shared-Data 아키텍처 - CN (Compute Node) 설정

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 설정

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로 배포된 클러스터이 대상
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 설정

starrocksFESpec:
  nodeSelector: {}
  affinity: {}
  tolerations: []

# BE 또는 CN 노드에도 동일하게 적용 가능
starrocksBeSpec:  # 또는 starrocksCnSpec
  nodeSelector: {}
  affinity: {}
  tolerations: []

3. 패스워드 설정

StarRocks 클러스터 배포 시 root 사용자의 초기 패스워드를 설정해야 합니다.

3.1) Secret을 통한 패스워드 설정

# 패스워드 Secret 생성
kubectl create secret generic starrocks-root-pass \
  --from-literal=password='your-secure-password' \
  -n starrocks

3.2) Values 파일에서 패스워드 설정

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와 연동하여 객체 스토리지를 사용할 수 있습니다:

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 활성화

starrocksFeProxySpec:
  enabled: true
  resolver: "rke2-coredns-rke2-coredns.kube-system.svc.cluster.local"

6.2) 오토스케일링 (CN 노드)

starrocksCnSpec:
  autoScalingPolicy:
    minReplicas: 1
    maxReplicas: 10
    hpaPolicy:
      metrics:
      - type: Resource
        resource:
          name: cpu
          target:
            type: Utilization
            averageUtilization: 60