Skip to main content
Skip to main content

Deploying Doris Cluster

After planning the cluster topology, you can deploy the Doris cluster in Kubernetes.

Deploy cluster

Deploy using Custom Resource files

Online Deployment

Deploying a cluster online requires the following steps:

  1. Create namespace:
kubectl create namespace ${namespace}
  1. Deploy Doris cluster
kubectl apply -f ./${cluster_sample}.yaml -n ${namespace}

Offline deployment

To deploy Doris cluster offline, you need to upload the docker image used by Doris cluster to all nodes on a machine with external network. Then use docker load to install the image on the server. Offline deployment requires the following steps:

  1. Download the required image

Deploying Doris cluster requires the following images:

selectdb/doris.fe-ubuntu:2.0.2
selectdb/doris.be-ubuntu:2.0.2

Download the image locally and package it into a tar file

## download docker image
docker pull selectdb/doris.fe-ubuntu:2.0.2
docker pull selectdb/doris.be-ubuntu:2.0.2

## save docker image as a tar package
docker save -o doris.fe-ubuntu-v2.0.2.tar selectdb/doris.fe-ubuntu:2.0.2
docker save -o doris.be-ubuntu-v2.0.2.tar docker pull selectdb/doris.be-ubuntu:2.0.2

Upload the image tar package to the server and execute the docker load command:

## load docker image
docker load -i doris.fe-ubuntu-v2.0.2.tar
docker load -i doris.be-ubuntu-v2.0.2.tar
  1. Create namespace:
kubectl create namespace ${namespace}
  1. Deploy Doris cluster
kubectl apply -f ./${cluster_sample}.yaml -n ${namespace}

Deploy using Helm

Online Deployment

Before installation, you need to add a deployment warehouse. If it has been added, you can directly install Doris Cluster. Otherwise, please refer to the operation of Add Deployment Warehouse when adding Deploy Doris Operator

  1. Install Doris Cluster

Install doriscluster, using the default configuration this deployment only deploys 3 FE and 3 BE components, using the default storageClass to implement PV dynamic provisioning.

helm install doriscluster doris-repo/doris

If you need to customize resources and cluster shapes, please customize the resource configuration according to the annotations of each resource configuration in values.yaml and execute The following command:

helm install -f values.yaml doriscluster doris-repo/doris
  1. Verify doris cluster installation results

You can check the pod deployment status through the kubectl get pods command. When the Pod of doriscluster is in Running state and all containers in the Pod are ready, the deployment is successful.

kubectl get pod --namespace doris

The return result is as follows:

NAME                     READY   STATUS    RESTARTS   AGE
doriscluster-helm-fe-0 1/1 Running 0 1m39s
doriscluster-helm-fe-1 1/1 Running 0 1m39s
doriscluster-helm-fe-2 1/1 Running 0 1m39s
doriscluster-helm-be-0 1/1 Running 0 16s
doriscluster-helm-be-1 1/1 Running 0 16s
doriscluster-helm-be-2 1/1 Running 0 16s

Offline deployment

  1. Download the Doris Cluster Chart resource

Download doris-{chart_version}.tgz to install Doris Cluster chart. If you need to download the 2.0.6 version of the Doris cluster, you can use the following command:

wget https://charts.selectdb.com/doris-2.0.6.tgz
  1. Install Doris cluster

Doris cluster can be installed through the helm install command.

helm install doriscluster doris-1.4.0.tgz

If you need to customize the assembly values.yaml, you can refer to the following command:

helm install -f values.yaml doriscluster doris-1.4.0.tgz
  1. Verify doris cluster installation results

You can check the pod deployment status through the kubectl get pods command. When the Pod of doriscluster is in Running state and all containers in the Pod are ready, the deployment is successful.

kubectl get pod --namespace doris

The return result is as follows:

NAME                     READY   STATUS    RESTARTS   AGE
doriscluster-helm-fe-0 1/1 Running 0 1m39s
doriscluster-helm-fe-1 1/1 Running 0 1m39s
doriscluster-helm-fe-2 1/1 Running 0 1m39s
doriscluster-helm-be-0 1/1 Running 0 16s
doriscluster-helm-be-1 1/1 Running 0 16s
doriscluster-helm-be-2 1/1 Running 0 16s

View cluster status

Check cluster status

After the cluster deployment resources are delivered, you can check the cluster status by running the following command.

kubectl get pods -n ${namespace}

The return result is as follows:

NAME                       READY   STATUS    RESTARTS   AGE
doriscluster-sample-fe-0 1/1 Running 0 20m
doriscluster-sample-be-0 1/1 Running 0 19m

When the STATUS of all pods is in the Running state, and all containers in the pods of all components are READY, it means that the entire cluster is deployed normally.

Check deployment resource status

Doris Operator will collect the status of cluster services and display them in the distributed resources. Doris Operator defines the abbreviation dcr for the DorisCluster type resource name, which can be replaced by the abbreviation when using the resource type to view the cluster status.

kubectl get dcr

The return result is as follows:

NAME                  FESTATUS    BESTATUS    CNSTATUS   BROKERSTATUS
doriscluster-sample available available

When the STATUS of the configured related services is available, the cluster deployment is successful.