搜索

6.3. 为带有 HCP 的 ROSA 修改节点调优配置

download PDF

您可以使用 Red Hat OpenShift Service on AWS (ROSA) CLI ( rosa )查看和更新节点调优配置。

先决条件

  • 您已下载了 ROSA CLI 的最新版本。
  • 在最新版本中有一个集群
  • 您的集群已添加了节点调优配置

流程

  1. 您可以使用 rosa describe 命令查看调优配置:

    $ rosa describe tuning-config -c <cluster_id> 1
           --name <name_of_tuning> 2
           [-o json] 3

    此 spec 文件中的以下项是:

    1
    为您拥有的集群提供集群 ID,以应用节点调优配置。
    2
    提供调优配置的名称。
    3
    另外,您还可以提供输出类型。如果没有指定任何输出,则只看到调优配置的 ID 和名称。

    不指定输出类型的输出示例

    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"
          }
        ]
      }
    }

  2. 验证调优配置后,您可以使用 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"
                 }
               ]
           }

Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

© 2024 Red Hat, Inc.