Skip to content

Commit edc1d69

Browse files
authored
restructure releases dir and cleanup docs (#78)
1 parent b62a203 commit edc1d69

10 files changed

+75
-59
lines changed

README.md

Lines changed: 75 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -20,79 +20,95 @@ File-Based Catalog for Cost Management Metrics Operator
2020
Updates are made to the [basic-template.yaml](catalog-templates/basic-template.yaml) file and then a catalog is generated from the template. The template can be updated with a Make command.
2121

2222
1. in the [Makefile](Makefile), update `VERSION`, `PREVIOUS_VERSION`, and `REGISTRY_SHA` to the latest values:
23-
```
24-
VERSION ?= 3.3.2
25-
PREVIOUS_VERSION ?= 3.3.1
26-
REGISTRY_SHA ?= sha256:448e65667b5c167699778b0056a18b31dc7ed95022c803217a2786d27d21e945
27-
```
23+
```
24+
VERSION ?= 3.3.2
25+
PREVIOUS_VERSION ?= 3.3.1
26+
REGISTRY_SHA ?= sha256:448e65667b5c167699778b0056a18b31dc7ed95022c803217a2786d27d21e945
27+
```
2828
2929
2. run `make add-new-version` which will add the new version and pullspec to the template:
30-
```
31-
$ make add-new-version
32-
```
33-
which results in:
34-
```
35-
...
36-
- name: costmanagement-metrics-operator.3.3.2
37-
replaces: costmanagement-metrics-operator.3.3.1
38-
name: stable
39-
package: costmanagement-metrics-operator
40-
schema: olm.channel
41-
...
42-
- image: quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator/costmanagement-metrics-operator-bundle@sha256:448e65667b5c167699778b0056a18b31dc7ed95022c803217a2786d27d21e945
43-
schema: olm.bundle
44-
schema: olm.template.basic
45-
```
30+
```
31+
$ make add-new-version
32+
```
33+
which results in:
34+
```
35+
...
36+
- name: costmanagement-metrics-operator.3.3.2
37+
replaces: costmanagement-metrics-operator.3.3.1
38+
name: stable
39+
package: costmanagement-metrics-operator
40+
schema: olm.channel
41+
...
42+
- image: quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator/costmanagement-metrics-operator-bundle@sha256:448e65667b5c167699778b0056a18b31dc7ed95022c803217a2786d27d21e945
43+
schema: olm.bundle
44+
schema: olm.template.basic
45+
```
4646
4747
3. Rebuild the FBC (this will be very slow, especially the first time running this command). This command also validates the outputted FBC and perform post-processing to replace the `quay.io/redhat-user-workloads` test repo with the correct `registry.redhat.io/costmanagement` bundle repo in the FBCs and basic-template:
48-
```
49-
$ make catalog
50-
```
48+
```
49+
$ make catalog
50+
```
5151
5252
4. (optional) In case you need to rebuild the bundle after you've already generated the FBC, run `make remove-new-version` to remove the added versions, THEN update the `REGISTRY_SHA` with the new bundle and redo the above steps.
5353
5454
## Gather FBC for QE
5555
56-
1. Get the releases associated with the commit sha for the PR which updated the FBCs:
57-
```
58-
$ KUBECONFIG=~/.kube/konflux kubectl get release -l pac.test.appstudio.openshift.io/sha=239a845fb3b253c0dafbeae07e4144c2832d5735
59-
NAME SNAPSHOT RELEASEPLAN RELEASE STATUS AGE
60-
costmanagement-metrics-operator-fbc-v4-12-rtmmp-4wgpm costmanagement-metrics-operator-fbc-v4-12-rtmmp costmanagement-metrics-operator-stage-fbc-v4-12 Succeeded 3h2m
61-
costmanagement-metrics-operator-fbc-v4-13-n2xgp-95m5v costmanagement-metrics-operator-fbc-v4-13-n2xgp costmanagement-metrics-operator-stage-fbc-v4-13 Succeeded 3h2m
62-
costmanagement-metrics-operator-fbc-v4-14-x65bx-bccs5 costmanagement-metrics-operator-fbc-v4-14-x65bx costmanagement-metrics-operator-stage-fbc-v4-14 Succeeded 3h1m
63-
costmanagement-metrics-operator-fbc-v4-15-hbxf4-m7q44 costmanagement-metrics-operator-fbc-v4-15-hbxf4 costmanagement-metrics-operator-stage-fbc-v4-15 Succeeded 3h1m
64-
costmanagement-metrics-operator-fbc-v4-16-bhxlx-6gx4f costmanagement-metrics-operator-fbc-v4-16-bhxlx costmanagement-metrics-operator-stage-fbc-v4-16 Succeeded 3h2m
65-
costmanagement-metrics-operator-fbc-v4-17-tj4p5-4z948 costmanagement-metrics-operator-fbc-v4-17-tj4p5 costmanagement-metrics-operator-stage-fbc-v4-17 Succeeded 3h1m
66-
```
67-
68-
The `RELEASE STATUS` should be `Succeeded`!
69-
70-
2. Get the component and image:
71-
```
72-
$ KUBECONFIG=~/.kube/konflux kubectl get snapshot -l pac.test.appstudio.openshift.io/sha=239a845fb3b253c0dafbeae07e4144c2832d5735 -o jsonpath='{range .items[*]}{@.spec.components[].name}{" "}{@.spec.components[].containerImage}{"\n"}{end}'
73-
costmanagement-metrics-operator-fbc-component-v4-12 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-12@sha256:243f5ddd2d7cd758afcbbcdea118d70a78cf337fe82184f33cb33a72185ca0df
74-
costmanagement-metrics-operator-fbc-component-v4-13 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-13@sha256:4bc223ef026c2da93ef4dbc0550f9c5e61fbe391225699241e4a46421e5e4a33
75-
costmanagement-metrics-operator-fbc-component-v4-14 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-14@sha256:0bc13823aa724952c30af90045f69e80dca79b182babd5cb25971d50592949f7
76-
costmanagement-metrics-operator-fbc-component-v4-15 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-15@sha256:0b0fae192d572f26a3a5d8667838c81eca598fbf8595159b431fd2bb89118670
77-
costmanagement-metrics-operator-fbc-component-v4-16 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-16@sha256:4edbd45925c170b43a60441f2693a3e07f8bfc7e635f5cecf96bea2a185be8d5
78-
costmanagement-metrics-operator-fbc-component-v4-17 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-17@sha256:503a802959536d725a318a21902641168bf7b68d36a7e9fcb9ac431608266ae1
79-
```
80-
81-
3. These are the `CatalogSource` images and are passed to QE for testing.
56+
1. Login into the konflux cluster via sso:
57+
```sh
58+
oc login --web https://api.stone-prd-rh01.pg1f.p1.openshiftapps.com:6443
59+
60+
# make sure your in cost-mgmt-dev-tenant namespace
61+
oc project cost-mgmt-dev-tenant
62+
```
63+
64+
2. Get the releases associated with the commit sha for the PR which updated the FBCs:
65+
```sh
66+
$ oc get release -l pac.test.appstudio.openshift.io/sha=239a845fb3b253c0dafbeae07e4144c2832d5735
67+
68+
NAME SNAPSHOT RELEASEPLAN RELEASE STATUS AGE
69+
costmanagement-metrics-operator-fbc-v4-12-rtmmp-4wgpm costmanagement-metrics-operator-fbc-v4-12-rtmmp costmanagement-metrics-operator-stage-fbc-v4-12 Succeeded 3h2m
70+
costmanagement-metrics-operator-fbc-v4-13-n2xgp-95m5v costmanagement-metrics-operator-fbc-v4-13-n2xgp costmanagement-metrics-operator-stage-fbc-v4-13 Succeeded 3h2m
71+
costmanagement-metrics-operator-fbc-v4-14-x65bx-bccs5 costmanagement-metrics-operator-fbc-v4-14-x65bx costmanagement-metrics-operator-stage-fbc-v4-14 Succeeded 3h1m
72+
costmanagement-metrics-operator-fbc-v4-15-hbxf4-m7q44 costmanagement-metrics-operator-fbc-v4-15-hbxf4 costmanagement-metrics-operator-stage-fbc-v4-15 Succeeded 3h1m
73+
costmanagement-metrics-operator-fbc-v4-16-bhxlx-6gx4f costmanagement-metrics-operator-fbc-v4-16-bhxlx costmanagement-metrics-operator-stage-fbc-v4-16 Succeeded 3h2m
74+
costmanagement-metrics-operator-fbc-v4-17-tj4p5-4z948 costmanagement-metrics-operator-fbc-v4-17-tj4p5 costmanagement-metrics-operator-stage-fbc-v4-17 Succeeded 3h1m
75+
```
76+
77+
The `RELEASE STATUS` should be `Succeeded`!
78+
79+
> **NOTE:**
80+
> To prevent snapshots from being pruned by [konflux's garbage collection](https://konflux-ci.dev/docs/testing/integration/snapshots/#snapshot-garbage-collection-gc), add the annotation below to all snapshots that will be passed on to QE for testing.
81+
> ```sh
82+
> oc annotate snapshot <snapshot> test.appstudio.openshift.io/keep-snapshot=true
83+
> ```
84+
85+
3. Get the component and image:
86+
```sh
87+
$ oc get snapshot -l pac.test.appstudio.openshift.io/sha=239a845fb3b253c0dafbeae07e4144c2832d5735 -o jsonpath='{range .items[*]}{@.spec.components[].name}{" "}{@.spec.components[].containerImage}{"\n"}{end}'
88+
89+
costmanagement-metrics-operator-fbc-component-v4-12 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-12@sha256:243f5ddd2d7cd758afcbbcdea118d70a78cf337fe82184f33cb33a72185ca0df
90+
costmanagement-metrics-operator-fbc-component-v4-13 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-13@sha256:4bc223ef026c2da93ef4dbc0550f9c5e61fbe391225699241e4a46421e5e4a33
91+
costmanagement-metrics-operator-fbc-component-v4-14 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-14@sha256:0bc13823aa724952c30af90045f69e80dca79b182babd5cb25971d50592949f7
92+
costmanagement-metrics-operator-fbc-component-v4-15 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-15@sha256:0b0fae192d572f26a3a5d8667838c81eca598fbf8595159b431fd2bb89118670
93+
costmanagement-metrics-operator-fbc-component-v4-16 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-16@sha256:4edbd45925c170b43a60441f2693a3e07f8bfc7e635f5cecf96bea2a185be8d5
94+
costmanagement-metrics-operator-fbc-component-v4-17 quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-17@sha256:503a802959536d725a318a21902641168bf7b68d36a7e9fcb9ac431608266ae1
95+
```
96+
97+
4. These are the `CatalogSource` images and are passed to QE for testing.
8298
8399
## Configuring a cluster with FBC
84100
85101
1. install python dependencies:
86-
```
87-
pipenv install --deploy
88-
```
102+
```sh
103+
pipenv install --deploy
104+
```
89105
90106
2. run the `configure_cluster.py`, providing the image corresponding to the OCP verison under test. For example, on an OCP v4.16 clsuter:
91-
```
92-
pipenv run ./configure_cluster.py -i quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-16@sha256:4edbd45925c170b43a60441f2693a3e07f8bfc7e635f5cecf96bea2a185be8d5
93-
```
107+
```sh
108+
pipenv run ./configure_cluster.py -i quay.io/redhat-user-workloads/cost-mgmt-dev-tenant/costmanagement-metrics-operator-fbc-component-v4-16@sha256:4edbd45925c170b43a60441f2693a3e07f8bfc7e635f5cecf96bea2a185be8d5
109+
```
94110
95111
This will configure the cluster to:
96-
a. disable default OperatorHub sources
97-
b. install an ImageDigestMirrorSet which allows the cluster to pull the operator images which have not landed in registry.readhat.io yet.
98-
c. install the CatalogSource to make the operater installable through Operator Hub.
112+
1. disable default OperatorHub sources
113+
2. install an ImageDigestMirrorSet which allows the cluster to pull the operator images which have not landed in registry.readhat.io yet.
114+
3. install the CatalogSource to make the operater installable through Operator Hub.

0 commit comments

Comments
 (0)