Skip to content

Commit 6331c82

Browse files
jvincent-mongodbJulien-Benlsierant
authored
DOCSP-45418 -- Update MCSC Overview page for GA (#1988)
* DOCSP-45418 -- Update MCSC Overview page for GA * DOCSP-45418 -- remove public preview banner * DOCSP-45418 -- copy edit * DOCSP-45418 -- review revisions * DOCSP-45418 -- add example yaml content * DOCSP-45418 -- fix list items * DOCSP-45418 -- fix list items * DOCSP-45418 -- fix list items * DOCSP-45418 -- fix list items * DOCSP-45418 -- fix list items * DOCSP-45418 -- remove banner * DOCSP-45418 -- External review revsions * DOCSP-45418 -- External review revsions * DOCSP-45418 -- External review revsions * DOCSP-45418 -- External review revsions * DOCSP-45418 -- external review revisions * DOCSP-45418 -- begin shard overrides * DOCSP-45418 -- wip * DOCSP-45418 -- wip * DOCSP-45418 -- wip * DOCSP-45418 -- wip * DOCSP-45418 -- wip * Add Multi Cluster Sharded Cluster examples files - shard overrides * DOCSP-45418 -- WIP * DOCSP-45418 -- add code snippits * DOCSP-45418 -- add code snippits * DOCSP-45418 -- add code snippits * DOCSP-45418 -- add code snippits * DOCSP-45418 -- add code snippits * DOCSP-45418 -- disaster recovery * DOCSP-45418 -- remove merge policy column from table * DOCSP-45418 -- add links * Wrapped yaml examples for MC Sharded * DOCSP-45418 -- disaster recovery pages added * DOCSP-45418 -- DR WIP * DOCSP-45418 -- DR WIP * DOCSP-45418 -- DR Operator Cluster Works * DOCSP-45418 -- replica sets lose majority * DOCSP-45418 -- Add DR no k8s op cluster * DOCSP-45418 -- DR WIP * DOCSP-45418 -- add merge policy definition * DOCSP-45418 -- technical review -- shard overrides and DR * DOCSP-45418 -- external review * DOCSP-45418 -- external review * DOCSP-45418 -- non-service mesh * DOCSP-45418 -- shard overrides; non-service mesh * DOCSP-45418 -- external review * DOCSP-45418 -- WIP * DOCSP-45418 -- external review * DOCSP-45418 -- external review --------- Co-authored-by: Julien-Ben <[email protected]> Co-authored-by: Łukasz Sierant <[email protected]>
1 parent 4f38cf2 commit 6331c82

14 files changed

+883
-196
lines changed

snooty.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ toc_landing_pages = [
1616
"/multi-cluster",
1717
"/multi-cluster-connect",
1818
"/om-resources",
19+
"/multi-cluster-sharded-cluster-disaster-recovery",
1920
"/reference",
2021
"/reference/operator-settings",
2122
"/reference-architectures/multi-cluster",
@@ -218,6 +219,7 @@ service-pricing = "Atlas pricing page"
218219
service = "Atlas"
219220
mdb-support = "`MongoDB Support <https://support.mongodb.com/welcome>`__"
220221
svc-api-key = "Programmatic API Key"
222+
sharded-cluster = "Sharded Cluster"
221223
sms = ":abbr:`SMS (short message service)`"
222224
sni = ":abbr:`SNI (Server Name Indication)`"
223225
smtp = ":abbr:`SMTP (Simple Mail Transport Protocol)`"

source/includes/code-examples/yaml-files/example-sharded-cluster-deployment.yaml

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ spec:
77
type: ShardedCluster
88
# this deployment will have 3 shards
99
shardCount: 3
10-
# you cannot specify mongodsPerShardCount, configServerCount and mongosCount in MultiCluster topology
10+
# you cannot specify mongodsPerShardCount, configServerCount and mongosCount
11+
# in MultiCluster topology
1112
version: 8.0.3
1213
opsManager:
1314
configMapRef:
@@ -18,7 +19,10 @@ spec:
1819
shardPodSpec: # applies to all shards on all clusters
1920
persistence:
2021
single:
21-
storage: 10G # all pods for all shards on all clusters will use that storage size in their PersistentVolumeClaim unless overridden in spec.shard.clusterSpecList or spec.shardOverrides.
22+
# all pods for all shards on all clusters will use that storage size in their
23+
# PersistentVolumeClaim unless overridden in spec.shard.clusterSpecList or
24+
# spec.shardOverrides.
25+
storage: 10G
2226

2327
configSrvPodSpec: # applies to all config server nodes in all clusters
2428
persistence:
@@ -30,43 +34,62 @@ spec:
3034
logs:
3135
storage: 1G
3236

33-
shard: # consider this section as a default configuration for ALL shards
37+
# consider this section as a default configuration for ALL shards
38+
shard:
3439
clusterSpecList:
3540
- clusterName: kind-e2e-cluster-1
36-
members: 1 # each shard will have only one mongod process deployed in this cluster
41+
# each shard will have only one mongod process deployed in this cluster
42+
members: 1
3743
memberConfig:
3844
- votes: 1
3945
priority: "20" # we increase the priority to have primary in this cluster
4046
- clusterName: kind-e2e-cluster-2
41-
members: 1 # one member in this cluster, no votes and priority defined means it'll get the default values votes=1, priority="1"
47+
# one member in this cluster, no votes and priority defined means it'll get
48+
# the default values votes=1, priority="1"
49+
members: 1
4250
- clusterName: kind-e2e-cluster-3
4351
members: 1 # one member in this cluster
4452

4553
shardOverrides: # here you specify customizations for specific shards
46-
- shardNames: # here you specify to which shard names the following configuration will apply
54+
# here you specify to which shard names the following configuration will
55+
# apply
56+
- shardNames:
4757
- sc-0
4858
clusterSpecList:
4959
- clusterName: kind-e2e-cluster-1
5060
# all fields here are optional
51-
members: 2 # shard "sc-0" will have two members instead of one, which was defined as the default for all shards in spec.shard.clusterSpecList[0].members
61+
# shard "sc-0" will have two members instead of one, which was defined as the
62+
# default for all shards in spec.shard.clusterSpecList[0].members
63+
members: 2
5264
memberConfig:
5365
- votes: 1
54-
priority: "1" # shard "sc-0" should not have primary in this cluster like every other shard
66+
# shard "sc-0" should not have primary in this cluster like every other shard
67+
priority: "1"
5568
- votes: 1
5669
priority: "1"
5770
- clusterName: kind-e2e-cluster-2
5871
members: 2 # shard "sc-0" will have two members instead of one
5972
memberConfig:
6073
- votes: 1
61-
priority: "20" # both processes of shard "sc-0" in this cluster will have the same likelihood to become a primary member
74+
# both processes of shard "sc-0" in this cluster will have the same
75+
# likelihood to become a primary member
76+
priority: "20"
6277
- votes: 1
6378
priority: "20"
64-
- clusterName: kind-e2e-cluster-3 # We need to specify the list of all clusters on which this shard will be deployed.
65-
# If the clusterName element is omitted here, it will be considered as an override for this shard, so that the operator shouldn't deploy any member to it.
66-
# No fields are mandatory in here, though. In case a field is not set, it's not overridden and the default value is taken from a top level spec.shard settings.
79+
# We need to specify the list of all clusters on which this shard will be
80+
# deployed.
81+
- clusterName: kind-e2e-cluster-3
82+
# If the clusterName element is omitted here, it will be considered as an
83+
# override for this shard, so that the operator shouldn't deploy any member
84+
# to it.
85+
# No fields are mandatory in here, though. In case a field is not set, it's
86+
# not overridden and the default value is taken from a top level spec.shard
87+
# settings.
6788

6889
configSrv:
69-
clusterSpecList: # the same configuration fields are available as in spec.shard.clusterSpecList.
90+
# the same configuration fields are available as in
91+
# spec.shard.clusterSpecList.
92+
clusterSpecList:
7093
- clusterName: kind-e2e-cluster-1
7194
members: 1
7295
- clusterName: kind-e2e-cluster-2
@@ -75,11 +98,13 @@ spec:
7598
members: 1
7699

77100
mongos:
78-
clusterSpecList: # the same configuration fields are available as in spec.shard.clusterSpecList apart from storage and replica-set related fields.
101+
# the same configuration fields are available as in
102+
# spec.shard.clusterSpecList apart from storage and replica-set related
103+
# fields.
104+
clusterSpecList:
79105
- clusterName: kind-e2e-cluster-1
80106
members: 1
81107
- clusterName: kind-e2e-cluster-2
82108
members: 1
83109
- clusterName: kind-e2e-cluster-3
84110
members: 1
85-

source/includes/code-examples/yaml-files/pod_template_config_servers.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ spec:
1818
credentials: my-credentials
1919
persistent: true
2020

21+
# doc-region-start: configSrv
2122
configSrvPodSpec: # applicable to all members in all clusters
2223
persistence:
2324
single:
@@ -63,7 +64,7 @@ spec:
6364
storage: "6G"
6465
- clusterName: kind-e2e-cluster-2
6566
members: 1
66-
67+
# doc-highlight-end: configSrv
6768
mongos:
6869
clusterSpecList:
6970
- clusterName: kind-e2e-cluster-1

source/includes/code-examples/yaml-files/pod_template_shards_0.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# This file is a minimal example of how to define global custom pod templates and persistence settings
2-
# and how to override them in clusterSpecList
1+
# This file is a minimal example of how to define global custom pod templates
2+
# and persistence settings and how to override them in clusterSpecList
33
apiVersion: mongodb.com/v1
44
kind: MongoDB
55
metadata:
@@ -26,7 +26,7 @@ spec:
2626
- clusterName: kind-e2e-cluster-1
2727
members: 2
2828
- clusterName: kind-e2e-cluster-2
29-
members: 1
29+
members: 1 # cluster count
3030

3131
shardPodSpec: # applicable to all shards in all clusters
3232
persistence:
@@ -48,8 +48,10 @@ spec:
4848
- clusterName: kind-e2e-cluster-1
4949
members: 2
5050
# The below statefulset override is applicable only to pods in kind-e2e-cluster-1
51-
# Specs will be merged, the "request" field defined above will still be applied to containers in this cluster
52-
# However, limits will be replaced with below values, because clusterSpecList.statefulSet.spec.template has a
51+
# Specs will be merged, the "request" field defined above will still be
52+
# applied to containers in this cluster.
53+
# However, limits will be replaced with below values, because
54+
# clusterSpecList.statefulSet.spec.template has a
5355
# higher priority than shardPodSpec.podTemplate
5456
statefulSet:
5557
spec:
@@ -61,8 +63,11 @@ spec:
6163
limits:
6264
cpu: 1.0
6365
memory: 2.5G
64-
# In clusterSpecList.podSpec, only persistence field must be used, the podTemplate field is ignored.
65-
podSpec: # In kind-e2e-cluster-1, we replace the persistence settings defined in shardPodSpec
66+
# In clusterSpecList.podSpec, only persistence field must be used, the
67+
# podTemplate field is ignored.
68+
# In kind-e2e-cluster-1, we replace the persistence settings defined in
69+
# shardPodSpec
70+
podSpec:
6671
persistence:
6772
multiple:
6873
journal:

source/includes/code-examples/yaml-files/pod_template_shards_1.yaml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# This file is a minimal example of how to define custom pod templates and persistence settings
2-
# at the cluster level, and in shard overrides.
1+
# This file is a minimal example of how to define custom pod templates and
2+
# persistence settings at the cluster level, and in shard overrides.
33
apiVersion: mongodb.com/v1
44
kind: MongoDB
55
metadata:
@@ -43,8 +43,10 @@ spec:
4343
limits:
4444
cpu: 1.0
4545
memory: 2.0G
46-
# In clusterSpecList.podSpec, only persistence field must be used, the podTemplate field is ignored.
47-
podSpec: # In kind-e2e-cluster-1, we define custom persistence settings
46+
# In clusterSpecList.podSpec, only persistence field must be used, the
47+
# podTemplate field is ignored.
48+
# In kind-e2e-cluster-1, we define custom persistence settings
49+
podSpec:
4850
persistence:
4951
multiple:
5052
journal:
@@ -57,13 +59,15 @@ spec:
5759
members: 1
5860

5961
shardOverrides:
60-
- shardNames: [ "pod-template-shards-1-2" ] # this override will apply to shard of index 2
61-
# Statefulset settings defined at this level (shardOverrides.statefulSet) apply to members
62-
# of shard 2 in ALL clusters
63-
# This field has higher priority than shard.clusterSpecList.statefulSet, but lower than
64-
# shardOverrides.clusterSpecList.statefulSet
65-
# It has a merge policy, which means that the limits defined above for the mongodb-enterprise-database container
66-
# field still apply to all members in that shard, except if overriden.
62+
- shardNames: [ "pod-template-shards-1-2" ]
63+
# This override will apply to shard of index 2
64+
# Statefulset settings defined at this level (shardOverrides.statefulSet)
65+
# apply to members of shard 2 in ALL clusters.
66+
# This field has higher priority than shard.clusterSpecList.statefulSet, but
67+
# lower than shardOverrides.clusterSpecList.statefulSet
68+
# It has a merge policy, which means that the limits defined above for the
69+
# mongodb-enterprise-database container field still apply to all members in
70+
# that shard, except if overridden.
6771
statefulSet:
6872
spec:
6973
template:
@@ -79,8 +83,8 @@ spec:
7983
- clusterName: kind-e2e-cluster-2
8084
members: 1
8185
# The below statefulset override is applicable only to members of shard 2, in cluster 1
82-
# Specs will be merged, the "limits" field defined above will still be applied to containers in this cluster,
83-
# together with the requests field below.
86+
# Specs will be merged, the "limits" field defined above will still be applied
87+
# to containers in this cluster together with the requests field below.
8488
statefulSet:
8589
spec:
8690
template:
@@ -93,7 +97,8 @@ spec:
9397
memory: 1.0G
9498

9599
podSpec:
96-
# In shardOverrides.clusterSpecList.podSpec, only persistence field must be used, the podTemplate field is ignored.
100+
# In shardOverrides.clusterSpecList.podSpec, only persistence field must be
101+
# used, the podTemplate field is ignored.
97102
persistence: # we assign additional disk resources in shard 2, cluster 1
98103
multiple:
99104
journal:

source/includes/code-examples/yaml-files/shardSpecificPodSpec_migration.yaml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
# This file is an example of how to migrate from the old deprecated ShardSpecificPodSpec field to the new
2-
# shardOverrides fields, for single cluster deployments.
3-
# The settings specified in shardOverrides are the exact equivalent to the ones in shardSpecificPodSpec, showing how
4-
# to replicate them
1+
# This file is an example of how to migrate from the old deprecated
2+
# ShardSpecificPodSpec field to the new shardOverrides fields
3+
# for single cluster deployments.
4+
# The settings specified in shardOverrides are the exact equivalent to the
5+
# ones in shardSpecificPodSpec, showing how to replicate them
56
apiVersion: mongodb.com/v1
67
kind: MongoDB
78
metadata:
89
name: shardspecificpodspec-migration
910
namespace: mongodb-test
1011
spec:
11-
# There are 4 shards in this cluster, but the shardSpecificPodSpec field doesn't need to have on entry per shard,
12-
# it can have less
12+
# There are 4 shards in this cluster, but the shardSpecificPodSpec field
13+
# doesn't need to have on entry per shard, it can have less
1314
shardCount: 4
1415
mongodsPerShardCount: 2
1516
mongosCount: 1
@@ -32,7 +33,8 @@ spec:
3233
- persistence: # shard of index 0
3334
single:
3435
storage: "6G"
35-
podTemplate: # Specify resources settings to enterprise database container in shard 0
36+
# Specify resources settings to enterprise database container in shard 0
37+
podTemplate:
3638
spec:
3739
containers:
3840
- name: mongodb-enterprise-database
@@ -50,7 +52,8 @@ spec:
5052
single:
5153
storage: "7G"
5254

53-
# The below shardOverrides replicate the same shards configuration as the one specified above in shardSpecificPodSpec
55+
# The below shardOverrides replicate the same shards configuration as the one
56+
# specified above in shardSpecificPodSpec
5457
shardOverrides:
5558
- shardNames: [ "shardspecificpodspec-migration-0" ] # overriding shard #0
5659
podSpec:
@@ -71,8 +74,9 @@ spec:
7174
cpu: 1.0
7275
memory: 2.0G
7376

74-
# The ShardSpecificPodSpec field above has the same configuration for shards 1 and 2. It is possible
75-
# to specify both shard names in the override and not duplicate that configuration
77+
# The ShardSpecificPodSpec field above has the same configuration for shards
78+
# 1 and 2. It is possible to specify both shard names in the override and not
79+
# duplicate that configuration
7680
- shardNames: [ "shardspecificpodspec-migration-1", "shardspecificpodspec-migration-2" ]
7781
podSpec:
7882
persistence:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
.. _mcsc-disaster-recovery:
2+
3+
=============================================================
4+
Disaster Recovery for Multi-Cluster Sharded Cluster Resources
5+
=============================================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. contents:: On this page
10+
:local:
11+
:backlinks: none
12+
:depth: 1
13+
:class: singlecol
14+
15+
:ref:`recover-mcsc-yes-k8sop-cluster`
16+
17+
:ref:`recover-mcsc-no-k8sop-cluster`
18+
19+
:ref:`recover-mcsc-forced-reconfig`
20+
21+
.. toctree::
22+
:titlesonly:
23+
:hidden:
24+
25+
Recover Available Cluster </tutorial/recover-mcsc-yes-k8sop-cluster>
26+
Recover Failed Cluster </tutorial/recover-mcsc-no-k8sop-cluster>
27+
Recover Lost Majority Replica Set </tutorial/recover-mcsc-forced-reconfig>

0 commit comments

Comments
 (0)