From 87a428a3e87331e22b2180cbde6ae1c864de8014 Mon Sep 17 00:00:00 2001
From: Noor Muhammad Malik <noor_muhammad@dellteam.com>
Date: Mon, 31 Aug 2020 18:36:22 +0500
Subject: [PATCH] Add documentation for example hardwareprofile

This adds a verbose guide for example hardwareprofile
highlighting the RAID and firmware configurations that are
currently the features present in it.

Change-Id: I65c23cca60ac57fe152556c7a45eb33c17260b6d
Closes: #338
---
 docs/source/hardware_profile.md | 74 +++++++++++++++++++++++++++++++++
 docs/source/index.rst           |  1 +
 2 files changed, 75 insertions(+)
 create mode 100644 docs/source/hardware_profile.md

diff --git a/docs/source/hardware_profile.md b/docs/source/hardware_profile.md
new file mode 100644
index 000000000..1cfd1c1bb
--- /dev/null
+++ b/docs/source/hardware_profile.md
@@ -0,0 +1,74 @@
+# Hardware Profile Guide
+
+This document explains the functionality of RAID and firmware configuration
+that is available in airshipctl. This will assist to author [Baremetal Host][1]
+documents with added RAID and firmware functionality.
+
+## The Host Generator M3 Function
+
+Airshipctl has a `hostgenerator-m3` function which it uses to generate Metal3
+[Baremetal Host][1] documents. This generator uses a `hosttemplate` to
+templatize a BMH specification. It takes a set of parameters and a template as
+inputs and provides BMH documents as outputs, making it easier to generate
+a large set of BMH documents efficiently.
+
+## The Example Hardware Profile
+
+A Hardware Profile, in airshiptl terms, is a collection of parameters that
+comprise a hardware level configuration of a server. Currently, it contains
+RAID and firmware configurations. And later, this can be extended.
+
+The `example` hardware profile is one such set, which is available as a
+reference for all the supported parameters. You can modify this to your liking
+to generate hardwareprofiles that suit your environment.
+
+### Firmware Section
+
+The firmware parameters supported, in the example profile
+are as follows:
+
+``` yaml
+  firmware:
+    sriovEnabled: false
+    virtualizationDisabled: false
+    simultaneousMultithreadingDisabled: false
+```
+
+These are the default values, you can adjust to your liking
+
+### RAID Section
+
+The RAID levels supported are 0, 1 and 1+0. Some examples
+of using these levels in your configurations are given
+
+``` yaml
+  raid:
+    hardwareRAIDVolumes:
+    - name: "VirtualDisk1"
+      level: "1+0"
+      sizeGibibytes: 1024
+      numberOfPhysicalDisks: 4
+      rotational: False
+    - name: "VirtualDisk2"
+      level: "1"
+      sizeGibibytes: 500
+      numberOfPhysicalDisks: 2
+      rotational: True
+    - name: "VirtualDisk3"
+      level: "0"
+      sizeGibibytes: 500
+      numberOfPhysicalDisks: 2
+      rotational: True
+    - name: "VirtualDisk4"
+      level: "0"
+      sizeGibibytes: 250
+      numberOfPhysicalDisks: 1
+      rotataional: False
+```
+
+For additional detail on these parameters, see the [Baremetal Host][1] doc.
+
+For more details on the example hardwareprofile, see [the repo][2].
+
+[1]: https://github.com/metal3-io/baremetal-operator/blob/master/docs/api.md
+[2]: https://opendev.org/airship/airshipctl/src/branch/master/manifests/function/hardwareprofile-example
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 8d84a5cde..362d63970 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -30,6 +30,7 @@ Welcome to airshipctl's Documentation!
    plugins
    testing-guidelines
    virtual_redfish_bmc
+   hardware_profile
    Commands <cli/airshipctl>
 
 .. toctree::