|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * scalability_and_performance/ztp-deploying-disconnected.adoc |
| 4 | + |
| 5 | +:_content-type: PROCEDURE |
| 6 | +[id="ztp-creating-hwevents_{context}"] |
| 7 | += Configuring bare-metal event monitoring using PolicyGenTemplate CRs |
| 8 | + |
| 9 | +You can configure bare-metal hardware events for vRAN clusters that are deployed using the GitOps Zero Touch Provisioning (ZTP) pipeline. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* Install the OpenShift CLI (`oc`). |
| 14 | +* Log in as a user with `cluster-admin` privileges. |
| 15 | +* Create a Git repository where you manage your custom site configuration data. |
| 16 | +
|
| 17 | +[NOTE] |
| 18 | +==== |
| 19 | +Multiple `HardwareEvent` resources are not permitted. |
| 20 | +==== |
| 21 | + |
| 22 | +.Procedure |
| 23 | + |
| 24 | +. To configure the AMQ Interconnect Operator and the {redfish-operator} Operator, add the following YAML to `spec.sourceFiles` in the `common-ranGen.yaml` file: |
| 25 | ++ |
| 26 | +[source,yaml] |
| 27 | +---- |
| 28 | +# AMQ interconnect operator for fast events |
| 29 | +- fileName: AmqSubscriptionNS.yaml |
| 30 | + policyName: "subscriptions-policy" |
| 31 | +- fileName: AmqSubscriptionOperGroup.yaml |
| 32 | + policyName: "subscriptions-policy" |
| 33 | +- fileName: AmqSubscription.yaml |
| 34 | + policyName: "subscriptions-policy" |
| 35 | +# Bare Metal Event Rely operator |
| 36 | +- fileName: BareMetalEventRelaySubscriptionNS.yaml |
| 37 | + policyName: "subscriptions-policy" |
| 38 | +- fileName: BareMetalEventRelaySubscriptionOperGroup.yaml |
| 39 | + policyName: "subscriptions-policy" |
| 40 | +- fileName: BareMetalEventRelaySubscription.yaml |
| 41 | + policyName: "subscriptions-policy" |
| 42 | +---- |
| 43 | + |
| 44 | +. Add the `Interconnect` CR to `.spec.sourceFiles` in the site configuration file, for example, the `example-sno-site.yaml` file: |
| 45 | ++ |
| 46 | +[source,yaml] |
| 47 | +---- |
| 48 | +- fileName: AmqInstance.yaml |
| 49 | + policyName: "config-policy" |
| 50 | +---- |
| 51 | +
|
| 52 | +. Add the `HardwareEvent` CR to `spec.sourceFiles` in your specific group configuration file, for example, in the `group-du-sno-ranGen.yaml` file: |
| 53 | ++ |
| 54 | +[source,yaml] |
| 55 | +---- |
| 56 | +- fileName: HardwareEvent.yaml |
| 57 | + policyName: "config-policy" |
| 58 | + spec: |
| 59 | + nodeSelector: {} |
| 60 | + transportHost: "amqp://<amq_interconnect_name>.<amq_interconnect_namespace>.svc.cluster.local" <1> |
| 61 | + logLevel: "info" |
| 62 | +---- |
| 63 | +<1> The `transportHost` URL is composed of the existing AMQ Interconnect CR `name` and `namespace`. For example, in `transportHost: "amqp://amq-router.amq-router.svc.cluster.local"`, the AMQ Interconnect `name` and `namespace` are both set to `amq-router`. |
| 64 | +
|
| 65 | +. Commit the `PolicyGenTemplate` change in Git, and then push the changes to your site configuration repository to deploy bare-metal events monitoring to new sites using GitOps ZTP. |
| 66 | + |
| 67 | +. Create the Redfish Secret by running the following command: |
| 68 | ++ |
| 69 | +[source,terminal] |
| 70 | +---- |
| 71 | +$ oc -n openshift-bare-metal-events create secret generic redfish-basic-auth \ |
| 72 | +--from-literal=username=<bmc_username> --from-literal=password=<bmc_password> \ |
| 73 | +--from-literal=hostaddr="<bmc_host_ip_addr>" |
| 74 | +---- |
0 commit comments