Skip to content

Commit 7aea3d9

Browse files
DOCSP-48489 -- Multi Cluster OM Non-Mesh (#2093)
* DOCSP-48489 -- MCOM Non-Mesh Reference WIP * DOCSP-48489 -- Add all required pages and TOC entries * DOCSP-48489 -- add app db config field * DOCSP-48489 -- add more fields * DOCSP-48489 -- remove reference items from OM reference * DOCSP-48489 -- WIP * DOCSP-48489 -- WIP * DOCSP-48489 -- add new ref arch no mesh WIP * DOCSP-48489 -- add no mesh to ref arch toc * DOCSP-48489 -- toc update * DOCSP-48489 -- toc update * DOCSP-48489 -- toc update * DOCSP-48489 -- multi-cluster-no-mesh links * DOCSP-48489 -- multi-cluster-no-mesh links * DOCSP-48489 -- external dns page and toc entry * DOCSP-48489 -- titles and links * DOCSP-48489 -- WIP * DOCSP-48489 -- fix duplicate settings entries * DOCSP-48489 -- no mesh om procedure * DOCSP-48489 -- no mesh replica sets procedure * DOCSP-48489 -- no mesh sharded cluster procedure * DOCSP-48489 -- copy review revisions * DOCSP-48489 -- technical review revisions * DOCSP-48489 -- external review revisions * DOCSP-48489 -- external review * DOCSP-48489 -- rename central cluster to operator cluster
1 parent 3536408 commit 7aea3d9

20 files changed

+974
-28
lines changed

snooty.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ toc_landing_pages = [
1919
"/multi-cluster-sharded-cluster-disaster-recovery",
2020
"/reference",
2121
"/reference/operator-settings",
22-
"/reference-architectures/multi-cluster",
22+
"/reference-architectures/multi-cluster/multi-cluster",
23+
"/reference-architectures/multi-cluster-no-mesh/multi-cluster-no-mesh",
2324
"/security",
2425
"/tutorial/om-arch",
2526
"/tutorial/om-arch-multi-cluster",

source/reference-architectures.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,5 @@ Reference Architectures
2121
:hidden:
2222

2323
How to Use a Reference Architecture </reference-architectures/how-to-use>
24-
Multi-Cluster Architecture </reference-architectures/multi-cluster>
24+
Multi-Cluster Architecture </reference-architectures/multi-cluster/multi-cluster>
25+
Multi-Cluster Architecture Without Service Mesh </reference-architectures/multi-cluster-no-mesh/multi-cluster-no-mesh>
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
.. _reference-architectures-ca-certs-no-mesh:
2+
3+
==========================
4+
Configure TLS Certificates
5+
==========================
6+
7+
.. default-domain:: mongodb
8+
9+
.. facet::
10+
:name: genre
11+
:values: tutorial
12+
13+
.. contents:: On this page
14+
:local:
15+
:backlinks: none
16+
:depth: 1
17+
:class: singlecol
18+
19+
This section provides guidance on the creation of TLS certificates for each
20+
component of MongoDB, and the creation of |k8s| Secrets in each of your |k8s|
21+
clusters to mount the TLS certificates securely into the appropriate |k8s| Pods.
22+
23+
The process outlined below utilizes `Cert Manager <https://cert-manager.io/>`__
24+
for creating the TLS certificates. However, note that this is an
25+
opinionated guide, and CertManager is not supported by MongoDB. Moreover, CertManager
26+
is only one of many ways in which you can add TLS certificates to your |k8s| clusters.
27+
Additionally, self-signed certificates may not be suitable for production deployments,
28+
depending on the security requirements of your organization. If you require
29+
publicly trusted certificates configure your `Issuer <https://cert-manager.io/docs/configuration/issuers/>`__ accordingly
30+
or provide the TLS certificate directly. To learn more, see :ref:`<cert-manager-integration>`.
31+
32+
Prerequisites
33+
-------------
34+
35+
Before you begin, perform the following tasks:
36+
37+
- Install ``kubectl``.
38+
- |helm-install|.
39+
- Set the ``K8S_CLUSTER_*_CONTEXT_NAME`` environment variables as
40+
explained in the :ref:`GKE Clusters guide <reference-architectures-gke-clusters>`.
41+
42+
Source Code
43+
-----------
44+
45+
You can find all included source code in the :github:`MongoDB Kubernetes Operator repository <mongodb/mongodb-enterprise-kubernetes/tree/{+github-branch+}/architectures/setup-multi-cluster/setup-cert-manager>`.
46+
47+
Procedure
48+
----------
49+
50+
.. procedure::
51+
:style: normal
52+
53+
.. step:: Add the Helm charts repo.
54+
55+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-cert-manager/code_snippets/0215_helm_configure_repo.sh
56+
:language: bash
57+
:linenos:
58+
59+
.. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-cert-manager/output/0215_helm_configure_repo.out
60+
61+
.. step:: Use Helm to install cert-manager.
62+
63+
.. io-code-block::
64+
65+
.. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-cert-manager/code_snippets/0216_helm_install_cert_manager.sh
66+
:language: bash
67+
:linenos:
68+
69+
.. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-cert-manager/output/0216_helm_install_cert_manager.out
70+
71+
.. step:: Create a certificate issuer.
72+
73+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-cert-manager/code_snippets/0220_create_issuer.sh
74+
:language: bash
75+
:linenos:
76+
77+
.. step:: Verify creation of the issuer.
78+
79+
.. io-code-block::
80+
81+
.. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-cert-manager/code_snippets/0221_verify_issuer.sh
82+
:language: bash
83+
:linenos:
84+
85+
.. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-cert-manager/output/0221_verify_issuer.out
86+
87+
.. step:: Create CA configMap.
88+
89+
If your |onprem| TLS certificate is signed by a custom CA, the CA
90+
certificate must also contain additional certificates that allows the
91+
agents to download MongoDB binaries from the internet. To create the TLS
92+
certificate(s), create a ConfigMap to hold the CA certificate:
93+
94+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-cert-manager/code_snippets/0225_create_ca_configmap.sh
95+
:language: bash
96+
:linenos:
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
.. _reference-architectures-deploy-operator-no-mesh:
2+
3+
=============================================================
4+
Deploy the |k8s-op| Without a Service Mesh
5+
=============================================================
6+
7+
.. default-domain:: mongodb
8+
9+
.. facet::
10+
:name: genre
11+
:values: tutorial
12+
13+
.. contents:: On this page
14+
:local:
15+
:backlinks: none
16+
:depth: 1
17+
:class: singlecol
18+
19+
20+
In order to deploy multiple instances of MongoDB resources across multiple
21+
|k8s| clusters, you first need to deploy the |k8s-op-short| to one of your
22+
|k8s| clusters. Once the |k8s-op-short| is deployed to your operator |k8s| cluster,
23+
you can then create and manage all of your MongoDB resources across all of your
24+
|k8s| clusters by applying updates to your operator |k8s| cluster.
25+
26+
Prerequisites
27+
-------------
28+
29+
Before you begin the following procedure, perform the following actions:
30+
31+
- Install ``kubectl``.
32+
- |helm-install|.
33+
- Complete the :ref:`GKE Clusters procedure <reference-architectures-gke-clusters>` or the equivalent.
34+
- Complete the :ref:`TLS Certificates procedure <reference-architectures-ca-certs>` or the equivalent.
35+
- Complete the :ref:`Istio Service mesh procedure <reference-architectures-istio-service-mesh>` or the equivalent.
36+
- Install the |kubectl-mongodb|.
37+
To install the |kubectl-mongodb|:
38+
39+
.. include:: /includes/steps/install-kubectl-mongodb-plugin.rst
40+
- Update as needed and set the environment variables defined in the following ``env_variables.sh`` file.
41+
42+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/env_variables.sh
43+
:language: bash
44+
:linenos:
45+
46+
Source Code
47+
-----------
48+
49+
You can find all included source code in the :github:`MongoDB Kubernetes Operator repository </mongodb/mongodb-enterprise-kubernetes/tree/{+github-branch+}/architectures/setup-multi-cluster/setup-operator>`.
50+
51+
Procedure
52+
---------
53+
54+
.. procedure::
55+
:style: normal
56+
57+
.. step:: Create namespaces for the |k8s-op-short|, MongoDB and |onprem| in each of your |k8s| clusters.
58+
59+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0045_create_namespaces.sh
60+
:language: bash
61+
62+
.. step:: Create image pull secrets.
63+
64+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0046_create_image_pull_secrets.sh
65+
:language: bash
66+
67+
.. step:: Configure your |k8s| clusters.
68+
69+
Run the following command to configure your |k8s| clusters.
70+
71+
.. io-code-block::
72+
:copyable: true
73+
74+
.. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0200_kubectl_mongodb_configure_multi_cluster.sh
75+
:language: bash
76+
:linenos:
77+
78+
.. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/output/0200_kubectl_mongodb_configure_multi_cluster.out
79+
:visible: false
80+
81+
.. step:: Add the MongoDB Helm Charts for |k8s|.
82+
83+
Add the `MongoDB Helm Charts for Kubernetes <https://mongodb.github.io/helm-charts>`__ repository to Helm.
84+
85+
.. io-code-block::
86+
:copyable: true
87+
88+
.. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0205_helm_configure_repo.sh
89+
:language: bash
90+
:linenos:
91+
92+
.. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/output/0205_helm_configure_repo.out
93+
:visible: false
94+
95+
.. step:: Deploy the |k8s-op-short|.
96+
97+
Use the `MongoDB Helm Charts for Kubernetes <https://mongodb.github.io/helm-charts>`__ to deploy the |k8s-op-short|.
98+
99+
.. io-code-block::
100+
:copyable: true
101+
102+
.. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0210_helm_install_operator.sh
103+
:language: bash
104+
:linenos:
105+
106+
.. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/output/0210_helm_install_operator.out
107+
:visible: false
108+
109+
.. step:: Check the status of your |k8s-op|.
110+
111+
.. io-code-block::
112+
:copyable: true
113+
114+
.. input:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/code_snippets/0211_check_operator_deployment.sh
115+
:language: bash
116+
:linenos:
117+
118+
.. output:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-operator/output/0211_check_operator_deployment.out
119+
:visible: false
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
.. _reference-architectures-external-dns-no-mesh:
2+
3+
======================
4+
Configure External DNS
5+
======================
6+
7+
.. default-domain:: mongodb
8+
9+
.. facet::
10+
:name: genre
11+
:values: tutorial
12+
13+
.. contents:: On this page
14+
:local:
15+
:backlinks: none
16+
:depth: 1
17+
:class: singlecol
18+
19+
This page walks you through the process of deploying and validating external DNS
20+
for your |k8s-op-short| components deployed across multiple |k8s| clusters
21+
without a :ref:`service mesh <reference-architectures-istio-service-mesh>`.
22+
23+
Prerequisites
24+
-------------
25+
26+
Before you begin, perform the following tasks:
27+
28+
- Install ``kubectl``.
29+
- Update as needed and set the environment variables defined in the following ``env_variables.sh`` file.
30+
31+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/env_variables.sh
32+
:language: bash
33+
:linenos:
34+
35+
Source Code
36+
-----------
37+
38+
You can find all included source code in the :github:`MongoDB Kubernetes Operator repository </mongodb/mongodb-enterprise-kubernetes/tree/{+github-branch+}/architectures/setup-multi-cluster/setup-istio>`.
39+
40+
Procedure
41+
---------
42+
43+
.. procedure::
44+
:style: normal
45+
46+
.. step:: Create a GCP service account for ExternalDNS.
47+
48+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/code_snippets/0100_create_gke_sa.sh
49+
:language: sh
50+
51+
.. step:: Add the DNS admin role to your GCP service account.
52+
53+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/code_snippets/0120_add_role_to_sa.sh
54+
:language: sh
55+
56+
.. step:: Create GCP service account key.
57+
58+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/code_snippets/0130_create_sa_key.sh
59+
:language: sh
60+
61+
.. step:: Create a |k8s| namespace for deploying ExternalDNS.
62+
63+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/code_snippets/0140_create_namespaces.sh
64+
:language: sh
65+
66+
.. step:: Create a |k8s| Secret containing the service account key.
67+
68+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/code_snippets/0150_create_sa_secrets.sh
69+
:language: sh
70+
71+
.. step:: Install ExternalDNS.
72+
73+
ExternalDNS makes |k8s| resources discoverable via public DNS servers.
74+
Deploy the ``eternal-dns`` |k8s| deployment and related permissions objects
75+
to the namespace you just created.
76+
77+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/code_snippets/0200_install_externaldns.sh
78+
:language: sh
79+
80+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/yamls/externaldns.yaml
81+
:language: yaml
82+
83+
.. step:: Set up the DNS zone.
84+
85+
This example includes a private DNS zone. This means that you can only
86+
access the resources deployed in the DNS zone from the GKE clusters we
87+
created. If you are planning to access your resources from outside your
88+
GKE clusters, use a public DNS zone. To do so, you must have a
89+
`registered domain <https://en.wikipedia.org/wiki/Domain_name_registry>`__.
90+
91+
.. literalinclude:: /includes/code-examples/reference-architectures/setup-multi-cluster/setup-externaldns/code_snippets/0300_setup_dns_zone.sh
92+
:language: sh

0 commit comments

Comments
 (0)