|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * scalability_and_performance/telco_ref_design_specs/core/telco-core-ref-crs.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | + |
| 7 | +[id="using-cluster-compare-telco_core_{context}"] |
| 8 | += Comparing a cluster with the {rds} reference configuration |
| 9 | + |
| 10 | +After you deploy a {rds} cluster, you can use the `cluster-compare` plugin to assess the cluster's compliance with the {rds} reference design specifications (RDS). The `cluster-compare` plugin is an OpenShift CLI (`oc`) plugin. The plugin uses a {rds} reference configuration to validate the cluster with the {rds} custom resources (CRs). |
| 11 | + |
| 12 | +The plugin-specific reference configuration for {rds} is packaged in a container image with the {rds} CRs. |
| 13 | + |
| 14 | +For further information about the `cluster-compare` plugin, see "Understanding the cluster-compare plugin". |
| 15 | + |
| 16 | +.Prerequisites |
| 17 | + |
| 18 | +* You have access to the cluster as a user with the `cluster-admin` role. |
| 19 | + |
| 20 | +* You have credentials to access the `registry.redhat.io` container image registry. |
| 21 | + |
| 22 | +* You installed the `cluster-compare` plugin. |
| 23 | + |
| 24 | +.Procedure |
| 25 | + |
| 26 | +. Log on to the container image registry with your credentials by running the following command: |
| 27 | ++ |
| 28 | +[source,terminal] |
| 29 | +---- |
| 30 | +$ podman login registry.redhat.io |
| 31 | +---- |
| 32 | + |
| 33 | +. Extract the content from the `telco-core-rds-rhel9` container image by running the following commands: |
| 34 | ++ |
| 35 | +[source,terminal] |
| 36 | +---- |
| 37 | +$ mkdir -p ./out |
| 38 | +---- |
| 39 | ++ |
| 40 | +[source,terminal] |
| 41 | +---- |
| 42 | +$ podman run -it registry.redhat.io/openshift4/openshift-telco-core-rds-rhel9:v4.18 | base64 -d | tar xv -C out |
| 43 | +---- |
| 44 | ++ |
| 45 | +You can view the reference configuration in the `reference-crs-kube-compare/` directory. |
| 46 | ++ |
| 47 | +[source,text] |
| 48 | +---- |
| 49 | +out/telco-core-rds/configuration/reference-crs-kube-compare/ |
| 50 | +├── metadata.yaml <1> |
| 51 | +├── optional <2> |
| 52 | +│ ├── logging |
| 53 | +│ ├── networking |
| 54 | +│ ├── other |
| 55 | +│ └── tuning |
| 56 | +└── required <3> |
| 57 | + ├── networking |
| 58 | + ├── other |
| 59 | + ├── performance |
| 60 | + ├── scheduling |
| 61 | + └── storage |
| 62 | +---- |
| 63 | +<1> Configuration file for the reference configuration. |
| 64 | +<2> Directory for optional templates. |
| 65 | +<3> Directory for required templates. |
| 66 | + |
| 67 | +. Compare the configuration for your cluster to the telco core reference configuration by running the following command: |
| 68 | ++ |
| 69 | +[source,terminal] |
| 70 | +---- |
| 71 | +$ oc cluster-compare -r out/telco-core-rds/configuration/reference-crs-kube-compare/metadata.yaml |
| 72 | +---- |
| 73 | ++ |
| 74 | +.Example output |
| 75 | +[source,terminal] |
| 76 | +---- |
| 77 | +W1212 14:13:06.281590 36629 compare.go:425] Reference Contains Templates With Types (kind) Not Supported By Cluster: BFDProfile, BGPAdvertisement, BGPPeer, ClusterLogForwarder, Community, IPAddressPool, MetalLB, MultiNetworkPolicy, NMState, NUMAResourcesOperator, NUMAResourcesScheduler, NodeNetworkConfigurationPolicy, SriovNetwork, SriovNetworkNodePolicy, SriovOperatorConfig, StorageCluster |
| 78 | +
|
| 79 | +... |
| 80 | +
|
| 81 | +********************************** |
| 82 | +
|
| 83 | +Cluster CR: config.openshift.io/v1_OperatorHub_cluster <1> |
| 84 | +Reference File: required/other/operator-hub.yaml <2> |
| 85 | +Diff Output: diff -u -N /tmp/MERGED-2801470219/config-openshift-io-v1_operatorhub_cluster /tmp/LIVE-2569768241/config-openshift-io-v1_operatorhub_cluster |
| 86 | +--- /tmp/MERGED-2801470219/config-openshift-io-v1_operatorhub_cluster 2024-12-12 14:13:22.898756462 +0000 |
| 87 | ++++ /tmp/LIVE-2569768241/config-openshift-io-v1_operatorhub_cluster 2024-12-12 14:13:22.898756462 +0000 |
| 88 | +@@ -1,6 +1,6 @@ |
| 89 | + apiVersion: config.openshift.io/v1 |
| 90 | + kind: OperatorHub |
| 91 | + metadata: |
| 92 | ++ annotations: <3> |
| 93 | ++ include.release.openshift.io/hypershift: "true" |
| 94 | + name: cluster |
| 95 | +-spec: |
| 96 | +- disableAllDefaultSources: true |
| 97 | +
|
| 98 | +********************************** |
| 99 | +
|
| 100 | +Summary <4> |
| 101 | +CRs with diffs: 3/4 <5> |
| 102 | +CRs in reference missing from the cluster: 22 <6> |
| 103 | +other: |
| 104 | + other: |
| 105 | + Missing CRs: <7> |
| 106 | + - optional/other/control-plane-load-kernel-modules.yaml |
| 107 | + - optional/other/worker-load-kernel-modules.yaml |
| 108 | +required-networking: |
| 109 | + networking-root: |
| 110 | + Missing CRs: |
| 111 | + - required/networking/nodeNetworkConfigurationPolicy.yaml |
| 112 | + networking-sriov: |
| 113 | + Missing CRs: |
| 114 | + - required/networking/sriov/sriovNetwork.yaml |
| 115 | + - required/networking/sriov/sriovNetworkNodePolicy.yaml |
| 116 | + - required/networking/sriov/SriovOperatorConfig.yaml |
| 117 | + - required/networking/sriov/SriovSubscription.yaml |
| 118 | + - required/networking/sriov/SriovSubscriptionNS.yaml |
| 119 | + - required/networking/sriov/SriovSubscriptionOperGroup.yaml |
| 120 | +required-other: |
| 121 | + scheduling: |
| 122 | + Missing CRs: |
| 123 | + - required/other/catalog-source.yaml |
| 124 | + - required/other/icsp.yaml |
| 125 | +required-performance: |
| 126 | + performance: |
| 127 | + Missing CRs: |
| 128 | + - required/performance/PerformanceProfile.yaml |
| 129 | +required-scheduling: |
| 130 | + scheduling: |
| 131 | + Missing CRs: |
| 132 | + - required/scheduling/nrop.yaml |
| 133 | + - required/scheduling/NROPSubscription.yaml |
| 134 | + - required/scheduling/NROPSubscriptionNS.yaml |
| 135 | + - required/scheduling/NROPSubscriptionOperGroup.yaml |
| 136 | + - required/scheduling/sched.yaml |
| 137 | +required-storage: |
| 138 | + storage-odf: |
| 139 | + Missing CRs: |
| 140 | + - required/storage/odf-external/01-rook-ceph-external-cluster-details.secret.yaml |
| 141 | + - required/storage/odf-external/02-ocs-external-storagecluster.yaml |
| 142 | + - required/storage/odf-external/odfNS.yaml |
| 143 | + - required/storage/odf-external/odfOperGroup.yaml |
| 144 | + - required/storage/odf-external/odfSubscription.yaml |
| 145 | +No CRs are unmatched to reference CRs <8> |
| 146 | +Metadata Hash: fe41066bac56517be02053d436c815661c9fa35eec5922af25a1be359818f297 <9> |
| 147 | +No patched CRs <10> |
| 148 | +---- |
| 149 | +<1> The CR under comparison. The plugin displays each CR with a difference from the corresponding template. |
| 150 | +<2> The template matching with the CR for comparison. |
| 151 | +<3> The output in Linux diff format shows the difference between the template and the cluster CR. |
| 152 | +<4> After the plugin reports the line diffs for each CR, the summary of differences are reported. |
| 153 | +<5> The number of CRs in the comparison with differences from the corresponding templates. |
| 154 | +<6> The number of CRs represented in the reference configuration, but missing from the live cluster. |
| 155 | +<7> The list of CRs represented in the reference configuration, but missing from the live cluster. |
| 156 | +<8> The CRs that did not match to a corresponding template in the reference configuration. |
| 157 | +<9> The metadata hash identifies the reference configuration. |
| 158 | +<10> The list of patched CRs. |
0 commit comments