Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Latest commit

 

History

History
145 lines (109 loc) · 3.33 KB

user-guide.md

File metadata and controls

145 lines (109 loc) · 3.33 KB

User guide for Hardware Classification Controller

Hardware Classification Controller

User can validate and classify the hosts based on hardware requirement. User will get to know how many hosts matched to user profile. User can select any of matched host and go for provisioning.

This feature helps user to avoid runtime failures.

Prerequisites

  1. HWCC setup

    Follow setup documentation guide for setup. Setup Documentation

HardwareClassificationController Example

The following is a sample CRD of a HardwareClassificationController resource (YAML PATH), it includes metadata and specification section. User can create multiple profiles for different workloads as per the sample shown below. Alternatively user can simply modify values of the parameters shown in sample file as per application.

apiVersion: metal3.io/v1alpha1
kind: HardwareClassification
metadata:
  name: hardwareclassification-sample
  namespace: metal3
  labels:
    hardwareclassification-sample: matches
spec:
  hardwareCharacteristics:
      cpu:
         minimumCount: 48
         maximumCount: 72
         minimumSpeedMHz: 2600
         maximumSpeedMHz: 3600
      disk:
         minimumCount: 1
         maximumCount: 8
         minimumIndividualSizeGB: 200
         maximumIndividualSizeGB: 3000
         diskSelector:
                - hctl: "0:N:N:0"
                  rotational: true
                - hctl: "0:N:0:0"
                  rotational : false
      ram:
         minimumSizeGB: 6
         maximumSizeGB: 180
      nic:
         minimumCount: 1
         maximumCount: 7
         nicSelector:
                vendor:
                   - "0x8086"
                   - "0x1af5"
      firmware:
         bios:
             vendor: "Dell Inc."
             minorVersion: "1.5.6"
             majorVersion: "2.5.6"
      systemVendor:
         manufacturer: "QEMU"
         productName: "Standard PC"

Note: Minimum 1 field under hardwareCharacteristics is mandatory. If no field provided under hardwareCharacteristics, user will get error.

e.g.

    disk:
       minimumCount: 1

Commands

User requires to use following commands for applying workload profiles and get status for classified hosts.

Run

Apply profile using kubectl apply command.

    $ kubectl apply -f <path-to-hwcc.yaml>

Status

Check labels on baremetal hosts

    $ kubectl get bmh -n <namespace> --show-labels

Check status of profile by checking hardware-classification status.

    $ kubectl get hardware-classification -n <namespace>

Note : Instead of hardware-classification shortform hwc or hc can be used.

Delete

Deleting profile

To delete profile which is applied, user have two option. Delete using profile name:

    $ kubectl delete -f <path-to-hwcc.yaml>

or delete using resource name:

    $ kubectl delete hwc <profile-name> -n <namespace>

Deleting setup

  1. Delete cluster based setup.

    To delete whole setup, delete deployment and namespace of hwcc.

        $ kubectl delete deployment <deployment-name> -n <namespace>
    
        $ kubectl delete namespace <namespace>
  2. Delete local setup. To delete local setup

        $ make uninstall