이 콘텐츠는 선택한 언어로 제공되지 않습니다.

Chapter 3. Enabling cloud rating in a RHOSO environment


Important

This feature is available in this release as a Technology Preview, and therefore is not fully supported by Red Hat. It should only be used for testing, and should not be deployed in a production environment. For more information about Technology Preview features, see Scope of Coverage Details.

Rating is the process of assigning a value to the consumption of computing resources. The Rating service (cloudkitty) monitors, collects, rates and stores metrics data about service consumption in a RHOSO cloud. You can configure the Rating service to associate a value to a metric for a given period.

3.1. Prerequisites

  • The Loki Operator is installed on the RHOCP cluster.
  • Prometheus is enabled in your cluster. Use the following command to check that the Telemetry Operator has metricStorage enabled:

    $ oc patch oscp/openstack --type='json' -p '[{"op": "replace", "path": "/spec/telemetry/template/metricStorage/enabled", "value":true}]'
    Copy to Clipboard Toggle word wrap

    If this command returns False, use the following command to enable metricStorage:

    $ oc patch openstack openstackcontrolplane
     --type merge -p '{"spec":{"metricStorage": true }}'
    Copy to Clipboard Toggle word wrap

    For more information about configuring metricStorage, see Configuring observability on the control plane.

The Telemetry Operator uses a Keystone fetcher to retrieve a list of projects to rate and a Prometheus collector to collect data from a Prometheus source for a given project and metric. The Telemetry Operator does not support using a Gnocchi collector or any other type of fetcher.

Note

The Telemetry Operator does not support the Rating service reprocessing API.

3.2. Enabling the Rating service on the control plane

You can enable the Rating service (cloudkitty) in the Telemetry Operator to provide chargeback and rating capabilities to RHOSO clouds.

Procedure

  1. Create a Secret CR on your workstation to connect Loki to the AWS s3 object storage you use for the Loki log store:

    apiVersion: v1
    kind: Secret
    metadata:
      name: cloudkitty-loki-s3
      namespace: openstack
    stringData:
      access_key_id: <your_key_id>
      access_key_secret: <your_key_secret>
      bucketnames: <your_bucket_name>
      endpoint: <your_s3_endpoint>
    Copy to Clipboard Toggle word wrap
  2. Create the Secret CR in the cluster:

    $ oc create -f loki_s3_secret.yaml -n openstack
    Copy to Clipboard Toggle word wrap
  3. Verify that the Secret CR is created:

    $ oc describe secret logging-loki-s3 -n openstack
    Copy to Clipboard Toggle word wrap
  4. Open the OpenStackControlPlane CR file on your workstation, for example, openstack_control_plane.yaml.
  5. Locate the service definition for telemetry and add the following cloudkitty configuration to enable the Ratings service:

      telemetry:
        enabled: true
          template:
            ...
            cloudkitty:
              enabled: true
              s3StorageConfig:
                schemas:
                - effectiveDate: "2024-11-18"
                  version: v13
                secret:
                  name: cloudkitty-loki-s3
                  type: s3
    Copy to Clipboard Toggle word wrap
  6. Check how long metrics data is being retained for, and ensure that they are not being stored for more than 7 days:

          template:
            metricStorage:
              enabled: true
              ...
              monitoringStack:
                ...
                storage:
                  strategy: persistent
                  retention: 24h
    Copy to Clipboard Toggle word wrap
  7. Ensure that the Loki Operator log store is sized for your environment. For more information, see Loki deployment sizing.
  8. Update the control plane:

    $ oc apply -f openstack_control_plane.yaml -n openstack
    Copy to Clipboard Toggle word wrap
  9. Wait until RHOCP creates the resources related to the OpenStackControlPlane CR. Run the following command to check the status:

    $ oc get openstackcontrolplane -n openstack
    NAME              STATUS  MESSAGE
    openstack-control-plane   Unknown   Setup started
    Copy to Clipboard Toggle word wrap

    The OpenStackControlPlane resources are created when the status is "Setup complete".

    Tip

    Append the -w option to the end of the get command to track deployment progress.

  10. Confirm that the control plane is deployed by reviewing the pods in the openstack namespace:

    $ oc get pods -n openstack
    Copy to Clipboard Toggle word wrap

    The control plane is deployed when all the pods are either completed or running.

Verification

  1. Access the remote shell for the openstackclient pod and verify that the Rating service is enabled:

    $ oc rsh -n openstack openstackclient
    $ openstack rating module list
    +-----------+---------+----------+
    | Module    | Enabled | Priority |
    +-----------+---------+----------+
    | hashmap   | False   | 1        |
    | noop      | True    | 1        |
    | pyscripts | False   | 1        |
    +-----------+---------+----------+
    Copy to Clipboard Toggle word wrap
  2. Ensure that you can enable, disable, and change the priority of each module. For more information about how to use the Rating service, see https://docs.openstack.org/cloudkitty/latest/user/rating/index.html.

3.3. Additional resources

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2026 Red Hat
맨 위로 이동