summaryrefslogtreecommitdiff
path: root/doc/source/admin/bios.rst
blob: 0aa691c2f0abfd4b7ba27b69864a39dd998a73fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
.. _bios:

==================
BIOS Configuration
==================

Overview
========

The Bare Metal service supports BIOS configuration for bare metal nodes.
It allows administrators to retrieve and apply the desired BIOS settings
via CLI or REST API. The desired BIOS settings are applied during manual
cleaning.

Prerequisites
=============

Bare metal servers must be configured by the administrator to be managed
via ironic hardware type that supports BIOS configuration.

Enabling hardware types
-----------------------

Enable a specific hardware type that supports BIOS configuration.
Refer to :doc:`/install/enabling-drivers` for how to enable a hardware type.

Enabling hardware interface
---------------------------

To enable the bios interface:

.. code-block:: ini

    [DEFAULT]
    enabled_bios_interfaces = no-bios

Append the actual bios interface name supported by the enabled hardware type
to ``enabled_bios_interfaces`` with comma separated values in ``ironic.conf``.

All available in-tree bios interfaces are listed in setup.cfg file in the
source code tree, for example:

.. code-block:: ini

    ironic.hardware.interfaces.bios =
        fake = ironic.drivers.modules.fake:FakeBIOS
        no-bios = ironic.drivers.modules.noop:NoBIOS

Retrieve BIOS settings
======================

To retrieve the cached BIOS configuration from a specified node::

    $ baremetal node bios setting list <node>

BIOS settings are cached on each node cleaning operation or when settings
have been applied successfully via BIOS cleaning steps. The return of above
command is a table of last cached BIOS settings from specified node.
If ``-f json`` is added as suffix to above command, it returns BIOS settings
as following::

    [
      {
        "setting name":
          {
            "name": "setting name",
            "value": "value"
          }
      },
      {
        "setting name":
          {
            "name": "setting name",
            "value": "value"
          }
      },
      ...
    ]

To get a specified BIOS setting for a node::

    $ baremetal node bios setting show <node> <setting-name>

If ``-f json`` is added as suffix to above command, it returns BIOS settings
as following::

    {
      "setting name":
        {
          "name": "setting name",
          "value": "value"
        }
    }

Configure BIOS settings
=======================

Two :ref:`manual_cleaning` steps are available for managing nodes'
BIOS settings:

Factory reset
-------------

This cleaning step resets all BIOS settings to factory default for a given
node::

    {
      "target":"clean",
      "clean_steps": [
        {
          "interface": "bios",
          "step": "factory_reset"
        }
      ]
    }

The ``factory_reset`` cleaning step does not require any arguments, as it
resets all BIOS settings to factory defaults.

Apply BIOS configuration
------------------------

This cleaning step applies a set of BIOS settings for a node::

    {
      "target":"clean",
      "clean_steps": [
        {
          "interface": "bios",
          "step": "apply_configuration",
          "args": {
            "settings": [
              {
                "name": "name",
                "value": "value"
              },
              {
                "name": "name",
                "value": "value"
              }
            ]
          }
        }
      ]
    }

The representation of ``apply_configuration`` cleaning step follows the same
format of :ref:`manual_cleaning`. The desired BIOS settings can be provided
via the ``settings`` argument which contains a list of BIOS options to be
applied, each BIOS option is a dictionary with ``name`` and ``value`` keys.

To check whether the desired BIOS configuration is set properly, use the
command mentioned in the `Retrieve BIOS settings`_ section.

.. note::
   When applying BIOS settings to a node, vendor-specific driver may take
   the given BIOS settings from the argument and compare them with the
   current BIOS settings on the node and only apply when there is a
   difference.