Skip to content

Commit 7835562

Browse files
authored
(DOCSP-20567) Update multi-cluster steps with new location of Helm charts and fix other issues (#825)
* (DOCSP-20567) Update multi-cluster steps with new location of Helm charts, and fix other issues * Edits, ready for a review * Added charts to the list of tools in prereqs * Address tech review from Mircea * one more edit * one more edit * tech review 2nd round
1 parent 98ef7f9 commit 7835562

File tree

4 files changed

+76
-48
lines changed

4 files changed

+76
-48
lines changed

conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@
186186
'.. |mongod| replace:: :binary:`~bin.mongod`',
187187
'.. |mongos| replace:: :binary:`~bin.mongos`',
188188
'.. |mongo| replace:: :binary:`~bin.mongo`',
189-
'.. |multi-cluster| replace:: Multi-Cluster Deployment',
190-
'.. |multi-clusters| replace:: Multi-Cluster Deployments',
189+
'.. |multi-cluster| replace:: multi-cluster deployment',
190+
'.. |multi-clusters| replace:: multi-cluster deployments',
191191
'.. |oc| replace:: :xml:`<mono><link target="https://docs.openshift.com/container-platform/3.11/cli_reference/index.html">oc</link></mono>`',
192192
'.. |onprem| replace:: Ops Manager',
193193
'.. |onprem-link| replace:: :opsmgr:`Ops Manager </>`',
@@ -246,6 +246,7 @@
246246
'k8sdocs': ('https://kubernetes.io/docs%s', ''),
247247
'v1.2': ('https://docs.mongodb.com/kubernetes-operator/v1.2%s', ''),
248248
'github' : ('https://github.com%s', ''),
249+
'mdb-github' : ('https://mongodb.github.io%s', ''),
249250
'gopkg' : ('https://godoc.org%s',''),
250251
'npmjs' : ('https://www.npmjs.com/package%s',''),
251252
'osi' : ('https://opensource.org%s', ''),

source/includes/steps-multi-cluster-beta-quick-start.yaml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,23 @@ ref: clone-k8s-qs
55
inherit:
66
file: steps-multi-cluster-source.yaml
77
ref: clone-k8s-repo-multi-cluster
8+
89
---
910
stepnum: 2
1011
level: 4
1112
ref: run-mc-tool-qs
1213
inherit:
1314
file: steps-multi-cluster-source.yaml
1415
ref: run-multi-cluster-tool
16+
1517
---
1618
stepnum: 3
1719
level: 4
1820
ref: set-istio-webhook-qs
1921
inherit:
2022
file: steps-multi-cluster-source.yaml
2123
ref: set-istio-webhook
24+
2225
---
2326
stepnum: 4
2427
level: 4
@@ -30,21 +33,30 @@ inherit:
3033
---
3134
stepnum: 5
3235
level: 4
36+
ref: install-mc-helm-charts
37+
inherit:
38+
file: steps-multi-cluster-source.yaml
39+
ref: install-helm-charts
40+
41+
---
42+
stepnum: 6
43+
level: 4
3344
ref: install-kubectl-mc-qs
3445
inherit:
3546
file: steps-multi-cluster-source.yaml
3647
ref: install-kubectl-mc
3748

3849
---
39-
stepnum: 6
50+
stepnum: 7
51+
level: 4
4052
title: "Deploy the MongoDB resource."
4153
ref: deploy-mdbresource-mc-qs
4254
inherit:
4355
file: steps-multi-cluster-source.yaml
4456
ref: deploy-mdbresource-mc
4557

4658
---
47-
stepnum: 7
59+
stepnum: 8
4860
level: 4
4961
ref: verify-mdb-resources-mc-qs
5062
inherit:

source/includes/steps-multi-cluster-source.yaml

Lines changed: 56 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
---
2+
stepnum: 0
3+
level: 4
4+
ref: install-helm-charts
5+
title: "Add :mdb-github:`MongoDB Helm Charts for Kubernetes </helm-charts>` from their repository to Helm."
6+
content: |
7+
8+
.. code-block:: sh
9+
10+
helm repo add mongodb https://mongodb.github.io/helm-charts
11+
112
---
213
stepnum: 0
314
level: 4
@@ -21,13 +32,16 @@ content: |
2132
three member clusters, and a namespace labeled ``mongodb`` in each of
2233
the clusters.
2334
24-
a. Change to the directory to which you cloned the repository.
35+
a. Change to the directory to which you cloned the |k8s-op-short|
36+
repository, and then to the directory that has the ``multi-cluster kubeconfig creator``
37+
tool.
2538
#. Run the :github:`multi-cluster kubeconfig creator </mongodb/mongodb-enterprise-kubernetes/blob/master/tools/multicluster/main.go>`
2639
tool:
2740
2841
.. code-block:: sh
2942
30-
go run tools/multicluster/main.go \
43+
cd tools/multicluster
44+
go run main.go \
3145
-central-cluster="${MDB_CENTRAL_CLUSTER_FULL_NAME}" \
3246
-member-clusters="${MDB_CLUSTER_1_FULL_NAME},${MDB_CLUSTER_2_FULL_NAME},${MDB_CLUSTER_3_FULL_NAME}" \
3347
-member-cluster-namespace="mongodb" \
@@ -40,35 +54,36 @@ ref: set-istio-webhook
4054
title: "Set the Istio injection webhook in each member cluster."
4155
content: |
4256
43-
In each member cluster, label namespaces with the
44-
``istio-injection=enabled`` label to enable Istio's injection
45-
webhook. This ensures that any Pods that you create in these
46-
namespaces will have a sidecar added to them. To learn more, see
47-
`Automatic sidecar injection <https://istio.io/latest/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection>`__
57+
Run the following command on the central cluster, specifying the context
58+
for each of the member clusters in the deployment. These commands add
59+
the``istio-injection=enabled`` label to the ``mongodb`` namespace on
60+
each member cluster. This label configures Istio's injection webhook
61+
which enables adding a sidecar to any Pods that you create in this
62+
namespace. To learn more, see `Automatic sidecar injection <https://istio.io/latest/docs/setup/additional-setup/sidecar-injection/#automatic-sidecar-injection>`__
4863
in the Istio documentation.
4964
5065
.. code-block:: sh
5166
:emphasize-lines: 4
5267
5368
kubectl label \
5469
--context=$MDB_CLUSTER_1_FULL_NAME \
55-
--namespace mongodb \
56-
istio-injection=enabled
70+
namespace mongodb \
71+
istio-injection=enabled
5772
5873
.. code-block:: sh
5974
:emphasize-lines: 4
6075
6176
kubectl label \
6277
--context=$MDB_CLUSTER_2_FULL_NAME \
63-
--namespace mongodb \
78+
namespace mongodb \
6479
istio-injection=enabled
6580
6681
.. code-block:: sh
6782
:emphasize-lines: 4
6883
6984
kubectl label \
7085
--context=$MDB_CLUSTER_3_FULL_NAME \
71-
--namespace mongodb \
86+
namespace mongodb \
7287
istio-injection=enabled
7388
7489
---
@@ -78,7 +93,7 @@ title: "Configure ``kubectl`` to use the central cluster's namespace."
7893
ref: configure-kubectl-mc
7994
content: |
8095
81-
If you have not done so already, run the following commands to execute
96+
If you have not done so already, run the following commands to run
8297
all ``kubectl`` commands on the central cluster in the default
8398
namespace. In the following steps, you will install the |k8s-op-short|
8499
into this namespace.
@@ -96,17 +111,18 @@ title: "Install the |k8s-op-full| in the central cluster."
96111
ref: install-kubectl-mc
97112
content: |
98113
99-
Use Helm to install the |k8s-op-short| for managing your
100-
|multi-cluster|:
114+
Use the Helm charts for the |k8s-op-short| and multi-cluster deployments
115+
to install |k8s-op-short| for managing your |multi-cluster|:
101116
102117
.. code-block:: sh
103118
104119
helm upgrade \
105120
--install \
106121
mongodb-enterprise-operator-multi-cluster \
107-
public/helm_chart \
122+
mongodb/enterprise-operator \
108123
--namespace mongodb \
109124
--set namespace=mongodb \
125+
--version <mongodb-kubernetes-operator-version> \
110126
--set operator.name=mongodb-enterprise-operator-multi-cluster \
111127
--set operator.createOperatorServiceAccount=false \
112128
--set "multiCluster.clusters={${MDB_CLUSTER_1_FULL_NAME},${MDB_CLUSTER_2_FULL_NAME},${MDB_CLUSTER_3_FULL_NAME}}"
@@ -116,21 +132,21 @@ title: "Deploy the MongoDB resource."
116132
ref: deploy-mdbresource-mc
117133
content: |
118134
119-
a. Create a secret in each member cluster so that the |k8s-op-short|
135+
a. On the central cluster, create a secret so that the |k8s-op-short|
120136
can create and update objects in your |mms| project.
121137
To learn more, see :ref:`create-k8s-credentials`.
122138
123-
#. Create a ConfigMap in each member cluster to link the
124-
|k8s-op-short| to your |mms| project.
125-
To learn more, see :ref:`create-k8s-project`.
139+
#. On the central cluster, create a ConfigMap to link the |k8s-op-short|
140+
to your |mms| project. To learn more, see :ref:`create-k8s-project`.
126141
127-
#. Configure the required service accounts in each member cluster:
142+
#. On the central cluster, configure the required service accounts
143+
for each member cluster:
128144
129145
.. code-block:: sh
130146
131147
helm template --show-only \
132148
templates/database-roles.yaml \
133-
public/helm_chart \
149+
mongodb/enterprise-operator \
134150
--set namespace=mongodb | \
135151
kubectl apply -f - \
136152
--context=$MDB_CLUSTER_1_FULL_NAME \
@@ -140,7 +156,7 @@ content: |
140156
141157
helm template --show-only \
142158
templates/database-roles.yaml \
143-
public/helm_chart \
159+
mongodb/enterprise-operator \
144160
--set namespace=mongodb | \
145161
kubectl apply -f - \
146162
--context=$MDB_CLUSTER_2_FULL_NAME \
@@ -150,7 +166,7 @@ content: |
150166
151167
helm template --show-only \
152168
templates/database-roles.yaml \
153-
public/helm_chart \
169+
mongodb/enterprise-operator \
154170
--set namespace=mongodb | \
155171
kubectl apply -f - \
156172
--context=$MDB_CLUSTER_3_FULL_NAME \
@@ -175,28 +191,24 @@ content: |
175191
apiVersion: mongodb.com/v1
176192
kind: MongoDBMulti
177193
metadata:
178-
name: multi-replica-set
194+
name: multi-replica-set
179195
spec:
180-
version: 4.4.0-ent
181-
type: ReplicaSet
182-
persistent: false
183-
duplicateServiceObjects: true
184-
credentials: my-credentials
185-
security:
186-
authentication:
187-
enabled: true
188-
modes: ["SCRAM"]
189-
opsManager:
190-
configMapRef:
191-
name: my-project
192-
clusterSpecList:
193-
clusterSpecs:
194-
- clusterName: ${MDB_CLUSTER_1_FULL_NAME}
195-
members: 3
196-
- clusterName: ${MDB_CLUSTER_2_FULL_NAME}
197-
members: 2
198-
- clusterName: ${MDB_CLUSTER_3_FULL_NAME}
199-
members: 3
196+
version: 4.4.0-ent
197+
type: ReplicaSet
198+
persistent: false
199+
duplicateServiceObjects: true
200+
credentials: my-credentials
201+
opsManager:
202+
configMapRef:
203+
name: my-project
204+
clusterSpecList:
205+
clusterSpecs:
206+
- clusterName: ${MDB_CLUSTER_1_FULL_NAME}
207+
members: 3
208+
- clusterName: ${MDB_CLUSTER_2_FULL_NAME}
209+
members: 2
210+
- clusterName: ${MDB_CLUSTER_3_FULL_NAME}
211+
members: 3
200212
EOF
201213
---
202214
stepnum: 0

source/multi-cluster-quick-start.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ documentation:
8989
</mongodb/mongodb-enterprise-kubernetes>` with configuration
9090
files that the |k8s-op-short| needs to deploy a |k8s| cluster.
9191

92+
- :mdb-github:`MongoDB Helm Charts for Kubernetes </helm-charts>` with
93+
charts for |multi-clusters|.
94+
9295
- Documentation from Istio to `Install Multicluster <https://istio.io/latest/docs/setup/install/multicluster/>`__.
9396

9497
- :github:`install_istio_separate_network script </mongodb/mongodb-enterprise-kubernetes/blob/master/tools/multicluster/install_istio_separate_network.sh>`

0 commit comments

Comments
 (0)