From 2f4a720186f641457e8a706ea514e0071f793ef9 Mon Sep 17 00:00:00 2001 From: smiletan Date: Tue, 20 May 2025 17:13:38 +0800 Subject: [PATCH 1/4] values.yaml and template all finished, helm template not error --- api/disaggregated/v1/types.go | 2 +- helm-charts/doris-disaggregated/.helmignore | 23 +++ helm-charts/doris-disaggregated/Chart.yaml | 41 ++++++ .../doris-disaggregated/templates/NOTES.txt | 1 + .../templates/_helpers.tpl | 73 ++++++++++ .../templates/be-configmap.yaml | 29 ++++ .../templates/dorisdisaggregatedcluster.yaml | 96 ++++++++++++ .../templates/fe-configmap.yaml | 44 ++++++ .../templates/ms-configmap.yaml | 44 ++++++ helm-charts/doris-disaggregated/values.yaml | 137 ++++++++++++++++++ 10 files changed, 489 insertions(+), 1 deletion(-) create mode 100644 helm-charts/doris-disaggregated/.helmignore create mode 100644 helm-charts/doris-disaggregated/Chart.yaml create mode 100644 helm-charts/doris-disaggregated/templates/NOTES.txt create mode 100644 helm-charts/doris-disaggregated/templates/_helpers.tpl create mode 100644 helm-charts/doris-disaggregated/templates/be-configmap.yaml create mode 100644 helm-charts/doris-disaggregated/templates/dorisdisaggregatedcluster.yaml create mode 100644 helm-charts/doris-disaggregated/templates/fe-configmap.yaml create mode 100644 helm-charts/doris-disaggregated/templates/ms-configmap.yaml create mode 100644 helm-charts/doris-disaggregated/values.yaml diff --git a/api/disaggregated/v1/types.go b/api/disaggregated/v1/types.go index e79113b2..71e5ab03 100644 --- a/api/disaggregated/v1/types.go +++ b/api/disaggregated/v1/types.go @@ -147,7 +147,7 @@ type CommonSpec struct { //+optional Tolerations []corev1.Toleration `json:"tolerations,omitempty"` - // export metaservice for accessing from outside k8s. + // export service for accessing from outside k8s. Service *ExportService `json:"service,omitempty"` // ConfigMaps describe all configmap that need to be mounted. diff --git a/helm-charts/doris-disaggregated/.helmignore b/helm-charts/doris-disaggregated/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/helm-charts/doris-disaggregated/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/helm-charts/doris-disaggregated/Chart.yaml b/helm-charts/doris-disaggregated/Chart.yaml new file mode 100644 index 00000000..08b7fc6f --- /dev/null +++ b/helm-charts/doris-disaggregated/Chart.yaml @@ -0,0 +1,41 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +apiVersion: v2 +name: doris-disaggregated +description: A Helm chart for deploying Doris Cluster of compute and storage decoupled. + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.0 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "3.4.0" diff --git a/helm-charts/doris-disaggregated/templates/NOTES.txt b/helm-charts/doris-disaggregated/templates/NOTES.txt new file mode 100644 index 00000000..9cf433c5 --- /dev/null +++ b/helm-charts/doris-disaggregated/templates/NOTES.txt @@ -0,0 +1 @@ +Thank you for installing {{ .Chart.Name }}-{{ .Chart.Version }} \ No newline at end of file diff --git a/helm-charts/doris-disaggregated/templates/_helpers.tpl b/helm-charts/doris-disaggregated/templates/_helpers.tpl new file mode 100644 index 00000000..433c47af --- /dev/null +++ b/helm-charts/doris-disaggregated/templates/_helpers.tpl @@ -0,0 +1,73 @@ +{* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*} + +{{/* +cluster config +*/}} +{{- define "doris-disaggregated.name" -}} +{{- default .Chart.Name .Values.clusterName | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +ms config part +*/}} +{{- define "ms.fdb.namespace" -}} +{{- default .Release.Namespace .Values.msSpec.fdb.namespace -}} +{{- end }} + +{{- define "ms.fdb.configmap.name" -}} +{{ .Values.msSpec.fdb.fdbClusterName }}-config +{{- end }} + +{{- define "ms.configmap.name" -}} +{{- print "ms-configmap" }} +{{- end }} + +{{- define "ms.configmap.mountpath" -}} +{{- print "/etc/doris" -}} +{{- end }} + + +{{/* +fe config part +*/}} +{{- define "fe.electionnumber" -}} +{{- default 3 .Values.feSpec.electionNumber -}} +{{- end }} + +{{- define "fe.configmap.name" -}} +{{- print "fe-configmap" }} +{{- end }} + +{{- define "fe.configmap.mountpath" -}} +{{- print "/etc/doris" -}} +{{- end }} + + +{{/* +be config part +*/}} +{{- define "be.configmap.name" -}} +{{- print "be-configmap" -}} +{{- end }} + +{{- define "be.configmap.mountpath" -}} +{{- print "/etc/doris" -}} +{{- end }} + diff --git a/helm-charts/doris-disaggregated/templates/be-configmap.yaml b/helm-charts/doris-disaggregated/templates/be-configmap.yaml new file mode 100644 index 00000000..62e02839 --- /dev/null +++ b/helm-charts/doris-disaggregated/templates/be-configmap.yaml @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "be.configmap.name" . }} + labels: + app.kubernetes.io/component: be +data: + be.conf: | + # For jdk 17, this JAVA_OPTS will be used as default JVM options + JAVA_OPTS_FOR_JDK_17="-Xmx1024m -DlogPath=$LOG_DIR/jni.log -Xlog:gc*:$LOG_DIR/be.gc.log.$CUR_DATE:time,uptime:filecount=10,filesize=50M -Djavax.security.auth.useSubjectCredsOnly=false -Dsun.security.krb5.debug=true -Dsun.java.command=DorisBE -XX:-CriticalJNINatives -XX:+IgnoreUnrecognizedVMOptions --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED --add-opens=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=java.base/sun.nio.cs=ALL-UNNAMED --add-opens=java.base/sun.security.action=ALL-UNNAMED --add-opens=java.base/sun.util.calendar=ALL-UNNAMED --add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED --add-opens=java.management/sun.management=ALL-UNNAMED" + file_cache_path = [{"path":"/opt/apache-doris/be/file_cache","total_size":107374182400,"query_limit":107374182400}] + storage_root_path = /opt/apache-doris/be/file_cache \ No newline at end of file diff --git a/helm-charts/doris-disaggregated/templates/dorisdisaggregatedcluster.yaml b/helm-charts/doris-disaggregated/templates/dorisdisaggregatedcluster.yaml new file mode 100644 index 00000000..5b6d8c94 --- /dev/null +++ b/helm-charts/doris-disaggregated/templates/dorisdisaggregatedcluster.yaml @@ -0,0 +1,96 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +apiVersion: disaggregated.cluster.doris.com/v1 +kind: DorisDisaggregatedCluster +metadata: + name: {{ include "doris-disaggregated.name" . }} + {{- if .Values.Labels }} + labels: + {{- .Values.Labels | nindent 4 }} + {{- end }} +spec: + {{- if .Values.adminUser }} + adminUser: + name: {{ .Values.adminUser.name }} + password: {{ .Values.adminUser.password }} + {{- end }} + metaService: + image: {{ .Values.msSpec.image.repository }}:{{ .Values.msSpec.image.tag }} + {{- if .Values.msSpec.imagePullSecrets }} + imagePullSecrets: + {{- toYaml .Values.msSpec.imagePullSecrets | nindent 6 }} + {{- end }} + replicas: {{ .Values.msSpec.replicas }} + fdb: + configMapNamespaceName: + name: {{ include "ms.fdb.configmap.name" . }} + namespace: {{ include "ms.fdb.namespace" . }} + configMaps: + - name: {{ include "ms.configmap.name" . }} + mountPath: {{ include "ms.configmap.mountpath" . }} + {{- if .Values.msSpec.resources }} + {{- toYaml .Values.msSpec.resources | nindent 4 }} + {{- end }} + {{- if .Values.msSpec.nodeSelector }} + nodeSelector: + {{- toYaml .Values.msSpec.nodeSelector | nindent 6 }} + {{- end }} + feSpec: + replicas: {{ .Values.feSpec.replicas }} + electionNumber: {{ include "fe.electionnumber" . }} + image: {{ .Values.feSpec.image.repository }}:{{ .Values.feSpec.image.tag }} + {{- if .Values.feSpec.imagePullSecrets }} + imagePullSecrets: + {{- toYaml .Values.feSpec.imagePullSecrets | nindent 6 }} + {{- end }} + configMaps: + - name: {{ include "fe.configmap.name" . }} + mountPath: {{ include "fe.configmap.mountpath" . }} + logNotStore: {{ .Values.feSpec.logNotStore }} + {{- if .Values.feSpec.resources }} + {{- toYaml .Values.feSpec.resources | nindent 4 }} + {{- end }} + {{- if .Values.feSpec.service }} + {{- toYaml .Values.feSpec.service }} + {{- end }} + {{- if .Values.feSpec.persistentVolumes }} + persistentVolumes: + {{- toYaml .Values.feSpec.persistentVolumes | nindent 4 }} + {{- end }} + computeGroups: + {{- $originalContext := . -}} + {{- range $index, $cgName := .Values.computeGroupNames }} + - uniqueId: {{ $cgName }} + replicas: {{ $originalContext.Values.computeSpec.replicas }} + image: {{ $originalContext.Values.computeSpec.image.repository }}:{{ $originalContext.Values.computeSpec.image.tag }} + {{- if $originalContext.Values.computeSpec.imagePullSecrets }} + imagePullSecrets: + {{- toYaml $originalContext.Values.computeSpec.imagePullSecrets | nindent 6 }} + {{- end }} + {{- if $originalContext.Values.computeSpec.resources }} + {{- toYaml $originalContext.Values.computeSpec.resources | nindent 4 }} + {{- end }} + configMaps: + - name: {{ include "be.configmap.name" . }} + mountPath: {{ include "be.configmap.mountpath" . }} + logNotStore: {{ $originalContext.Values.computeSpec.logNotStore }} + {{- if $originalContext.Values.computeSpec.persistentVolumes }} + persistentVolumes: + {{- toYaml $originalContext.Values.computeSpec.persistentVolumes | nindent 4 }} + {{- end }} + {{- end }} diff --git a/helm-charts/doris-disaggregated/templates/fe-configmap.yaml b/helm-charts/doris-disaggregated/templates/fe-configmap.yaml new file mode 100644 index 00000000..48ea4357 --- /dev/null +++ b/helm-charts/doris-disaggregated/templates/fe-configmap.yaml @@ -0,0 +1,44 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +apiVersion: v1 +data: + doris_cloud.conf: | + # // meta_service + brpc_listen_port = 5000 + brpc_num_threads = -1 + brpc_idle_timeout_sec = 30 + http_token = greedisgood9999 + + # // doris txn config + label_keep_max_second = 259200 + expired_txn_scan_key_nums = 1000 + + # // logging + log_dir = ./log/ + # info warn error + log_level = info + log_size_mb = 1024 + log_filenum_quota = 10 + log_immediate_flush = false + # log_verbose_modules = * + + # //max stage num + max_num_stages = 40 +kind: ConfigMap +metadata: + name: {{ include "fe.configmap.name" . }} diff --git a/helm-charts/doris-disaggregated/templates/ms-configmap.yaml b/helm-charts/doris-disaggregated/templates/ms-configmap.yaml new file mode 100644 index 00000000..e2b4c0ab --- /dev/null +++ b/helm-charts/doris-disaggregated/templates/ms-configmap.yaml @@ -0,0 +1,44 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "ms.configmap.name" . }} +data: + doris_cloud.conf: | + # // meta_service + brpc_listen_port = 5000 + brpc_num_threads = -1 + brpc_idle_timeout_sec = 30 + http_token = greedisgood9999 + + # // doris txn config + label_keep_max_second = 259200 + expired_txn_scan_key_nums = 1000 + + # // logging + log_dir = ./log/ + # info warn error + log_level = info + log_size_mb = 1024 + log_filenum_quota = 10 + log_immediate_flush = false + # log_verbose_modules = * + + # //max stage num + max_num_stages = 40 diff --git a/helm-charts/doris-disaggregated/values.yaml b/helm-charts/doris-disaggregated/values.yaml new file mode 100644 index 00000000..b731a2e2 --- /dev/null +++ b/helm-charts/doris-disaggregated/values.yaml @@ -0,0 +1,137 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +# specify the doris cluster name of compute and storage decoupled. +clusterName: "test-cluster" +# config the labels for select. +Labels: {} + +# specify the initial user and password for management cluster. if config, operator will create it, and use it to add or remove fe or be node from cluster. +# notice `admin` and `root` not supported to create password by operator. +adminUser: {} +# name: doris +# password: 123456 + + +# describe the ms specification for deploying. +msSpec: + # fdb is required config, the last is example to config, not available to use. + fdb: + # specify the fdb cluster deployed namespace. + namespace: {} + # the fdb cluster name which deployed by fdb-kubernetes-operator. if use doris-foundationdb, the value default is `test-cluster`, + # if updated or not use doris-foundationdb deployed, should config it by manual. + fdbClusterName: test-cluster + # the replicas of ms, 2 are usually enough. + replicas: 2 + image: + repository: apache/doris + tag: ms-3.0.5 + imagePullSecrets: [] + # config the compute resource for ms to use. + resources: + requests: + cpu: 1 + memory: 1Gi + limits: + cpu: 1 + memory: 1Gi + # the node have the labels will have the ms pods. + nodeSelector: {} + +# describe the fe specification for deploying. +feSpec: + # the electionNumber denotes the FE followers number. + electionNumber: 3 + # the number of fe, the number contains the number of follower and observer. + replicas: 3 + image: + repository: apache/doris + tag: fe-3.0.5 + imagePullSecrets: [] + # if logNotStore is true, the log will not output the file, only print to stdout. + logNotStore: false + # config the compute resource for fe. + resources: + requests: + cpu: 4 + memory: 8Gi + limits: + requests: + cpu: 4 + memory: 8Gi + + # config the service resource, default is clusterIP mode. NodePort example as follows: + service: {} + # type: NodePort + # portMaps: + # - nodePort: 19030 + # targetPort: 9030 + # - nodePort: 19010 + # targetPort: 9010 + # - nodePort: 19020 + # targetPort: 9020 + # - nodePort: 18030 + # targetPort: 8030 + + # use LoadBalancer + # type: LoadBalancer + + persistentVolumes: + - persistentVolumeClaimSpec: + # if storageClassName empty, will use the default storageClass in k8s cluster. + # storageClassName: default-storage + accessModes: + - ReadWriteOnce + resources: + storage: 200Gi + +# specify the names of compute groups. this is required. if config +computeGroupNames: +- test-cg +- test-cg1 + +# describe the compute group spec to deploy. +computeSpec: + replicas: 2 + image: + repository: apache/doris + tag: be-3.0.5 + imagePullSecrets: [] + # config the compute resources to used. + resources: + requests: + cpu: 8 + memory: 8Gi + limits: + cpu: 8 + memory: 8Gi + # if logNotStore is true, the log will not output the file, only print to stdout. + logNotStore: false + # Config the Service type + serviceType: ClusterIP + # config the storage specification, persistentVolumeClaimSpec is the spec of PersistentVolumeClaim(https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/) + persistentVolumes: + # when set mountPaths, the persistentVolume will be used for the specific mount paths. if mountPaths is empty, It will be used for all storage paths which config in the `be.conf`. + # mountPaths: [] + - persistentVolumeClaimSpec: + # if storageClassName empty, will use the default storageClass in k8s cluster. + # storageClassName: default-storage + accessModes: + - ReadWriteOnce + resources: + storage: 500Gi From bd8bba34b2eaf460cb9493ac4df36b21bcef2dfa Mon Sep 17 00:00:00 2001 From: smiletan Date: Thu, 22 May 2025 10:16:05 +0800 Subject: [PATCH 2/4] fix the config error of resources --- helm-charts/doris-disaggregated/values.yaml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/helm-charts/doris-disaggregated/values.yaml b/helm-charts/doris-disaggregated/values.yaml index b731a2e2..c385b4b8 100644 --- a/helm-charts/doris-disaggregated/values.yaml +++ b/helm-charts/doris-disaggregated/values.yaml @@ -71,9 +71,8 @@ feSpec: cpu: 4 memory: 8Gi limits: - requests: - cpu: 4 - memory: 8Gi + cpu: 4 + memory: 8Gi # config the service resource, default is clusterIP mode. NodePort example as follows: service: {} @@ -98,7 +97,8 @@ feSpec: accessModes: - ReadWriteOnce resources: - storage: 200Gi + requests: + storage: 200Gi # specify the names of compute groups. this is required. if config computeGroupNames: @@ -134,4 +134,5 @@ computeSpec: accessModes: - ReadWriteOnce resources: - storage: 500Gi + requests: + storage: 500Gi From 2b461bc23a097813ab30a26ae57bb7b23199a866 Mon Sep 17 00:00:00 2001 From: smiletan Date: Thu, 22 May 2025 15:17:48 +0800 Subject: [PATCH 3/4] finished test and readme --- helm-charts/doris-disaggregated/README.md | 57 +++++++++++++++++++ .../templates/dorisdisaggregatedcluster.yaml | 4 ++ helm-charts/doris-disaggregated/values.yaml | 2 + .../charts/fdb-operator/Chart.yaml | 2 +- helm-charts/doris/README.md | 5 +- 5 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 helm-charts/doris-disaggregated/README.md diff --git a/helm-charts/doris-disaggregated/README.md b/helm-charts/doris-disaggregated/README.md new file mode 100644 index 00000000..9d99c890 --- /dev/null +++ b/helm-charts/doris-disaggregated/README.md @@ -0,0 +1,57 @@ +# Deploy Doris Storage-Compute Decoupled Cluster +[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/doris)](https://artifacthub.io/packages/search?repo=doris) + +## Prepare +1. install doris operator + Deploy the doris operator in your kubernetes cluster. deploy doris operator have two methods: [directly yaml](https://github.com/apache/doris-operator); [doris operator helm chart](https://artifacthub.io/packages/helm/doris/doris-operator). +2. install foundationDB + Doris storage-compute decoupled cluster use the FoundationDB as meta storage component, please prepare a foundationdb cluster before deploy doris storage-compute decoupled cluster. please refer the [foundationdb official doc site](https://apple.github.io/foundationdb/administration.html#starting-and-stopping) to deploy on machine, or you can use the [fdb-kubernetes-operator](https://github.com/FoundationDB/fdb-kubernetes-operator) to deploy on kubernetes. doris operator provide a sample [helm chart](https://artifacthub.io/packages/helm/doris/doris-foundationdb) that integrate the official fdb-kubernetes-operator chart to deploy foundationdb on kubernetes. + +## Install +### Add helm-chart repo +1. add the selectdb repository + ```Bash + helm repo add selectdb https://charts.selectdb.com + ``` +2. update the helm chart repo to the latest version + ```Bash + helm repo udpate selectdb + ``` +3. check the helm chart repo is the latest version + ```Bash + $ helm search repo selectdb + NAME CHART VERSION APP VERSION DESCRIPTION + selectdb/doris-operator 25.4.0 1.3.1 Doris-operator for doris creat ... + selectdb/doris 25.4.0 2.1.7 Apache Doris is an easy-to-use ... + selectdb/doris-foundationdb 0.2.0 v2.3.0 A Helm chart for foundationDB ... + ``` +### Install the doris storage-compute decoupled cluster +#### Use default config +- fdb deployed on kubernetes + ```Bash + helm install doris-disaggregated --set msSpec.fdb.namespace={namespace} --set msSpec.fdb.fdbClusterName={fdbClusterName} + ``` + please use the real namespace replace the {namespace} as the foundationdb deployed namespace, if you use the [fdb-kubernetes-operator]() or [doris-foundationdb]() deploy foundationdb. + {fdbClusterName} is the `FoundationDBCluster` resource's name. +- fdb deployed on machine + ```Bash + helm install doris-disaggregated --set msSpec.fdb.address={address} + ``` + {address} is the address of fdb accessed, it is content of [fdb.cluster file](https://apple.github.io/foundationdb/administration.html#cluster-files). + +#### Custom deploying +1. use the follow command to download and unpack the chart + ```Bash + helm pull --untar selectdb/doris-disaggregated + ``` + +2. helm install doris storage-compute decoupled cluster + when you want to specify resources or different deployment type, please custom the [`values.yaml`](./values.yaml) and use next command for deploying. + ```Bash + helm install doris-disaggregated -f values.yaml doris-disaggregated + ``` +## Uninstall cluster +Please confirm the Doris storage-compute decoupled cluster is not used, when using next command to uninstall `doris-disaggregated`. +```Bash +helm uninstall doris-disaggregated +``` diff --git a/helm-charts/doris-disaggregated/templates/dorisdisaggregatedcluster.yaml b/helm-charts/doris-disaggregated/templates/dorisdisaggregatedcluster.yaml index 5b6d8c94..9d5bb08f 100644 --- a/helm-charts/doris-disaggregated/templates/dorisdisaggregatedcluster.yaml +++ b/helm-charts/doris-disaggregated/templates/dorisdisaggregatedcluster.yaml @@ -37,9 +37,13 @@ spec: {{- end }} replicas: {{ .Values.msSpec.replicas }} fdb: + {{- if .Values.msSpec.fdb.address }} + address: {{ .Values.msSpec.fdb.address }} + {{- else }} configMapNamespaceName: name: {{ include "ms.fdb.configmap.name" . }} namespace: {{ include "ms.fdb.namespace" . }} + {{- end }} configMaps: - name: {{ include "ms.configmap.name" . }} mountPath: {{ include "ms.configmap.mountpath" . }} diff --git a/helm-charts/doris-disaggregated/values.yaml b/helm-charts/doris-disaggregated/values.yaml index c385b4b8..9438ca36 100644 --- a/helm-charts/doris-disaggregated/values.yaml +++ b/helm-charts/doris-disaggregated/values.yaml @@ -36,6 +36,8 @@ msSpec: # the fdb cluster name which deployed by fdb-kubernetes-operator. if use doris-foundationdb, the value default is `test-cluster`, # if updated or not use doris-foundationdb deployed, should config it by manual. fdbClusterName: test-cluster + # if the fdb deployed on machine, directly config the address that find from the fdb.cluster file. + #address: "" # the replicas of ms, 2 are usually enough. replicas: 2 image: diff --git a/helm-charts/doris-foundationdb/charts/fdb-operator/Chart.yaml b/helm-charts/doris-foundationdb/charts/fdb-operator/Chart.yaml index 8f46ecdc..74aa8dd2 100644 --- a/helm-charts/doris-foundationdb/charts/fdb-operator/Chart.yaml +++ b/helm-charts/doris-foundationdb/charts/fdb-operator/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: fdb-operator -description: A Helm chart for foundationDB operator +description: A Helm chart for foundationDB and fdb-kubernetes-operator home: https://www.foundationdb.org/ sources: - https://github.com/FoundationDB/fdb-kubernetes-operator/tree/main/charts/fdb-operator diff --git a/helm-charts/doris/README.md b/helm-charts/doris/README.md index 6990eac9..dfda4090 100644 --- a/helm-charts/doris/README.md +++ b/helm-charts/doris/README.md @@ -33,10 +33,11 @@ this document and doris-operator installation document are duplicated. you can s ```bash $ helm install doriscluster selectdb/doris ``` -- Custom doris deploying +- Custom doris deploying when you want to specify resources or different deployment type, please custom the [`values.yaml`](./values.yaml) and use next command for deploying. ```bash - $ helm install -f values.yaml doriscluster selectdb/doris + # helm pull --untar selectdb/doris + $ helm install -f values.yaml doriscluster doris ``` ### Validate installation status From 0e9ca6e478f8644399b0b00fef08963eb4b733c8 Mon Sep 17 00:00:00 2001 From: smiletan Date: Fri, 23 May 2025 14:23:17 +0800 Subject: [PATCH 4/4] update fe-configmap --- helm-charts/doris-disaggregated/README.md | 2 +- .../templates/fe-configmap.yaml | 39 ++++++++----------- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/helm-charts/doris-disaggregated/README.md b/helm-charts/doris-disaggregated/README.md index 9d99c890..6a16541b 100644 --- a/helm-charts/doris-disaggregated/README.md +++ b/helm-charts/doris-disaggregated/README.md @@ -31,7 +31,7 @@ ```Bash helm install doris-disaggregated --set msSpec.fdb.namespace={namespace} --set msSpec.fdb.fdbClusterName={fdbClusterName} ``` - please use the real namespace replace the {namespace} as the foundationdb deployed namespace, if you use the [fdb-kubernetes-operator]() or [doris-foundationdb]() deploy foundationdb. + please use the real namespace replace the {namespace} as the foundationdb deployed namespace, if you use the [fdb-kubernetes-operator](https://github.com/FoundationDB/fdb-kubernetes-operator) or [doris-foundationdb](https://artifacthub.io/packages/helm/doris/doris-foundationdb) deploy foundationdb. {fdbClusterName} is the `FoundationDBCluster` resource's name. - fdb deployed on machine ```Bash diff --git a/helm-charts/doris-disaggregated/templates/fe-configmap.yaml b/helm-charts/doris-disaggregated/templates/fe-configmap.yaml index 48ea4357..c7b09695 100644 --- a/helm-charts/doris-disaggregated/templates/fe-configmap.yaml +++ b/helm-charts/doris-disaggregated/templates/fe-configmap.yaml @@ -17,28 +17,23 @@ apiVersion: v1 data: - doris_cloud.conf: | - # // meta_service - brpc_listen_port = 5000 - brpc_num_threads = -1 - brpc_idle_timeout_sec = 30 - http_token = greedisgood9999 - - # // doris txn config - label_keep_max_second = 259200 - expired_txn_scan_key_nums = 1000 - - # // logging - log_dir = ./log/ - # info warn error - log_level = info - log_size_mb = 1024 - log_filenum_quota = 10 - log_immediate_flush = false - # log_verbose_modules = * - - # //max stage num - max_num_stages = 40 + fe.conf: | + CUR_DATE=`date +%Y%m%d-%H%M%S` + # Log dir + LOG_DIR = ${DORIS_HOME}/log + # For jdk 17, this JAVA_OPTS will be used as default JVM options + JAVA_OPTS_FOR_JDK_17="-Djavax.security.auth.useSubjectCredsOnly=false -Xmx8192m -Xms8192m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$LOG_DIR -Xlog:gc*:$LOG_DIR/fe.gc.log.$CUR_DATE:time,uptime:filecount=10,filesize=50M --add-opens=java.base/java.nio=ALL-UNNAMED --add-opens java.base/jdk.internal.ref=ALL-UNNAMED" + # INFO, WARN, ERROR, FATAL + sys_log_level = INFO + # NORMAL, BRIEF, ASYNC + sys_log_mode = NORMAL + # Default dirs to put jdbc drivers,default value is ${DORIS_HOME}/jdbc_drivers + # jdbc_drivers_dir = ${DORIS_HOME}/jdbc_drivers + http_port = 8030 + rpc_port = 9020 + query_port = 9030 + edit_log_port = 9010 + enable_fqdn_mode=true kind: ConfigMap metadata: name: {{ include "fe.configmap.name" . }}