Skip to content

Commit 6a6af58

Browse files
authored
add install instructions for the metering operator (#53)
1 parent 6f11510 commit 6a6af58

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ make test-local
5353
```
5454
## Setup for running the Operator
5555

56-
First, switch to the OpenShift project called `openshift-metering`. This is where we are going to deploy our Operator and its dependencies:
56+
First, [install the metering-operator](docs/installing-metering.md). Next, switch to the `openshift-metering` namespace. This is where we are going to deploy our Operator:
5757

5858
```
5959
oc project openshift-metering
@@ -291,4 +291,4 @@ Whenever you release a new version of the `cost-mgmt-operator`, you must test th
291291
```
292292
9. Rerun `$ operator-courier push "$OPERATOR_DIR" "$QUAY_NAMESPACE" "$PACKAGE_NAME" "$PACKAGE_VERSION" "$TOKEN"` and check that a new release of your application is available in your quay.io registry.
293293
10. Now refresh your operator source, wait a few minutes and watch the new version of the operator automatically install.
294-
294+

docs/installing-metering.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Installing and Configuring the Metering Operator
2+
3+
For the next steps, you will need access to an OpenShift cluster (4.3 or newer).
4+
5+
1. In OpenShift, create a namespace called `openshift-metering` if one does not exist, and label the namespace with `openshift.io/cluster-monitoring=true`.
6+
7+
2. Install the Metering Operator in the `openshift-metering` namespace, using the OpenShift web console (search for Metering in OperatorHub).
8+
9+
3. Create a key/value secret in the `openshift-metering` namespace called `metering-aws` where the keys are `aws-access-key-id` and `aws-secret-access-key` with your associated aws secret values.
10+
11+
4. Create a Metering Configuration that points to your bucket/path/ and region, and references the aws secret that you created above. It should look similar to the following:
12+
13+
```
14+
apiVersion: metering.openshift.io/v1
15+
kind: MeteringConfig
16+
metadata:
17+
name: operator-metering
18+
namespace: openshift-metering
19+
spec:
20+
storage:
21+
hive:
22+
s3:
23+
bucket: your-bucketname/path/
24+
createBucket: false
25+
region: us-east-1
26+
secretName: metering-aws
27+
type: s3
28+
type: hive
29+
```
30+
31+
To check that Metering has been configured correctly, you can view & ensure that all of the pods are running & ready.

0 commit comments

Comments
 (0)