1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/nw-rfhe-installing-operator-cli.adoc
2022-09-28 20:17:34 +00:00

104 lines
2.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * monitoring/using-rfhe.adoc
:_content-type: PROCEDURE
[id="nw-rfhe-installing-operator-cli_{context}"]
= Installing the {redfish-operator} using the CLI
As a cluster administrator, you can install the {redfish-operator} Operator by using the CLI.
.Prerequisites
* A cluster that is installed on bare-metal hardware with nodes that have a RedFish-enabled Baseboard Management Controller (BMC).
* Install the OpenShift CLI (`oc`).
* Log in as a user with `cluster-admin` privileges.
.Procedure
. Create a namespace for the {redfish-operator}.
.. Save the following YAML in the `bare-metal-events-namespace.yaml` file:
+
[source,yaml]
----
apiVersion: v1
kind: Namespace
metadata:
name: openshift-bare-metal-events
labels:
name: openshift-bare-metal-events
openshift.io/cluster-monitoring: "true"
----
.. Create the `Namespace` CR:
+
[source,terminal]
----
$ oc create -f bare-metal-events-namespace.yaml
----
. Create an Operator group for the {redfish-operator} Operator.
.. Save the following YAML in the `bare-metal-events-operatorgroup.yaml` file:
+
[source,yaml]
----
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: bare-metal-event-relay-group
namespace: openshift-bare-metal-events
spec:
targetNamespaces:
- openshift-bare-metal-events
----
.. Create the `OperatorGroup` CR:
+
[source,terminal]
----
$ oc create -f bare-metal-events-operatorgroup.yaml
----
. Subscribe to the {redfish-operator}.
.. Save the following YAML in the `bare-metal-events-sub.yaml` file:
+
[source,yaml]
----
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: bare-metal-event-relay-subscription
namespace: openshift-bare-metal-events
spec:
channel: "stable"
name: bare-metal-event-relay
source: redhat-operators
sourceNamespace: openshift-marketplace
----
.. Create the `Subscription` CR:
+
[source,terminal]
----
$ oc create -f bare-metal-events-sub.yaml
----
.Verification
To verify that the {redfish-operator} Operator is installed, run the following command:
[source,terminal]
----
$ oc get csv -n openshift-bare-metal-events -o custom-columns=Name:.metadata.name,Phase:.status.phase
----
.Example output
[source,terminal,subs="attributes+"]
----
Name Phase
bare-metal-event-relay.{product-version}.0-xxxxxxxxxxxx Succeeded
----