Skip to content

Commit

Permalink
add ddc example
Browse files Browse the repository at this point in the history
  • Loading branch information
catpineapple committed Dec 16, 2024
1 parent c304420 commit 763f1e9
Show file tree
Hide file tree
Showing 13 changed files with 428 additions and 6 deletions.
1 change: 0 additions & 1 deletion doc/examples/disaggregated/cluster/ddc-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ spec:
configMaps:
- name: ms-configmap
fdb:
# address: ${fdb_endpoint}
configMapNamespaceName:
name: ${fdb-configmap}
namespace: ${fdb-namespace}
Expand Down
34 changes: 34 additions & 0 deletions doc/examples/disaggregated/cluster/ddc-fdb-address.yaml
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions doc/examples/disaggregated/cluster/ddc-fdb-conf.yaml
Original file line number Diff line number Diff line change
@@ -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
54 changes: 54 additions & 0 deletions doc/examples/disaggregated/cluster/ddc-hosts-and-env.yaml
Original file line number Diff line number Diff line change
@@ -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'
9 changes: 5 additions & 4 deletions doc/examples/disaggregated/cluster/ddc-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -53,7 +54,7 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
storage: 120Gi
- uniqueId: cg2
replicas: 3
image: selectdb/doris.be-ubuntu:3.0.2
Expand All @@ -65,4 +66,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 100Gi
storage: 120Gi
1 change: 0 additions & 1 deletion doc/examples/disaggregated/cluster/ddc-sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
39 changes: 39 additions & 0 deletions doc/examples/disaggregated/cluster/ddc-scaledown-decommission.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: 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
39 changes: 39 additions & 0 deletions doc/examples/disaggregated/cluster/ddc-scaledown-dropcg.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: 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
40 changes: 40 additions & 0 deletions doc/examples/disaggregated/cluster/ddc-service-clusterip.yaml
Original file line number Diff line number Diff line change
@@ -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
45 changes: 45 additions & 0 deletions doc/examples/disaggregated/cluster/ddc-service-loadbalancer.yaml
Original file line number Diff line number Diff line change
@@ -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"
Loading

0 comments on commit 763f1e9

Please sign in to comment.