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

Chapter 2. Installing Metering


Review the following sections before installing metering into your cluster.

To get started installing metering, first install the Metering Operator from OperatorHub. Next, configure your instance of metering by creating a CustomResource, referred to here as your MeteringConfig. Installing the Metering Operator creates a default MeteringConfig that you can modify using the examples in the documentation. After creating your MeteringConfig, install the metering stack. Last, verify your installation.

2.1. Prerequisites

Metering requires the following components:

  • A StorageClass for dynamic volume provisioning. Metering supports a number of different storage solutions.
  • 4GB memory and 4 CPU cores available cluster capacity and at least one node with 2 CPU cores and 2GB memory capacity available.
  • The minimum resources needed for the largest single Pod installed by metering are 2GB of memory and 2 CPU cores.

    • Memory and CPU consumption may often be lower, but will spike when running reports, or collecting data for larger clusters.

2.2. Installing the Metering Operator

To install the Metering Operator first create an openshift-metering namespace, and then install the Metering Operator from OperatorHub.

Procedure

  1. In the OpenShift Container Platform web console, click Administration Namespaces Create Namespace.
  2. Set the name to openshift-metering. No other namespace is supported. Label the namespace with openshift.io/cluster-monitoring=true, and click Create.
  3. Next, click Operators OperatorHub, and filter for metering to find the Metering Operator.
  4. Click the Metering card, review the package description, and then click Install.
  5. On the Create Operator Subscription screen, select the openshift-metering namespace you created above. Specify your update channel and approval strategy, then click Subscribe to install metering.
  6. On the Installed Operators screen the Status displays InstallSucceeded when metering has finished installing. Click the name of the operator in the first column to view the Operator Details page.
Note

It may take a few minutes for the metering operator to appear.

From the Operator Details page you can create different resources related to metering. To complete your installation create a MeteringConfig resource to configure metering and install the components of the metering stack.

2.3. Installing the Metering stack

After adding the Metering Operator to your cluster you can install the components of metering by installing the metering stack.

Prerequisites

Important

There can only be one MeteringConfig resource in the openshift-metering namespace. Any other configuration is not supported.

Procedure

  1. From the web console, ensure you are on the Operator Details page for the Metering Operator in the openshift-metering project. You can navigate to this page by clicking Operators Installed Operators, then selecting the Metering Operator.
  2. Under Provided APIs, click Create Instance on the Metering Configuration card. This opens a YAML editor with the default MeteringConfig file where you can define your configuration.

    Note

    For example configuration files and all supported configuration options, review the configuring metering documentation.

  3. Enter your MeteringConfig into the YAML editor and click Create.

The MeteringConfig resource begins to create the necessary resources for your metering stack. You can now move on to verifying your installation.

2.4. Verify Installation

To verify your metering installation you can check that all the required Pods have been created, and check that your report data sources are beginning to import data.

Procedure

  1. Navigate to Workloads Pods in the metering namespace and verify that Pods are being created. This can take several minutes after installing the metering stack.

    You can run the same check using the oc CLI :

    $ oc -n openshift-metering get pods
    NAME                                  READY   STATUS              RESTARTS   AGE
    hive-metastore-0                      1/2     Running             0          52s
    hive-server-0                         2/3     Running             0          52s
    metering-operator-68dd64cfb6-pxh8v    2/2     Running             0          2m49s
    presto-coordinator-0                  2/2     Running             0          31s
    reporting-operator-56c6c878fb-2zbhp   0/2     ContainerCreating   0          4s
  2. Continue to check your Pods until they show Ready. This can take several minutes. Many Pods rely on other components to function before they themselves can be considered ready. Some Pods may restart if other Pods take too long to start, this is okay and can be expected during installation.

    Using the oc CLI, the same check shows output similar to the following:

    $ oc -n openshift-metering get pods
    NAME                                  READY   STATUS    RESTARTS   AGE
    hive-metastore-0                      2/2     Running   0          3m28s
    hive-server-0                         3/3     Running   0          3m28s
    metering-operator-68dd64cfb6-2k7d9    2/2     Running   0          5m17s
    presto-coordinator-0                  2/2     Running   0          3m9s
    reporting-operator-5588964bf8-x2tkn   2/2     Running   0          2m40s
  3. Next, use the oc CLI to verify that the ReportDataSources are beginning to import data, indicated by a valid timestamp in the EARLIEST METRIC column (this may take a few minutes). We filter out the "-raw" ReportDataSources which do not import data:

    $ oc get reportdatasources -n openshift-metering | grep -v raw
    NAME                                         EARLIEST METRIC        NEWEST METRIC          IMPORT START           IMPORT END             LAST IMPORT TIME       AGE
    node-allocatable-cpu-cores                   2019-08-05T16:52:00Z   2019-08-05T18:52:00Z   2019-08-05T16:52:00Z   2019-08-05T18:52:00Z   2019-08-05T18:54:45Z   9m50s
    node-allocatable-memory-bytes                2019-08-05T16:51:00Z   2019-08-05T18:51:00Z   2019-08-05T16:51:00Z   2019-08-05T18:51:00Z   2019-08-05T18:54:45Z   9m50s
    node-capacity-cpu-cores                      2019-08-05T16:51:00Z   2019-08-05T18:29:00Z   2019-08-05T16:51:00Z   2019-08-05T18:29:00Z   2019-08-05T18:54:39Z   9m50s
    node-capacity-memory-bytes                   2019-08-05T16:52:00Z   2019-08-05T18:41:00Z   2019-08-05T16:52:00Z   2019-08-05T18:41:00Z   2019-08-05T18:54:44Z   9m50s
    persistentvolumeclaim-capacity-bytes         2019-08-05T16:51:00Z   2019-08-05T18:29:00Z   2019-08-05T16:51:00Z   2019-08-05T18:29:00Z   2019-08-05T18:54:43Z   9m50s
    persistentvolumeclaim-phase                  2019-08-05T16:51:00Z   2019-08-05T18:29:00Z   2019-08-05T16:51:00Z   2019-08-05T18:29:00Z   2019-08-05T18:54:28Z   9m50s
    persistentvolumeclaim-request-bytes          2019-08-05T16:52:00Z   2019-08-05T18:30:00Z   2019-08-05T16:52:00Z   2019-08-05T18:30:00Z   2019-08-05T18:54:34Z   9m50s
    persistentvolumeclaim-usage-bytes            2019-08-05T16:52:00Z   2019-08-05T18:30:00Z   2019-08-05T16:52:00Z   2019-08-05T18:30:00Z   2019-08-05T18:54:36Z   9m49s
    pod-limit-cpu-cores                          2019-08-05T16:52:00Z   2019-08-05T18:30:00Z   2019-08-05T16:52:00Z   2019-08-05T18:30:00Z   2019-08-05T18:54:26Z   9m49s
    pod-limit-memory-bytes                       2019-08-05T16:51:00Z   2019-08-05T18:40:00Z   2019-08-05T16:51:00Z   2019-08-05T18:40:00Z   2019-08-05T18:54:30Z   9m49s
    pod-persistentvolumeclaim-request-info       2019-08-05T16:51:00Z   2019-08-05T18:40:00Z   2019-08-05T16:51:00Z   2019-08-05T18:40:00Z   2019-08-05T18:54:37Z   9m49s
    pod-request-cpu-cores                        2019-08-05T16:51:00Z   2019-08-05T18:18:00Z   2019-08-05T16:51:00Z   2019-08-05T18:18:00Z   2019-08-05T18:54:24Z   9m49s
    pod-request-memory-bytes                     2019-08-05T16:52:00Z   2019-08-05T18:08:00Z   2019-08-05T16:52:00Z   2019-08-05T18:08:00Z   2019-08-05T18:54:32Z   9m49s
    pod-usage-cpu-cores                          2019-08-05T16:52:00Z   2019-08-05T17:57:00Z   2019-08-05T16:52:00Z   2019-08-05T17:57:00Z   2019-08-05T18:54:10Z   9m49s
    pod-usage-memory-bytes                       2019-08-05T16:52:00Z   2019-08-05T18:08:00Z   2019-08-05T16:52:00Z   2019-08-05T18:08:00Z   2019-08-05T18:54:20Z   9m49s

After all Pods are ready and you have verified that data is being imported, you can begin using metering to collect data and report on your cluster.

2.5. Additional resources

Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

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

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

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

Red Hat 소개

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

© 2024 Red Hat, Inc.