|
| 1 | +// Module included in the following assemblies: |
| 2 | + |
| 3 | +// * power_monitoring/configuring-power-monitoring.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="power-monitoring-configuring-kepler-redfish_{context}"] |
| 7 | += Configuring {PM-kepler} to use Redfish |
| 8 | + |
| 9 | +You can configure {PM-kepler} to use Redfish as the source for running or hosting containers. {PM-kepler} can then monitor the power usage of these containers. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | +* You have access to the {product-title} web console. |
| 13 | +* You are logged in as a user with the `cluster-admin` role. |
| 14 | +* You have installed the {PM-operator}. |
| 15 | +
|
| 16 | +.Procedure |
| 17 | + |
| 18 | +. In the *Administrator* perspective of the web console, click *Operators* -> *Installed Operators*. |
| 19 | + |
| 20 | +. Click *{PM-title-c}* from the *Installed Operators* list and click the *{PM-kepler}* tab. |
| 21 | + |
| 22 | +. Click *Create {PM-kepler}*. If you already have a {PM-kepler} instance created, click *Edit Kepler*. |
| 23 | + |
| 24 | +. Configure `.spec.exporter.redfish` of the {PM-kepler} instance by specifying the mandatory `secretRef` field. You can also configure the optional `probeInterval` and `skipSSLVerify` fields to meet your needs. |
| 25 | ++ |
| 26 | +.Example {PM-kepler} instance |
| 27 | +[source,yaml] |
| 28 | +---- |
| 29 | +apiVersion: kepler.system.sustainable.computing.io/v1alpha1 |
| 30 | +kind: Kepler |
| 31 | +metadata: |
| 32 | + name: kepler |
| 33 | +spec: |
| 34 | + exporter: |
| 35 | + deployment: |
| 36 | +# ... |
| 37 | + redfish: |
| 38 | + secretRef: <secret_name> required <1> |
| 39 | + probeInterval: 60s <2> |
| 40 | + skipSSLVerify: false <3> |
| 41 | +# ... |
| 42 | +---- |
| 43 | +<1> Required: Specifies the name of the secret that contains the credentials for accessing the Redfish server. |
| 44 | +<2> Optional: Controls the frequency at which the power information is queried from Redfish. The default value is `60s`. |
| 45 | +<3> Optional: Controls if {PM-kepler} skips verifying the Redfish server certificate. The default value is `false`. |
| 46 | ++ |
| 47 | +[NOTE] |
| 48 | +==== |
| 49 | +After {PM-kepler} is deployed, the `openshift-power-monitoring` namespace is created. |
| 50 | +==== |
| 51 | +. Create the `redfish.csv` file with the following data format: |
| 52 | ++ |
| 53 | +[source,csv] |
| 54 | +---- |
| 55 | +<your_kubelet_node_name>,<redfish_username>,<redfish_password>,https://<redfish_ip_or_hostname>/ |
| 56 | +---- |
| 57 | ++ |
| 58 | +.Example `redfish.csv` file |
| 59 | +[source,csv] |
| 60 | +---- |
| 61 | +control-plane,exampleuser,examplepass,https://redfish.nodes.example.com |
| 62 | +worker-1,exampleuser,examplepass,https://redfish.nodes.example.com |
| 63 | +worker-2,exampleuser,examplepass,https://another.redfish.nodes.example.com |
| 64 | +---- |
| 65 | +. Create the secret under the `openshift-power-monitoring` namespace. You must create the secret with the following conditions: |
| 66 | ++ |
| 67 | +-- |
| 68 | +* The secret type is `Opaque`. |
| 69 | +* The credentials are stored under the `redfish.csv` key in the `data` field of the secret. |
| 70 | +-- |
| 71 | ++ |
| 72 | +[source,terminal] |
| 73 | +---- |
| 74 | +$ oc -n openshift-power-monitoring \ |
| 75 | + create secret generic redfish-secret \ |
| 76 | + --from-file=redfish.csv |
| 77 | +---- |
| 78 | ++ |
| 79 | +.Example output |
| 80 | +[source,yaml] |
| 81 | +---- |
| 82 | +apiVersion: v1 |
| 83 | +kind: Secret |
| 84 | +metadata: |
| 85 | + name: redfish-secret |
| 86 | +data: |
| 87 | + redfish.csv: YmFyCg== |
| 88 | + # ... |
| 89 | +---- |
| 90 | ++ |
| 91 | +[IMPORTANT] |
| 92 | +==== |
| 93 | +The {PM-kepler} deployment will not continue until the Redfish secret is created. You can find this information in the `status` of a {PM-kepler} instance. |
| 94 | +==== |
0 commit comments