Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/disaggregated/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
23 changes: 23 additions & 0 deletions helm-charts/doris-disaggregated/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
41 changes: 41 additions & 0 deletions helm-charts/doris-disaggregated/Chart.yaml
Original file line number Diff line number Diff line change
@@ -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"
57 changes: 57 additions & 0 deletions helm-charts/doris-disaggregated/README.md
Original file line number Diff line number Diff line change
@@ -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](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
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
```
1 change: 1 addition & 0 deletions helm-charts/doris-disaggregated/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Thank you for installing {{ .Chart.Name }}-{{ .Chart.Version }}
73 changes: 73 additions & 0 deletions helm-charts/doris-disaggregated/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -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 }}

29 changes: 29 additions & 0 deletions helm-charts/doris-disaggregated/templates/be-configmap.yaml
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# 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:
{{- 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" . }}
{{- 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 }}
39 changes: 39 additions & 0 deletions helm-charts/doris-disaggregated/templates/fe-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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:
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" . }}
Loading