Skip to content

Commit 8ffaf99

Browse files
authored
Merge pull request #1185 from ajhuh-mdb/DOCSP-27111-use-stepfiles-for-procedures
DOCSP-27111 Refactor Procedures to Use Stepfiles
2 parents b8cde77 + 5d4920c commit 8ffaf99

9 files changed

+250
-141
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
title: "{{method}}"
3+
stepnum: 1
4+
level: 4
5+
ref: adjust-spec-settings
6+
replacement:
7+
repset: |
8+
.. literalinclude:: /includes/code-examples/yaml-files/example-replica-set.yaml
9+
:language: yaml
10+
:start-after: START-regular-replset
11+
:end-before: END-regular-replset
12+
13+
.. code-block:: yaml
14+
15+
spec:
16+
members: 4
17+
18+
sharded: |
19+
- :setting:`spec.shardCount`
20+
- :setting:`spec.mongodsPerShardCount`
21+
- :setting:`spec.mongosCount`
22+
- :setting:`spec.configServerCount`
23+
24+
.. literalinclude:: /includes/code-examples/yaml-files/example-sharded-cluster.yaml
25+
:language: yaml
26+
:start-after: START-scaled-sharded
27+
:end-before: END-scaled-sharded
28+
29+
.. code-block:: yaml
30+
31+
spec:
32+
shardCount: 3
33+
mongodsPerShardCount: 3
34+
mongosCount: 3
35+
configServerCount: 4
36+
37+
---
38+
title: "Reapply the configuration to |k8s|:"
39+
stepnum: 2
40+
level: 4
41+
ref: apply-config-settings
42+
replacement:
43+
repset: |
44+
.. code-block:: sh
45+
46+
kubectl apply -f <repl-set-config>.yaml
47+
48+
sharded: |
49+
.. code-block:: sh
50+
51+
kubectl apply -f <sharded-cluster-config>.yaml
52+
53+
...
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
ref: upgrade-spec-version
3+
stepnum: 1
4+
inherit:
5+
file: steps-scale-deployment.yaml
6+
ref: adjust-spec-settings
7+
replacement:
8+
method: "Adjust the :setting:`spec.members` setting from 3 to 4:"
9+
content: |
10+
11+
{{repset}}
12+
13+
---
14+
ref: apply
15+
inherit:
16+
file: steps-scale-deployment.yaml
17+
ref: apply-config-settings
18+
stepnum: 2
19+
content: |
20+
21+
{{repset}}
22+
23+
...
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
ref: upgrade-spec-version
3+
stepnum: 1
4+
inherit:
5+
file: steps-scale-deployment.yaml
6+
ref: adjust-spec-settings
7+
replacement:
8+
method: "Adjust the following settings to the desired values:"
9+
content: |
10+
11+
{{sharded}}
12+
13+
---
14+
ref: apply
15+
inherit:
16+
file: steps-scale-deployment.yaml
17+
ref: apply-config-settings
18+
stepnum: 2
19+
content: |
20+
21+
{{sharded}}
22+
23+
...
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
---
2+
title: "{{method}}"
3+
level: 4
4+
ref: upgrade-master-version
5+
replacement:
6+
om: |
7+
a. Set :opsmgrkube:`spec.version` to the new |onprem| version.
8+
9+
#. If you upgraded your :ref:`application database <appdb-om-arch>`, set
10+
:opsmgrkube:`spec.applicationDatabase.version` to the compatible MongoDB
11+
version.
12+
13+
c. *(Optional)* If you might need to downgrade, set
14+
:setting:`spec.featureCompatibilityVersion`.
15+
16+
17+
.. literalinclude:: /reference/k8s/example-ops-manager.yaml
18+
:language: yaml
19+
:linenos:
20+
21+
mdb: |
22+
a. Set :setting:`spec.version` to the desired MongoDB version.
23+
24+
#. Set :setting:`spec.featureCompatibilityVersion` to the current
25+
working MongoDB version:
26+
27+
.. code-block:: yaml
28+
29+
---
30+
apiVersion: mongodb.com/v1
31+
kind: MongoDB
32+
metadata:
33+
name: my-standalone-downgrade
34+
spec:
35+
version: "4.0.14-ent"
36+
type: Standalone
37+
project: my-project
38+
credentials: my-credentials
39+
persistent: false
40+
...
41+
42+
The following example shows the result of this change:
43+
44+
.. code-block:: yaml
45+
46+
spec:
47+
version: "4.2.2-ent"
48+
featureCompatibilityVersion: "4.0"
49+
50+
.. include:: /includes/admonitions/fact-featureCompatibilityVersion.rst
51+
52+
---
53+
title: Reapply the configuration to |k8s|.
54+
level: 4
55+
ref: apply-k8s-config
56+
replacement:
57+
om: |
58+
.. code-block:: none
59+
60+
kubectl apply -f <om-resource-specification>.yaml
61+
62+
|k8s| automatically reconfigures your deployment with the new
63+
specifications. You can see these changes reflected in your |mms| or
64+
:cloudmgr:`Cloud Manager </>` application.
65+
66+
mdb: |
67+
.. code-block:: none
68+
69+
kubectl apply -f <standalone-config>.yaml
70+
71+
|k8s| automatically reconfigures your deployment with the new
72+
specifications. You can see these changes reflected in your |mms| or
73+
:cloudmgr:`Cloud Manager </>` application.
74+
75+
...
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
ref: upgrade-spec-version
3+
stepnum: 1
4+
inherit:
5+
file: steps-upgrade-master.yaml
6+
ref: upgrade-master-version
7+
replacement:
8+
method: "Change the resource's ConfigMap as shown in the following example:"
9+
content: |
10+
11+
{{mdb}}
12+
13+
---
14+
ref: apply
15+
inherit:
16+
file: steps-upgrade-master.yaml
17+
ref: apply-k8s-config
18+
stepnum: 2
19+
content: |
20+
21+
{{mdb}}
22+
23+
...

source/includes/steps-upgrade-om.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
ref: upgrade-spec-version
3+
stepnum: 1
4+
inherit:
5+
file: steps-upgrade-master.yaml
6+
ref: upgrade-master-version
7+
replacement:
8+
method: "In your :ref:`k8s-om-specification`, the settings as shown in the
9+
following example:"
10+
content: |
11+
12+
{{om}}
13+
14+
---
15+
ref: apply
16+
inherit:
17+
file: steps-upgrade-master.yaml
18+
ref: apply-k8s-config
19+
stepnum: 2
20+
content: |
21+
22+
{{om}}
23+
24+
...

source/tutorial/scale-resources.txt

Lines changed: 6 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -73,76 +73,20 @@ Considerations
7373
required data and can be reached by your application(s), bring
7474
down the old deployment.
7575

76-
Examples
77-
--------
76+
Procedure
77+
---------
7878

79-
Select the desired tab based on the deployment configuration you
80-
want to scale:
79+
To scale up your deployment, select the desired tab based on the deployment
80+
configuration you want to scale:
8181

8282
.. tabs-deployments::
8383

8484
.. tab::
8585
:tabid: repl
8686

87-
Consider a replica set resource with the following
88-
|k8s-custom-resource|:
89-
90-
.. literalinclude:: /includes/code-examples/yaml-files/example-replica-set.yaml
91-
:language: yaml
92-
:start-after: START-regular-replset
93-
:end-before: END-regular-replset
94-
:linenos:
95-
:emphasize-lines: 7
96-
97-
To scale up this replica set and add more members:
98-
99-
1. Adjust the :setting:`spec.members` setting to the desired
100-
number of members:
101-
102-
.. literalinclude:: /includes/code-examples/yaml-files/example-replica-set.yaml
103-
:language: yaml
104-
:start-after: START-scaled-replset
105-
:end-before: END-scaled-replset
106-
:linenos:
107-
:emphasize-lines: 7
108-
109-
#. Reapply the configuration to |k8s|:
110-
111-
.. code-block:: sh
112-
113-
kubectl apply -f <repl-set-config>.yaml
87+
.. include:: /includes/steps/scale-repset.rst
11488

11589
.. tab::
11690
:tabid: shard
11791

118-
Consider a sharded cluster resource with the following
119-
|k8s-custom-resource|:
120-
121-
.. literalinclude:: /includes/code-examples/yaml-files/example-sharded-cluster.yaml
122-
:language: yaml
123-
:start-after: START-regular-sharded
124-
:end-before: END-regular-sharded
125-
:linenos:
126-
:emphasize-lines: 7-10
127-
128-
To scale up this sharded cluster:
129-
130-
1. Adjust the following settings to the desired values:
131-
132-
- :setting:`spec.shardCount`
133-
- :setting:`spec.mongodsPerShardCount`
134-
- :setting:`spec.mongosCount`
135-
- :setting:`spec.configServerCount`
136-
137-
.. literalinclude:: /includes/code-examples/yaml-files/example-sharded-cluster.yaml
138-
:language: yaml
139-
:start-after: START-scaled-sharded
140-
:end-before: END-scaled-sharded
141-
:linenos:
142-
:emphasize-lines: 7-10
143-
144-
#. Reapply the configuration to |k8s|:
145-
146-
.. code-block:: sh
147-
148-
kubectl apply -f <sharded-cluster-config>.yaml
92+
.. include:: /includes/steps/scale-sharded.rst

0 commit comments

Comments
 (0)