Skip to content

Commit bae153e

Browse files
committed
OSDOCS-5816: Added tuning config instructions
1 parent 3ee79cb commit bae153e

14 files changed

+591
-34
lines changed

_attributes/attributes-openshift-dedicated.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@
2929
:openshift-local-productname: Red Hat OpenShift Local
3030
:openshift-dev-spaces-productname: Red Hat OpenShift Dev Spaces
3131
:hcp: hosted control planes
32-
:hcp-title: ROSA with {hcp}
33-
:hcp-title-first: {product-title} (ROSA) with {hcp}
32+
:hcp-title: ROSA with HCP
33+
:hcp-title-first: {product-title} (ROSA) with {hcp} (HCP)

_topic_maps/_topic_map_rosa.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,14 @@ Topics:
102102
- Name: Setting up your environment
103103
File: rosa-sts-setting-up-environment
104104
---
105-
Name: Install hosted control plane for ROSA clusters
105+
Name: Install ROSA with HCP clusters
106106
Dir: rosa_hcp
107107
Distros: openshift-rosa
108108
Topics:
109-
- Name: Creating hosted control planes for ROSA clusters using the default options
109+
- Name: Creating ROSA with HCP clusters using the default options
110110
File: rosa-hcp-sts-creating-a-cluster-quickly
111+
- Name: Using the Node Tuning Operator on ROSA with HCP
112+
File: rosa-tuning-config
111113
---
112114
Name: Install ROSA classic clusters
113115
Dir: rosa_install_access_delete_clusters
@@ -253,6 +255,8 @@ Topics:
253255
File: rosa-upgrading-sts
254256
- Name: Upgrading ROSA
255257
File: rosa-upgrading
258+
- Name: Upgrading ROSA with HCP
259+
File: rosa-hcp-upgrading
256260
---
257261
Name: CI/CD
258262
Dir: cicd

modules/custom-tuning-specification.adoc

Lines changed: 187 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
//
33
// * scalability_and_performance/using-node-tuning-operator.adoc
44
// * post_installation_configuration/node-tasks.adoc
5+
// * rosa_hcp/rosa-tuning-config.adoc
6+
7+
ifeval::["{context}" == "rosa-tuning-config"]
8+
:rosa-hcp-tuning:
9+
endif::[]
510

611
[id="custom-tuning-specification_{context}"]
712
= Custom tuning specification
@@ -22,6 +27,7 @@ The Operator Management state is set by adjusting the default Tuned CR. By defau
2227

2328
The `profile:` section lists TuneD profiles and their names.
2429

30+
ifndef::rosa-hcp-tuning[]
2531
[source,yaml]
2632
----
2733
profile:
@@ -45,21 +51,54 @@ profile:
4551
4652
# tuned_profile_n profile settings
4753
----
54+
endif::rosa-hcp-tuning[]
55+
ifdef::rosa-hcp-tuning[]
56+
[source,json]
57+
----
58+
{
59+
"profile": [
60+
{
61+
"name": "tuned_profile_1",
62+
"data": "# TuneD profile specification\n[main]\nsummary=Description of tuned_profile_1 profile\n\n[sysctl]\nnet.ipv4.ip_forward=1\n# ... other sysctl's or other TuneD daemon plugins supported by the containerized TuneD\n"
63+
},
64+
{
65+
"name": "tuned_profile_n",
66+
"data": "# TuneD profile specification\n[main]\nsummary=Description of tuned_profile_n profile\n\n# tuned_profile_n profile settings\n"
67+
}
68+
]
69+
}
70+
----
71+
endif::[]
4872

4973
*Recommended profiles*
5074

5175
The `profile:` selection logic is defined by the `recommend:` section of the CR. The `recommend:` section is a list of items to recommend the profiles based on a selection criteria.
5276

77+
ifndef::rosa-hcp-tuning[]
5378
[source,yaml]
5479
----
5580
recommend:
5681
<recommend-item-1>
5782
# ...
5883
<recommend-item-n>
5984
----
85+
endif::rosa-hcp-tuning[]
86+
ifdef::rosa-hcp-tuning[]
87+
[source,json]
88+
----
89+
"recommend": [
90+
{
91+
"recommend-item-1": details_of_recommendation,
92+
# ...
93+
"recommend-item-n": details_of_recommendation,
94+
}
95+
]
96+
----
97+
endif::[]
6098

6199
The individual items of the list:
62100

101+
ifndef::rosa-hcp-tuning[]
63102
[source,yaml]
64103
----
65104
- machineConfigLabels: <1>
@@ -82,9 +121,41 @@ The individual items of the list:
82121
<7> Optional operand configuration.
83122
<8> Turn debugging on or off for the TuneD daemon. Options are `true` for on or `false` for off. The default is `false`.
84123
<9> Turn `reapply_sysctl` functionality on or off for the TuneD daemon. Options are `true` for on and `false` for off.
124+
endif::rosa-hcp-tuning[]
125+
ifdef::rosa-hcp-tuning[]
126+
[source,json]
127+
----
128+
{
129+
"profile": [
130+
{
131+
# ...
132+
}
133+
],
134+
"recommend": [
135+
{
136+
"profile": <tuned_profile_name>, <1>
137+
"priority": <priority>, <2>
138+
"machineConfigLabels": { <Key_Pair_for_MachineConfig> <3>
139+
},
140+
"match": [ <4>
141+
{
142+
"label": <label_information> <5>
143+
},
144+
]
145+
},
146+
]
147+
}
148+
----
149+
<1> Profile ordering priority. Lower numbers mean higher priority (`0` is the highest priority).
150+
<1> A TuneD profile to apply on a match. For example `tuned_profile_1`.
151+
<1> Optional: A dictionary of key-value pairs `MachineConfig` labels. The keys must be unique.
152+
<1> If omitted, profile match is assumed unless a profile with a higher priority matches first or `machineConfigLabels` is set.
153+
<1> The label for the profile matched items.
154+
endif::[]
85155

86156
`<match>` is an optional list recursively defined as follows:
87157

158+
ifndef::rosa-hcp-tuning[]
88159
[source,yaml]
89160
----
90161
- label: <label_name> <1>
@@ -96,6 +167,18 @@ The individual items of the list:
96167
<2> Optional node or pod label value. If omitted, the presence of `<label_name>` is enough to match.
97168
<3> Optional object type (`node` or `pod`). If omitted, `node` is assumed.
98169
<4> An optional `<match>` list.
170+
endif::rosa-hcp-tuning[]
171+
ifdef::rosa-hcp-tuning[]
172+
[source,yaml]
173+
----
174+
"match": [
175+
{
176+
"label": <1>
177+
},
178+
]
179+
----
180+
<1> Node or pod label name.
181+
endif::[]
99182

100183
If `<match>` is not omitted, all nested `<match>` sections must also evaluate to `true`. Otherwise, `false` is assumed and the profile with the respective `<match>` section will not be applied or recommended. Therefore, the nesting (child `<match>` sections) works as logical AND operator. Conversely, if any item of the `<match>` list matches, the entire `<match>` list evaluates to `true`. Therefore, the list acts as logical OR operator.
101184

@@ -109,6 +192,8 @@ When using machine config pool based matching, it is advised to group nodes with
109192
====
110193

111194
.Example: node or pod label based matching
195+
196+
ifndef::rosa-hcp-tuning[]
112197
[source,yaml]
113198
----
114199
- match:
@@ -127,9 +212,50 @@ When using machine config pool based matching, it is advised to group nodes with
127212
- priority: 30
128213
profile: openshift-node
129214
----
215+
endif::rosa-hcp-tuning[]
216+
ifdef::rosa-hcp-tuning[]
217+
[source,JSON]
218+
----
219+
[
220+
{
221+
"match": [
222+
{
223+
"label": "tuned.openshift.io/elasticsearch",
224+
"match": [
225+
{
226+
"label": "node-role.kubernetes.io/master"
227+
},
228+
{
229+
"label": "node-role.kubernetes.io/infra"
230+
}
231+
],
232+
"type": "pod"
233+
}
234+
],
235+
"priority": 10,
236+
"profile": "openshift-control-plane-es"
237+
},
238+
{
239+
"match": [
240+
{
241+
"label": "node-role.kubernetes.io/master"
242+
},
243+
{
244+
"label": "node-role.kubernetes.io/infra"
245+
}
246+
],
247+
"priority": 20,
248+
"profile": "openshift-control-plane"
249+
},
250+
{
251+
"priority": 30,
252+
"profile": "openshift-node"
253+
}
254+
]
255+
----
256+
endif::[]
130257

131-
The CR above is translated for the containerized TuneD daemon into its `recommend.conf` file based on the profile priorities. The profile with the
132-
highest priority (`10`) is `openshift-control-plane-es` and, therefore, it is considered first. The containerized TuneD daemon running on a given node looks to see if there is a pod running on the same node with the `tuned.openshift.io/elasticsearch` label set. If not, the entire `<match>` section evaluates as `false`. If there is such a pod with the label, in order for the `<match>` section to evaluate to `true`, the node label also needs to be `node-role.kubernetes.io/master` or `node-role.kubernetes.io/infra`.
258+
The CR above is translated for the containerized TuneD daemon into its `recommend.conf` file based on the profile priorities. The profile with the highest priority (`10`) is `openshift-control-plane-es` and, therefore, it is considered first. The containerized TuneD daemon running on a given node looks to see if there is a pod running on the same node with the `tuned.openshift.io/elasticsearch` label set. If not, the entire `<match>` section evaluates as `false`. If there is such a pod with the label, in order for the `<match>` section to evaluate to `true`, the node label also needs to be `node-role.kubernetes.io/master` or `node-role.kubernetes.io/infra`.
133259

134260
If the labels for the profile with priority `10` matched, `openshift-control-plane-es` profile is applied and no other profile is considered. If the node/pod label combination did not match, the second highest priority profile (`openshift-control-plane`) is considered. This profile is applied if the containerized TuneD pod runs on a node with labels `node-role.kubernetes.io/master` or `node-role.kubernetes.io/infra`.
135261

@@ -138,6 +264,7 @@ Finally, the profile `openshift-node` has the lowest priority of `30`. It lacks
138264
image::node-tuning-operator-workflow-revised.png[Decision workflow]
139265

140266
.Example: machine config pool based matching
267+
ifndef::rosa-hcp-tuning[]
141268
[source,yaml]
142269
----
143270
apiVersion: tuned.openshift.io/v1
@@ -161,6 +288,37 @@ spec:
161288
priority: 20
162289
profile: openshift-node-custom
163290
----
291+
endif::rosa-hcp-tuning[]
292+
ifdef::rosa-hcp-tuning[]
293+
[source,JSON]
294+
----
295+
{
296+
"apiVersion": "tuned.openshift.io/v1",
297+
"kind": "Tuned",
298+
"metadata": {
299+
"name": "openshift-node-custom",
300+
"namespace": "openshift-cluster-node-tuning-operator"
301+
},
302+
"spec": {
303+
"profile": [
304+
{
305+
"data": "[main]\nsummary=Custom OpenShift node profile with an additional kernel parameter\ninclude=openshift-node\n[bootloader]\ncmdline_openshift_node_custom=+skew_tick=1\n",
306+
"name": "openshift-node-custom"
307+
}
308+
],
309+
"recommend": [
310+
{
311+
"machineConfigLabels": {
312+
"machineconfiguration.openshift.io/role": "worker-custom"
313+
},
314+
"priority": 20,
315+
"profile": "openshift-node-custom"
316+
}
317+
]
318+
}
319+
}
320+
----
321+
endif::[]
164322

165323
To minimize node reboots, label the target nodes with a label the machine config pool's node selector will match, then create the Tuned CR above and finally create the custom machine config pool itself.
166324

@@ -184,25 +342,14 @@ To minimize node reboots, label the target nodes with a label the machine config
184342

185343
*Cloud provider-specific TuneD profiles*
186344

187-
With this functionality, all Cloud provider-specific nodes can conveniently
188-
be assigned a TuneD profile specifically tailored to a given Cloud provider
189-
on a {product-title} cluster. This can be accomplished without adding
190-
additional node labels or grouping nodes into machine config pools.
345+
With this functionality, all Cloud provider-specific nodes can conveniently be assigned a TuneD profile specifically tailored to a given Cloud provider on a {product-title} cluster. This can be accomplished without adding additional node labels or grouping nodes into machine config pools.
191346

192-
This functionality takes advantage of `spec.providerID` node object values
193-
in the form of `<cloud-provider>://<cloud-provider-specific-id>` and writes
194-
the file `/var/lib/tuned/provider` with the value `<cloud-provider>` in NTO
195-
operand containers. The content of this file is then used by TuneD to load
196-
`provider-<cloud-provider>` profile if such profile exists.
347+
This functionality takes advantage of `spec.providerID` node object values in the form of `<cloud-provider>://<cloud-provider-specific-id>` and writes the file `/var/lib/tuned/provider` with the value `<cloud-provider>` in NTO operand containers. The content of this file is then used by TuneD to load `provider-<cloud-provider>` profile if such profile exists.
197348

198-
The `openshift` profile that both `openshift-control-plane` and
199-
`openshift-node` profiles inherit settings from is now updated to use
200-
this functionality through the use of conditional profile loading.
201-
Neither NTO nor TuneD currently ship any Cloud provider-specific profiles.
202-
However, it is possible to create a custom profile `provider-<cloud-provider>`
203-
that will be applied to all Cloud provider-specific cluster nodes.
349+
The `openshift` profile that both `openshift-control-plane` and `openshift-node` profiles inherit settings from is now updated to use this functionality through the use of conditional profile loading. Neither NTO nor TuneD currently include any Cloud provider-specific profiles. However, it is possible to create a custom profile `provider-<cloud-provider>` that will be applied to all Cloud provider-specific cluster nodes.
204350

205351
.Example GCE Cloud provider profile
352+
ifndef::rosa-hcp-tuning[]
206353
[source,yaml]
207354
----
208355
apiVersion: tuned.openshift.io/v1
@@ -218,10 +365,30 @@ spec:
218365
# Your tuning for GCE Cloud provider goes here.
219366
name: provider-gce
220367
----
368+
endif::rosa-hcp-tuning[]
369+
ifdef::rosa-hcp-tuning[]
370+
[source,JSON]
371+
----
372+
{
373+
"apiVersion": "tuned.openshift.io/v1",
374+
"kind": "Tuned",
375+
"metadata": {
376+
"name": "provider-gce",
377+
"namespace": "openshift-cluster-node-tuning-operator"
378+
},
379+
"spec": {
380+
"profile": [
381+
{
382+
"data": "[main]\nsummary=GCE Cloud provider-specific profile\n# Your tuning for GCE Cloud provider goes here.\n",
383+
"name": "provider-gce"
384+
}
385+
]
386+
}
387+
}
388+
----
389+
endif::[]
221390

222391
[NOTE]
223392
====
224-
Due to profile inheritance, any setting specified in the
225-
`provider-<cloud-provider>` profile will be overwritten by the `openshift`
226-
profile and its child profiles.
393+
Due to profile inheritance, any setting specified in the `provider-<cloud-provider>` profile will be overwritten by the `openshift` profile and its child profiles.
227394
====

modules/node-tuning-operator.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ ifeval::["{context}" == "cluster-capabilities"]
1414
:cluster-caps:
1515
endif::[]
1616

17-
1817
:_content-type: CONCEPT
1918
[id="about-node-tuning-operator_{context}"]
2019
ifdef::operators[]

0 commit comments

Comments
 (0)