2.2. HCP를 사용하여 ROSA에서 노드 튜닝 구성 생성

ROSA(Red Hat OpenShift Service on AWS) CLI, rosa 를 사용하여 튜닝 구성을 생성할 수 있습니다.

사전 요구 사항

  • ROSA CLI의 최신 버전을 다운로드했습니다.
  • 최신 버전에 클러스터가 있어야 합니다.
  • 노드 튜닝을 위해 사양 파일이 구성되어 있습니다.

절차

  1. 다음 명령을 실행하여 튜닝 구성을 생성합니다.

    $ rosa create tuning-config -c <cluster_id> --name <name_of_tuning> --spec-path <path_to_spec_file>

    spec.json 파일의 경로를 제공하거나 명령에서 오류를 반환해야 합니다.

    샘플 출력

    $ I: Tuning config 'sample-tuning' has been created on cluster 'cluster-example'.
    $ I: To view all tuning configs, run 'rosa list tuning-configs -c cluster-example'

검증

  • 다음 명령을 사용하여 계정에서 적용되는 기존 튜닝 구성을 확인할 수 있습니다.

    $ rosa list tuning-configs -c <cluster_name> [-o json]

    구성 목록에 원하는 출력 유형을 지정할 수 있습니다.

    • 출력 유형을 지정하지 않으면 튜닝 구성의 ID와 이름이 표시됩니다.

      출력 유형을 지정하지 않은 샘플 출력

      ID                                    NAME
      20468b8e-edc7-11ed-b0e4-0a580a800298  sample-tuning

    • json 과 같은 출력 유형을 지정하는 경우 튜닝 구성을 JSON 텍스트로 받습니다.

      참고

      다음 JSON 출력에는 읽기 명확성을 위해 하드 라인 반환이 있습니다. JSON 문자열에서 줄 바꿈을 제거하지 않는 한 이 JSON 출력은 유효하지 않습니다.

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