6.3. 为带有 HCP 的 ROSA 修改节点调优配置
您可以使用 Red Hat OpenShift Service on AWS (ROSA) CLI ( rosa
)查看和更新节点调优配置。
先决条件
- 您已下载了 ROSA CLI 的最新版本。
- 在最新版本中有一个集群
- 您的集群已添加了节点调优配置
流程
您可以使用
rosa describe
命令查看调优配置:$ rosa describe tuning-config -c <cluster_id> 1 --name <name_of_tuning> 2 [-o json] 3
此 spec 文件中的以下项是:
不指定输出类型的输出示例
Name: sample-tuning ID: 20468b8e-edc7-11ed-b0e4-0a580a800298 Spec: { "profile": [ { "data": "[main]\nsummary=Custom OpenShift profile\ninclude=openshift-node\n\n[sysctl]\nvm.dirty_ratio=\"55\"\n", "name": "tuned-1-profile" } ], "recommend": [ { "priority": 20, "profile": "tuned-1-profile" } ] }
指定 JSON 输出的输出示例
{ "kind": "TuningConfig", "id": "20468b8e-edc7-11ed-b0e4-0a580a800298", "href": "/api/clusters_mgmt/v1/clusters/23jbsevqb22l0m58ps39ua4trff9179e/tuning_configs/20468b8e-edc7-11ed-b0e4-0a580a800298", "name": "sample-tuning", "spec": { "profile": [ { "data": "[main]\nsummary=Custom OpenShift profile\ninclude=openshift-node\n\n[sysctl]\nvm.dirty_ratio=\"55\"\n", "name": "tuned-1-profile" } ], "recommend": [ { "priority": 20, "profile": "tuned-1-profile" } ] } }
验证调优配置后,您可以使用
rosa edit
命令编辑现有的配置:$ rosa edit tuning-config -c <cluster_id> --name <name_of_tuning> --spec-path <path_to_spec_file>
在这个命令中,您可以使用
spec.json
文件编辑您的配置。
验证
再次运行
rosa describe
命令,以查看您在调优配置中更新了对spec.json
文件所做的更改:$ rosa describe tuning-config -c <cluster_id> --name <name_of_tuning>
输出示例
Name: sample-tuning ID: 20468b8e-edc7-11ed-b0e4-0a580a800298 Spec: { "profile": [ { "data": "[main]\nsummary=Custom OpenShift profile\ninclude=openshift-node\n\n[sysctl]\nvm.dirty_ratio=\"55\"\n", "name": "tuned-2-profile" } ], "recommend": [ { "priority": 10, "profile": "tuned-2-profile" } ] }