Skip to content

Commit

Permalink
Adding metering report example, update examples from .yml to .yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
kevchu3 committed Apr 20, 2020
1 parent 63f070c commit f5d5d51
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
17 changes: 12 additions & 5 deletions operator/metering/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,26 @@ exportfs -rv

### 2. Configure NFS storage

From the oc cli, create two persistent volumes of 5Gi each. Use the sample `metering-volume.pv.yml` and `hive-metastore-db-data.pv.yml` and update the reference to the NFS server to your own
From the oc cli, create two persistent volumes of 5Gi each. Use the sample `metering-volume.pv.yaml` and `hive-metastore-db-data.pv.yaml` and update the reference to the NFS server to your own
```
oc apply -f metering-volume.pv.yml
oc apply -f hive-metastore-db-data.pv.yml
oc apply -f metering-volume.pv.yaml
oc apply -f hive-metastore-db-data.pv.yaml
```

### 3. Configure metering

Follow the steps from the documentation to [configure metering with storage]. Use the sample `operator-metering.meteringconfig.yml` and update the configuration as needed
Follow the steps from the documentation to [configure metering with storage]. Use the sample `operator-metering.meteringconfig.yaml` and update the configuration as needed
```
oc apply -f operator-metering.meteringconfig.yml
oc apply -f operator-metering.meteringconfig.yaml
```

### 4. Use Metering

Deploy the example metering report with `oc apply -f cluster-cpu-capacity-hourly.report.yaml`

Following the remaining documentation to [view your report data]


[install the metering operator]: https://docs.openshift.com/container-platform/4.3/metering/metering-installing-metering.html
[configure metering with storage]: https://docs.openshift.com/container-platform/4.3/metering/configuring_metering/metering-configure-persistent-storage.html#metering-store-data-in-shared-volumes_metering-configure-persistent-storage
[view your report data]: https://docs.openshift.com/container-platform/4.3/metering/metering-using-metering.html#metering-viewing-report-results_using-metering
8 changes: 8 additions & 0 deletions operator/metering/cluster-cpu-capacity-hourly.report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: metering.openshift.io/v1
kind: Report
metadata:
name: cluster-cpu-capacity-hourly
spec:
query: "cluster-cpu-capacity"
schedule:
period: "hourly"
File renamed without changes.

0 comments on commit f5d5d51

Please sign in to comment.