11---
22stepnum : 1
33level : 4
4- ref : clone-k8s-repo-kind
5- title : " Clone the :github:`MongoDB Enterprise Kubernetes Operator repository </mongodb/mongodb-enterprise-kubernetes>`."
6- content : |
7-
8- .. code-block:: sh
9-
10- git clone https://github.com/mongodb/mongodb-enterprise-kubernetes.git
4+ source :
5+ file : steps-helm-master.yaml
6+ ref : install-helm-charts
117
128---
139stepnum : 2
1410level : 4
15- ref : create- k8s-ns-kind
16- title : " Create a |k8s-ns| for your |k8s| deployment. "
11+ title : " Install the | k8s-op-full| "
12+ ref : install-kubectl-quickstart
1713content : |
1814
19- By default, The |k8s-op-short| uses the ``mongodb`` namespace. To
20- simplify your installation, consider creating a namespace labeled
21- ``mongodb`` using the following |kubectl| command:
15+ To :github:`install the Kubernetes Operator with the Helm Chart
16+ </mongodb/helm-charts/tree/main/charts/enterprise-operator#installing-enterprise-operator>`, see the
17+ instructions in the repository.
18+
19+ **Example**
20+
21+ The following command installs the |k8s-op-full| in the ``mongodb``
22+ namespace with the optional ``--create-namespace`` option. By
23+ default, |k8s-op-short| uses the ``default`` namespace.
2224
2325 .. code-block:: sh
2426
25- kubectl create namespace mongodb
27+ helm install enterprise-operator mongodb/enterprise-operator -- namespace mongodb --create-namespace
2628
2729 ---
2830stepnum : 3
2931level : 4
30- ref : configure-kubectl-configmap-kind
32+ ref : configure-kubectl-quickstart
3133title : " Configure ``kubectl`` to default to your namespace."
3234content : |
3335
34- If you have not already, run the following command to execute all
36+ If you haven't already, run the following command to execute all
3537 ``kubectl`` commands in the namespace you created:
3638
3739 .. code-block:: sh
@@ -40,117 +42,143 @@ content: |
4042
4143 ---
4244stepnum : 4
43- level : 4
44- title : " Install the |k8s-op-full|"
45- ref : install-kubectl-kind
45+ title : " Configure the Kubernetes Operator"
46+ ref : configure-kubernetes-operator-quickstart
4647content : |
4748
48- a. Change to the directory in which you cloned the repository.
49+ a. :cloudmgr:`Go to the Kubernetes Setup Page in the Cloud Manager UI
50+ <tutorial/nav/k8s-config-for-mdb-resource/#navigate-to-the-kubernetes-setup-page-in-the-mms-ui>`.
4951
50- #. Install the |k8s-crds| for MongoDB deployments using the
51- following |kubectl| command:
52+ #. Click :guilabel:`Create New API Keys` or
53+ :guilabel:`Use Existing API Keys`.
5254
53- .. code-block:: sh
55+ #. Complete the form. To learn more, see
56+ :cloudmgr:`Programmatic Access to Cloud Manager
57+ </tutorial/manage-programmatic-api-keys/>`.
5458
55- kubectl apply -f crds.yaml
56-
57- #. Install the |k8s-op-short| using the following |kubectl| command:
59+ #. Click :guilabel:`Generate Key and YAML`.
5860
59- .. code-block:: sh
60-
61- kubectl apply -f mongodb-enterprise.yaml
62-
6361 ---
6462stepnum : 5
65- title : " Create credentials and store them as a secret."
66- ref : create-k8s-credentials-kind
63+ level : 4
64+ title : " Copy and save the ConfigMap."
65+ ref : copy-k8s-configmap-quickstart
6766content : |
6867
69- Run the following command:
68+ Copy and save the generated ``config-map.yaml`` file.
7069
71- .. note::
70+ **Example:**
7271
73- Provide your Public and Private Key values for the following
74- parameters. To learn more, see :ref:`create-k8s-credentials`.
72+ .. code-block:: yaml
7573
76- .. code-block:: sh
74+ apiVersion: v1
75+ kind: ConfigMap
76+ metadata:
77+ name: my-project
78+ namespace: mongodb
79+ data:
80+ baseUrl: https://cloud.mongodb.com
7781
78- kubectl -n mongodb \
79- create secret generic ops-manager-admin-key \
80- --from-literal="publicKey=<publicKey>" \
81- --from-literal="privateKey=<privateKey>"
82+ # Optional Parameters
83+ # projectName: My Ops/Cloud Manager Project
84+
85+ ordId: 5ecd252f8c1a75033c74106c
8286
87+ To learn more, see the :doc:`parameter descriptions
88+ </tutorial/create-project-using-configmap>`.
89+
8390 ---
8491stepnum : 6
8592level : 4
86- title : " Invoke the following command to create a ConfigMap ."
87- ref : copy-k8s-configmap-kind
93+ title : " Copy and save the Secret ."
94+ ref : copy-k8s-secret-quickstart
8895content : |
8996
90- .. note::
97+ Copy and save the generated ``secret.yaml`` file.
9198
92- Provide your values for the following parameters. To learn more,
93- see the :doc:`parameter descriptions
94- </tutorial/create-project-using-configmap>`.
99+ **Example:**
95100
96- .. code-block:: sh
101+ .. code-block:: yaml
97102
98- kubectl create configmap myconfigmap \
99- --from-literal="baseUrl=<myOpsManagerURL>" \
100- --from-literal="projectName=<myOpsManagerProjectName>" \ #Optional
101- --from-literal="orgId=<orgID>" #Required for Global API Keys
103+ apiVersion: v1
104+ kind: Secret
105+ metadata:
106+ name: organization-secret
107+ namespace: mongodb
108+ stringData:
109+ user: <public_key>
110+ publicAPIKey: <private_key>
111+
112+ For security purposes, |cloud| displays this file only once.
102113
103114 ---
104115stepnum : 7
105116level : 4
106- title : " Deploy the :term:`replica set` resource ."
107- ref : deploy-replica-set-kind
117+ title : " Apply the ConfigMap and Secret ."
118+ ref : apply-configmap-secret
108119content : |
109120
110121 Run the following command:
111122
112123 .. code-block:: sh
113124
114- cat <<EOF | kubectl apply -f -
115- apiVersion: mongodb.com/v1
116- kind: MongoDB
117- metadata:
118- name: demo-mongodb-cluster-1
119- namespace: mongodb
120- spec:
121- members: 3
122- version: 4.4.5-ent
123- type: ReplicaSet
124- authentication:
125- enabled: true
126- modes: ["SHA"]
127- opsManager:
128- configMapRef:
129- name: myconfigmap
130- credentials: ops-manager-admin-key
131- persistent: true
132- podSpec:
133- podTemplate:
134- spec:
135- containers:
136- - name: mongodb-enterprise-database
137- resources:
138- limits:
139- cpu: 2
140- memory: 1.5G
141- requests:
142- cpu: 1
143- memory: 1G
144- persistence:
145- single:
146- storage: 10Gi
147- EOF
125+ kubectl apply -f secret.yaml -f config-map.yaml
148126
149127 ---
150128stepnum : 8
151129level : 4
130+ title : " Deploy the :term:`replica set` resource."
131+ ref : deploy-replica-set-quickstart
132+ content : |
133+
134+ a. Copy and save the following |yaml| file:
135+
136+ .. code-block:: yaml
137+
138+ apiVersion: mongodb.com/v1
139+ kind: MongoDB
140+ metadata:
141+ name: demo-mongodb-cluster-1
142+ namespace: mongodb
143+ spec:
144+ members: 3
145+ version: 4.4.5-ent
146+ type: ReplicaSet
147+ authentication:
148+ enabled: true
149+ modes: ["SHA"]
150+ cloudManager:
151+ configMapRef:
152+ name: myproject
153+ credentials: organization-secret
154+ persistent: true
155+ podSpec:
156+ podTemplate:
157+ spec:
158+ containers:
159+ - name: mongodb-enterprise-database
160+ resources:
161+ limits:
162+ cpu: 2
163+ memory: 1.5G
164+ requests:
165+ cpu: 1
166+ memory: 1G
167+ persistence:
168+ single:
169+ storage: 10Gi
170+
171+ #. Run the following command:
172+
173+ .. code-block:: sh
174+
175+ kubectl apply -f <replica-set-conf>.yaml
176+
177+ ---
178+ stepnum : 9
179+ level : 4
152180title : " Create a secret with your database user password"
153- ref : create-k8s-user-secret-kind
181+ ref : create-k8s-user-secret-quickstart
154182content : |
155183
156184 You can choose to use a cleartext password or a Base64-encoded
@@ -163,9 +191,9 @@ content: |
163191 see the :doc:`parameter descriptions
164192 </tutorial/manage-database-users-scram>`.
165193
166- For a cleartext password, create and save the following YAML file:
194+ For a cleartext password, create and save the following |yaml| file:
167195
168- .. code-block:: sh
196+ .. code-block:: yaml
169197
170198 apiVersion: v1
171199 kind: Secret
@@ -180,7 +208,7 @@ content: |
180208 For a Base64-encoded password, create and save the following YAML
181209 file:
182210
183- .. code-block:: sh
211+ .. code-block:: yaml
184212
185213 apiVersion: v1
186214 kind: Secret
@@ -193,60 +221,63 @@ content: |
193221 # corresponds to user.spec.passwordSecretKeyRef.key
194222
195223 ---
196- stepnum : 9
224+ stepnum : 10
197225level : 4
198226title : " Create a database user."
199- ref : add-k8s-user-configmap-kind
227+ ref : add-k8s-user-configmap-quickstart
200228content : |
201229
202- Run the following command:
230+ a. Copy and save the following |yaml| file:
231+
232+ .. code-block:: yaml
233+
234+ apiVersion: mongodb.com/v1
235+ kind: MongoDBUser
236+ metadata:
237+ name: mms-scram-user-1
238+ spec:
239+ passwordSecretKeyRef:
240+ name: mms-user-1-password
241+ # Match to metadata.name of the User Secret
242+ key: password
243+ username: "mms-scram-user-1"
244+ db: "admin" #
245+ mongodbResourceRef:
246+ name: "demo-mongodb-cluster-1"
247+ # Match to MongoDB resource using authenticaiton
248+ roles:
249+ - db: "admin"
250+ name: "clusterAdmin"
251+ - db: "admin"
252+ name: "userAdminAnyDatabase"
253+ - db: "admin"
254+ name: "readWrite"
255+ - db: "admin"
256+ name: "userAdminAnyDatabase"
257+
258+ #. Run the following command:
203259
204- .. code-block:: sh
260+ .. code-block:: sh
205261
206- cat <<EOF | kubectl apply -f -
207- apiVersion: mongodb.com/v1
208- kind: MongoDBUser
209- metadata:
210- name: mms-scram-user-1
211- spec:
212- passwordSecretKeyRef:
213- name: mms-user-1-password
214- # Match to metadata.name of the User Secret
215- key: password
216- username: "mms-scram-user-1"
217- db: "admin" #
218- mongodbResourceRef:
219- name: "demo-mongodb-cluster-1"
220- # Match to MongoDB resource using authenticaiton
221- roles:
222- - db: "admin"
223- name: "clusterAdmin"
224- - db: "admin"
225- name: "userAdminAnyDatabase"
226- - db: "admin"
227- name: "readWrite"
228- - db: "admin"
229- name: "userAdminAnyDatabase"
230- EOF
262+ kubectl apply -f <database-user-conf>.yaml
231263
232264 ---
233- stepnum : 10
265+ stepnum : 11
234266level : 4
235- ref : view-k8s-user-kind
267+ ref : view-k8s-user-quickstart
236268optional : true
237269source :
238270 file : steps-add-database-user-scram.yaml
239271 ref : view-k8s-user
240272
241273---
242- stepnum : 11
274+ stepnum : 12
243275level : 4
244276title : " Connect to the :term:`replica set`."
245- ref : connect-k8s-rs-kind
277+ ref : connect-k8s-rs-quickstart
246278content : |
247279
248- Perform the following steps in the |cloud-link| or |onprem-link|
249- application, depending on where your clusters are hosted:
280+ Perform the following steps in the |cloud-link| application:
250281
251282 a. Click :guilabel:`Deployment` in the left navigation.
252283
0 commit comments