1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/ztp-configuring-hwevents-using-pgt.adoc
Aidan Reilly 01fade44b2 Updates for PolicyGenerator and deprecated PolicyGenTemplate
Updates for Max

David's comments

Adding merge comparison

Reorg for clarity

Updates for David
2024-06-18 11:16:09 +01:00

60 lines
2.1 KiB
Plaintext

// Module included in the following assemblies:
//
// * edge_computing/ztp-advanced-policy-config.adoc
// * edge_computing/ztp-advanced-policygenerator-config.adoc
:_mod-docs-content-type: PROCEDURE
[id="ztp-creating-hwevents_{context}"]
= Configuring bare-metal events that use HTTP transport
You can configure bare-metal events that use HTTP transport on managed clusters that you deploy with the {ztp-first} pipeline.
.Prerequisites
* You have installed the OpenShift CLI (`oc`).
* You have logged in as a user with `cluster-admin` privileges.
* You have created a Git repository where you manage your custom site configuration data.
.Procedure
. Configure the {redfish-operator} Operator by adding the following YAML to `{rangen-yaml-path}` in the `{policy-prefix}common-ranGen.yaml` file:
+
[source,yaml]
----
ifeval::["{policy-gen-cr}" == "PolicyGenTemplate"]
include::snippets/pgt-ztp-configuring-hwevents-using-pgt.yaml[]
endif::[]
ifeval::["{policy-gen-cr}" == "PolicyGenerator"]
include::snippets/pg-ztp-configuring-hwevents.yaml[]
endif::[]
----
. Add the `HardwareEvent` CR to `{rangen-yaml-path}` in your specific group configuration file, for example, in the `{policy-prefix}group-du-sno-ranGen.yaml` file:
+
ifeval::["{policy-gen-cr}" == "PolicyGenTemplate"]
include::snippets/pgt-ztp-configuring-hwevents-using-pgt-hardware-event.adoc[]
endif::[]
ifeval::["{policy-gen-cr}" == "PolicyGenerator"]
include::snippets/pg-ztp-configuring-hwevents-using-pgt-hardware-event.adoc[]
endif::[]
+
[NOTE]
====
In {product-title} 4.13 or later, you do not need to set the `transportHost` field in the `HardwareEvent` custom resource (CR) when you use HTTP transport with bare-metal events.
====
. Merge any other required changes and files with your custom site repository.
. Push the changes to your site configuration repository to deploy bare-metal events to new sites with {ztp}.
. Create the Redfish Secret by running the following command:
+
[source,terminal]
----
$ oc -n openshift-bare-metal-events create secret generic redfish-basic-auth \
--from-literal=username=<bmc_username> --from-literal=password=<bmc_password> \
--from-literal=hostaddr="<bmc_host_ip_addr>"
----