From 763f1e90e6d3e729117a4af5ba0c466ff06e60d0 Mon Sep 17 00:00:00 2001 From: catpineapple Date: Mon, 16 Dec 2024 15:06:03 +0800 Subject: [PATCH] add ddc example --- .../disaggregated/cluster/ddc-configmap.yaml | 1 - .../cluster/ddc-fdb-address.yaml | 34 +++++++++++ .../disaggregated/cluster/ddc-fdb-conf.yaml | 36 ++++++++++++ .../cluster/ddc-hosts-and-env.yaml | 54 ++++++++++++++++++ .../disaggregated/cluster/ddc-pvc.yaml | 9 +-- .../disaggregated/cluster/ddc-sample.yaml | 1 - .../cluster/ddc-scaledown-decommission.yaml | 39 +++++++++++++ .../cluster/ddc-scaledown-dropcg.yaml | 39 +++++++++++++ .../cluster/ddc-service-clusterip.yaml | 40 +++++++++++++ .../cluster/ddc-service-loadbalancer.yaml | 45 +++++++++++++++ .../cluster/ddc-service-nodeport.yaml | 57 +++++++++++++++++++ .../disaggregated/cluster/ddc-single-fe.yaml | 38 +++++++++++++ .../cluster/ddc-system-init.yaml | 41 +++++++++++++ 13 files changed, 428 insertions(+), 6 deletions(-) create mode 100644 doc/examples/disaggregated/cluster/ddc-fdb-address.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-fdb-conf.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-hosts-and-env.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-scaledown-decommission.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-scaledown-dropcg.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-service-clusterip.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-service-loadbalancer.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-service-nodeport.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-single-fe.yaml create mode 100644 doc/examples/disaggregated/cluster/ddc-system-init.yaml diff --git a/doc/examples/disaggregated/cluster/ddc-configmap.yaml b/doc/examples/disaggregated/cluster/ddc-configmap.yaml index b204052..16527aa 100644 --- a/doc/examples/disaggregated/cluster/ddc-configmap.yaml +++ b/doc/examples/disaggregated/cluster/ddc-configmap.yaml @@ -25,7 +25,6 @@ spec: configMaps: - name: ms-configmap fdb: - # address: ${fdb_endpoint} configMapNamespaceName: name: ${fdb-configmap} namespace: ${fdb-namespace} diff --git a/doc/examples/disaggregated/cluster/ddc-fdb-address.yaml b/doc/examples/disaggregated/cluster/ddc-fdb-address.yaml new file mode 100644 index 0000000..d07b046 --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-fdb-address.yaml @@ -0,0 +1,34 @@ +# 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: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + # fdb endpoint string from '$FDB_HOME/conf/fdb.cluster' by server direct deployment + address: ${fdb_endpoint} + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 diff --git a/doc/examples/disaggregated/cluster/ddc-fdb-conf.yaml b/doc/examples/disaggregated/cluster/ddc-fdb-conf.yaml new file mode 100644 index 0000000..c9d9ad4 --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-fdb-conf.yaml @@ -0,0 +1,36 @@ +# 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: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + # fdb endpoint from fdb configmap by fdb-kubernetes-operator deployment + configMapNamespaceName: + name: ${fdb-configmap} + namespace: ${fdb-namespace} + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 diff --git a/doc/examples/disaggregated/cluster/ddc-hosts-and-env.yaml b/doc/examples/disaggregated/cluster/ddc-hosts-and-env.yaml new file mode 100644 index 0000000..4baeb75 --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-hosts-and-env.yaml @@ -0,0 +1,54 @@ +# 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: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + configMapNamespaceName: + name: test-cluster-config + namespace: default + envVars: + - name: TZ + value: Asia/Shanghai + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + envVars: + - name: TZ + value: Asia/Shanghai + hostAliases: + - ip: 127.0.134.10 + hostnames: + - 'host001' + - 'host002' + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 + envVars: + - name: TZ + value: Asia/Shanghai + hostAliases: + - ip: 127.0.134.10 + hostnames: + - 'host001' + - 'host002' \ No newline at end of file diff --git a/doc/examples/disaggregated/cluster/ddc-pvc.yaml b/doc/examples/disaggregated/cluster/ddc-pvc.yaml index 9f75563..21ec561 100644 --- a/doc/examples/disaggregated/cluster/ddc-pvc.yaml +++ b/doc/examples/disaggregated/cluster/ddc-pvc.yaml @@ -33,14 +33,15 @@ spec: replicas: 2 image: selectdb/doris.fe-ubuntu:3.0.2 persistentVolume: - # logNotStore: true + # logNotStore is true, will not create pv for fe log + logNotStore: true persistentVolumeClaimSpec: # storageClassName: ${storageclass_name} accessModes: - ReadWriteOnce resources: requests: - storage: 100Gi + storage: 120Gi computeGroups: - uniqueId: cg1 replicas: 3 @@ -53,7 +54,7 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Gi + storage: 120Gi - uniqueId: cg2 replicas: 3 image: selectdb/doris.be-ubuntu:3.0.2 @@ -65,4 +66,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 100Gi \ No newline at end of file + storage: 120Gi \ No newline at end of file diff --git a/doc/examples/disaggregated/cluster/ddc-sample.yaml b/doc/examples/disaggregated/cluster/ddc-sample.yaml index d493cec..279ec50 100644 --- a/doc/examples/disaggregated/cluster/ddc-sample.yaml +++ b/doc/examples/disaggregated/cluster/ddc-sample.yaml @@ -23,7 +23,6 @@ spec: metaService: image: selectdb/doris.ms-ubuntu:3.0.2 fdb: - # address: ${fdb_endpoint} configMapNamespaceName: name: test-cluster-config namespace: default diff --git a/doc/examples/disaggregated/cluster/ddc-scaledown-decommission.yaml b/doc/examples/disaggregated/cluster/ddc-scaledown-decommission.yaml new file mode 100644 index 0000000..5e7f21d --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-scaledown-decommission.yaml @@ -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: disaggregated.cluster.doris.com/v1 +kind: DorisDisaggregatedCluster +metadata: + name: test-disaggregated-cluster +spec: + # enableDecommission default is false, when set true, the cluster will be decommissioned. + # Otherwise be will drop in cg + enableDecommission: true + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + configMapNamespaceName: + name: test-cluster-config + namespace: default + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + computeGroups: + - uniqueId: cg1 +# replicas: 3 (replicas before is 3) + replicas: 1 + image: selectdb/doris.be-ubuntu:3.0.2 diff --git a/doc/examples/disaggregated/cluster/ddc-scaledown-dropcg.yaml b/doc/examples/disaggregated/cluster/ddc-scaledown-dropcg.yaml new file mode 100644 index 0000000..f0defbe --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-scaledown-dropcg.yaml @@ -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: disaggregated.cluster.doris.com/v1 +kind: DorisDisaggregatedCluster +metadata: + name: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + configMapNamespaceName: + name: test-cluster-config + namespace: default + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 +# In the existing cg configuration, delete the corresponding configuration and apply it, doris-operator will automatically offline the cg +# - uniqueId: cg2 +# replicas: 3 +# image: selectdb/doris.be-ubuntu:3.0.2 \ No newline at end of file diff --git a/doc/examples/disaggregated/cluster/ddc-service-clusterip.yaml b/doc/examples/disaggregated/cluster/ddc-service-clusterip.yaml new file mode 100644 index 0000000..3b23e8e --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-service-clusterip.yaml @@ -0,0 +1,40 @@ +# 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: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + configMapNamespaceName: + name: test-cluster-config + namespace: default + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + service: + type: ClusterIP + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 + # service type default is ClusterIP + # service: + # type: ClusterIP \ No newline at end of file diff --git a/doc/examples/disaggregated/cluster/ddc-service-loadbalancer.yaml b/doc/examples/disaggregated/cluster/ddc-service-loadbalancer.yaml new file mode 100644 index 0000000..bbcb142 --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-service-loadbalancer.yaml @@ -0,0 +1,45 @@ +# 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: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + configMapNamespaceName: + name: test-cluster-config + namespace: default + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + service: + type: LoadBalancer + # The configuration of annotations from the cloud platform provider + annotations: + service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: "intranet" + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 + service: + type: LoadBalancer + # The configuration of annotations from the cloud platform provider + annotations: + service.beta.kubernetes.io/alibaba-cloud-loadbalancer-address-type: "intranet" \ No newline at end of file diff --git a/doc/examples/disaggregated/cluster/ddc-service-nodeport.yaml b/doc/examples/disaggregated/cluster/ddc-service-nodeport.yaml new file mode 100644 index 0000000..29cb5e8 --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-service-nodeport.yaml @@ -0,0 +1,57 @@ +# 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: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + configMapNamespaceName: + name: test-cluster-config + namespace: default + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + service: + type: NodePort + portMaps: + - nodePort: 31001 + targetPort: 8030 + - nodePort: 31002 + targetPort: 9020 + - nodePort: 31003 + targetPort: 9030 + - nodePort: 31004 + targetPort: 9010 + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 + service: + type: NodePort + portMaps: + - nodePort: 31011 + targetPort: 9060 + - nodePort: 31012 + targetPort: 8040 + - nodePort: 31013 + targetPort: 9050 + - nodePort: 31014 + targetPort: 8060 \ No newline at end of file diff --git a/doc/examples/disaggregated/cluster/ddc-single-fe.yaml b/doc/examples/disaggregated/cluster/ddc-single-fe.yaml new file mode 100644 index 0000000..9dead6f --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-single-fe.yaml @@ -0,0 +1,38 @@ +# 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: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + configMaps: + - name: ms-configmap + fdb: + configMapNamespaceName: + name: ${fdb-configmap} + namespace: ${fdb-namespace} + feSpec: + replicas: 1 + electionNumber: 1 + image: selectdb/doris.fe-ubuntu:3.0.2 + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 diff --git a/doc/examples/disaggregated/cluster/ddc-system-init.yaml b/doc/examples/disaggregated/cluster/ddc-system-init.yaml new file mode 100644 index 0000000..194d7b0 --- /dev/null +++ b/doc/examples/disaggregated/cluster/ddc-system-init.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: disaggregated.cluster.doris.com/v1 +kind: DorisDisaggregatedCluster +metadata: + name: test-disaggregated-cluster +spec: + metaService: + image: selectdb/doris.ms-ubuntu:3.0.2 + fdb: + configMapNamespaceName: + name: test-cluster-config + namespace: default + feSpec: + replicas: 2 + image: selectdb/doris.fe-ubuntu:3.0.2 + computeGroups: + - uniqueId: cg1 + replicas: 3 + image: selectdb/doris.be-ubuntu:3.0.2 + systemInitialization: + # 'initImage' is used to initialize the system parameter configuration that be depends on. + # 'selectdb/alpine:latest' is used by default. If you need to customize or modify the image name, you must modify the 'initImage' configuration + initImage: selectdb/alpine:latest + command: [ "/sbin/sysctl", "-w", "vm.max_map_count=2000000" ] +