Skip to content

Commit 3cacf47

Browse files
(DOCSP-8666): Align sections to create ConfigMap and project secret (#221)
* (DOCSP-8666): Align sections to create ConfigMap and project secret * (DOCSP-8666): Move considerations up * (DOCSP-8666): Tech review * (DOCSP-8666): Tech review 2
1 parent 3235ab8 commit 3cacf47

File tree

6 files changed

+173
-64
lines changed

6 files changed

+173
-64
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
.. important::
22

33
If you deploy |onprem| with the |k8s-op-short| and |onprem| will
4-
manage MongoDB database resources deployed outside of the |k8s|
4+
manage MongoDB database resources deployed **outside** of the |k8s|
55
cluster it's deployed to, you must set ``data.baseUrl`` to the same
66
value of the
77
:opsmgrkube:`spec.configuration.mms.centralUrl <spec.configuration>`
88
setting in the |onprem| resource specification.
99

10-
.. seealso:: :ref:`mdb-resource-deployment-locations`
10+
.. seealso:: :ref:`mdb-resource-deployment-locations`
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
.. list-table::
2+
:widths: 20 20 40 20
3+
:header-rows: 1
4+
5+
* - Key
6+
- Type
7+
- Description
8+
- Example
9+
10+
* - ``<configmap-name>``
11+
- string
12+
- Name of the |k8s| |k8s-obj|.
13+
14+
.. include:: /includes/fact-resource-name-char-limit.rst
15+
16+
.. seealso::
17+
18+
- :setting:`metadata.name`
19+
- |k8s| documentation on `names <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/>`__.
20+
This name must follow :rfc:`RFC1123 <1123>` naming
21+
conventions, using only lowercase alphanumeric
22+
characters, '-' or '.', and must start and end with an
23+
alphanumeric character.
24+
25+
- ``myconfigmap``
26+
27+
* - ``baseUrl``
28+
- string
29+
- |url| to your |application| including the |fqdn| and port
30+
number.
31+
32+
.. include:: /includes/admonitions/data-url-config-map-external-dbs.rst
33+
34+
.. note::
35+
36+
If you're using |cloud-short|, set the ``data.baseUrl`` value
37+
to ``https://cloud.mongodb.com``.
38+
39+
- ``https://ops.example.com:8443``
40+
41+
* - ``projectName``
42+
- string
43+
- Label for your |mms|
44+
:opsmgr:`Project </tutorial/manage-projects>`.
45+
46+
The |k8s-op-short| creates the |mms| project if it does
47+
not exist. If you omit the ``projectName``, the |k8s-op-short|
48+
creates a project with the same name as your |k8s| resource.
49+
50+
If you need or want to use an existing project, you can find
51+
the ``projectName`` by clicking the :guilabel:`All Clusters`
52+
link at the top left of the screen, then either search by
53+
name in the :guilabel:`Search` box or scroll to find the
54+
name in the list. Each card in this list represents the
55+
combination of one **Organization** and **Project**.
56+
57+
- ``Development``
58+
59+
* - ``orgId``
60+
- string
61+
- 24 character hex string that uniquely identifies your
62+
MongoDB :opsmgr:`Organization </tutorial/manage-organizations>`.
63+
You can find the ``orgId`` in your |onprem| |url|:
64+
65+
1. Click the :guilabel:`Context` menu.
66+
2. Select your Organization.
67+
3. View the current |url| in your browser and copy the value
68+
displayed in the ``<orgId>`` placeholder below:
69+
70+
| ``https://ops.example.com:8443/``
71+
| ``v2#/org/<orgId>/projects``
72+
73+
.. important::
74+
75+
This field is *optional*. If you omit the ``orgId``,
76+
|onprem| creates an Organization called ``projectName``
77+
that contains a project also called ``projectName``.
78+
79+
You must have the :authrole:`Organization project Creator`
80+
role to create a new project
81+
*within an existing organization*.
82+
83+
.. admonition:: Limited to |com| Organizations
84+
85+
If you set this value, it can be for a |com|
86+
organization only. If you try to use an Atlas
87+
organization, the |k8s-op-short| may not work as
88+
intended.
89+
90+
- | ``5cc9b333dd3e384a625a6615``
91+
92+

source/includes/steps-create-k8s-configmap.yaml

Lines changed: 18 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,72 +5,44 @@ inherit:
55
file: steps-configure-kubectl-namespace.yaml
66
ref: configure-kubectl-namespace
77
---
8-
title: "Copy the following example ConfigMap."
8+
title: "Invoke the following command to create a ConfigMap."
99
stepnum: 2
1010
level: 4
1111
ref: copy-k8s-configmap
1212
content: |
1313
14-
.. literalinclude:: /reference/k8s/example-configmap.yaml
15-
:language: yaml
16-
:emphasize-lines: 5, 7-9
17-
---
18-
title: "Open your preferred text editor and paste the example |k8s-configmap| into a new text file."
19-
stepnum: 3
20-
level: 4
21-
ref: paste-k8s-configmap
22-
---
23-
title: "Update the values in the lines highlighted in the example ConfigMap."
24-
stepnum: 4
25-
level: 4
26-
ref: configure-k8s-configmap
27-
content: |
28-
.. include:: /includes/list-tables/configmap-keys.rst
29-
---
30-
title: "Save this file with a ``.yaml`` file extension."
31-
stepnum: 5
32-
level: 4
33-
ref: save-k8s-configmap
34-
---
35-
title: "Invoke the |k8s| command to create your |k8s-configmap|."
36-
stepnum: 6
37-
level: 4
38-
ref: create-k8s-configmap
39-
content: |
4014
.. code-block:: sh
4115
42-
kubectl apply -f <myconfigmap.yaml>
16+
kubectl create configmap <configmap-name> \
17+
--from-literal="baseUrl=<myOpsManagerURL>" \
18+
--from-literal="projectName=<myOpsManagerProjectName>" \ #Optional
19+
--from-literal="orgId=<orgID>" #Optional
4320
44-
.. important::
21+
.. include:: /includes/list-tables/configmap-keys-curl.rst
4522
46-
All subsequent ``kubectl`` commands you invoke must add the
47-
``-n`` option with the :setting:`metadata.namespace` you
48-
specified in your |k8s-configmap|.
4923
---
50-
title: "Invoke the |k8s| command to verify your |k8s-configmap|."
51-
stepnum: 7
24+
title: "Invoke the following |k8s| command to verify your |k8s-configmap|."
25+
stepnum: 3
5226
level: 4
5327
ref: verify-k8s-configmap
5428
content: |
5529
.. code-block:: sh
5630
57-
kubectl describe configmaps <myconfigmap> -n <metadata.namespace>
58-
59-
.. admonition:: *Always include the namespace option with* ``kubectl``
60-
:class: important
61-
62-
|kubectl| defaults to an empty namespace if you do not specify
63-
the ``-n`` option, resulting in deployment failures. You must
64-
specify the value of the ``<metadata.namespace>`` field.
65-
The |k8s-op-short|, |k8s-secret|, and |k8s-mdbrsc|\s should
66-
run in the same unique namespace.
31+
kubectl describe configmaps <configmap-name>
6732
6833
This command returns a ConfigMap description in the shell:
6934
7035
.. code-block:: sh
7136
72-
Name: <myconfigmap>
73-
Namespace: <metadata.namespace>
37+
Name: <configmap-name>
38+
Namespace: <namespace>
7439
Labels: <none>
7540
Annotations: <none>
41+
42+
Data
43+
====
44+
baseUrl:
45+
----
46+
<myOpsManagerURL>
47+
Events: <none>
7648
...

source/includes/steps-set-configmap-for-tls.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ level: 4
2828
ref: paste-k8s-configmap-tls
2929
source:
3030
file: steps-source-configmap-secure.yaml
31-
ref: paste-k8s-configmap
31+
ref: paste-k8s-configmap-kubectl
3232
---
3333
title: "Specify the TLS settings"
3434
stepnum: 4
@@ -72,15 +72,8 @@ ref: save-k8s-configmap
7272
---
7373
stepnum: 6
7474
level: 4
75-
ref: reapply-k8s-configmap-tls
76-
source:
77-
file: steps-source-configmap-secure.yaml
78-
ref: reapply-k8s-configmap
79-
---
80-
stepnum: 7
81-
level: 4
8275
ref: verify-k8s-configmap-tls
8376
source:
8477
file: steps-source-configmap-secure.yaml
85-
ref: verify-k8s-configmap
78+
ref: verify-k8s-configmap-kubectl
8679
...

source/includes/steps-source-configmap-secure.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@ content: |
3939
b. Paste the highlighted section in the example |k8s-configmap| at
4040
the end of the project ConfigMap.
4141
---
42+
title: "Add the highlighted section to your project's ConfigMap."
43+
stepnum: 0
44+
level: 4
45+
ref: paste-k8s-configmap-kubectl
46+
content: |
47+
a. Invoke the following command to edit your project's ConfigMap in
48+
the default configured editor:
49+
50+
.. code-block:: sh
51+
52+
kubectl edit configmaps <my-configmap> -n <namespace>
53+
54+
b. Paste the highlighted section in the example |k8s-configmap| at
55+
the end of the project ConfigMap.
56+
---
4257
title: "Save this file with a ``.yaml`` file extension."
4358
stepnum: 0
4459
level: 4
@@ -103,6 +118,43 @@ content: |
103118
Namespace: <metadata.namespace>
104119
Labels: <none>
105120
Annotations: <none>
121+
122+
---
123+
title: "Invoke the |k8s| command to verify your |k8s-configmap|."
124+
stepnum: 0
125+
level: 4
126+
ref: verify-k8s-configmap-kubectl
127+
content: |
128+
.. code-block:: sh
129+
130+
kubectl describe configmaps <my-configmap> -n <namespace>
131+
132+
.. admonition:: *Always include the namespace option with* ``kubectl``
133+
:class: important
134+
135+
|kubectl| defaults to an empty namespace if you do not specify the
136+
``-n`` option, resulting in deployment failures. The
137+
|k8s-op-short|, |k8s-secret|, and |k8s-mdbrsc|\s should run in the
138+
same unique namespace.
139+
140+
This command returns a ConfigMap description in the shell:
141+
142+
.. code-block:: sh
143+
144+
Name: <my-configmap>
145+
Namespace: <namespace>
146+
Labels: <none>
147+
Annotations: <none>
148+
149+
Data
150+
====
151+
sslMMSCAConfigMap:
152+
----
153+
<root-ca-configmap-name>
154+
sslRequireValidMMSServerCertificates:
155+
----
156+
true
157+
Events: <none>
106158
---
107159
title: "Approve the X.509 client certificates for the agents."
108160
stepnum: 0

source/tutorial/create-project-using-configmap.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ The |k8s-op-full| uses a |k8s| |k8s-configmap| to create or link your
1818
:ref:`example ConfigMap <example-k8s-configmap>` |yaml| file and apply
1919
the ConfigMap.
2020

21+
Considerations
22+
--------------
23+
24+
Starting in |k8s-op-full| version 1.3.0, you can only have one MongoDB
25+
resource per project. To learn how to deploy a MongoDB resource
26+
in your project, see :ref:`k8s-deploy-mdb-resources`.
27+
2128
Prerequisites
2229
-------------
2330

@@ -46,13 +53,6 @@ you need to add the CA that signed that custom certificate to the
4653

4754
.. include:: /includes/steps/set-configmap-for-tls.rst
4855

49-
Considerations
50-
--------------
51-
52-
Starting in |k8s-op-full| version 1.3.0, you can only have one MongoDB
53-
resource per project. To learn how to deploy a MongoDB resource
54-
in your project, see :ref:`k8s-deploy-mdb-resources`.
55-
5656
Next Steps
5757
----------
5858

0 commit comments

Comments
 (0)