BareMetalHost¶
This section describes the BareMetalHost
resource used in the
Mirantis Container Cloud API. BareMetalHost
object
is being created for each Machine
and contains all information about
machine hardware configuration. It is needed for further selecting which
machine to choose for the deploy. When machine is created
the provider assigns a BareMetalHost
to that machine based on
labels and BareMetalHostProfile
configuration.
For demonstration purposes, the Container Cloud BareMetalHost
custom resource (CR) can be split into the following major sections:
BareMetalHost metadata¶
The Container Cloud BareMetalHost
CR contains the following fields:
apiVersion
API version of the object that is
metal3.io/v1alpha1
.
kind
Object type that is
BareMetalHost
.
metadata
The metadata field contains the following subfields:
name
Name of the
BareMetalHost
object.
namespace
Project in which the
BareMetalHost
object was created.
annotations
Available since Cluster releases 12.5.0, 11.5.0, and 7.11.0. Key-value pairs to attach additional metadata to the object:
kaas.mirantis.com/baremetalhost-credentials-name
Key that connects the
BareMetalHost
object with a previously createdBareMetalHostCredential
object. The value of this key must match theBareMetalHostCredential
object name.
host.dnsmasqs.metal3.io/address
Available since Cluster releases 17.0.0 and 16.0.0. Key that assigns a particular IP address to a bare metal host during PXE provisioning.
baremetalhost.metal3.io/detached
Available since Cluster releases 17.0.0 and 16.0.0. Key that pauses host management by the bare metal Operator for a manual IP address assignment.
Note
If the host provisioning has already started or completed, adding of this annotation deletes the information about the host from Ironic without triggering deprovisioning. The bare metal Operator recreates the host in Ironic once you remove the annotation. For details, see Metal3 documentation.
inspect.metal3.io/hardwaredetails-storage-sort-term
Available since Cluster releases 17.0.0 and 16.0.0. Optional. Key that defines sorting of the
bmh:status:storage[]
list during inspection of a bare metal host. Accepts multiple tags separated by a comma or semi-column with theASC/DESC
suffix for sorting direction. Example terms:sizeBytes DESC
,hctl ASC
,type ASC
,name DESC
.Since Cluster releases 17.1.0 and 16.1.0, the following default value applies:
hctl ASC, wwn ASC, by_id ASC, name ASC
.
labels
Labels used by the bare metal provider to find a matching
BareMetalHost
object to deploy a machine:hostlabel.bm.kaas.mirantis.com/controlplane
hostlabel.bm.kaas.mirantis.com/worker
hostlabel.bm.kaas.mirantis.com/storage
Each
BareMetalHost
object added using the Container Cloud web UI will be assigned one of these labels. If theBareMetalHost
andMachine
objects are created using API, any label may be used to match these objects for a bare metal host to deploy a machine.
Warning
Labels and annotations that are not documented in this API Reference are generated automatically by Container Cloud. Do not modify them using the Container Cloud API.
Configuration example:
apiVersion: metal3.io/v1alpha1
kind: BareMetalHost
metadata:
name: master-0
namespace: default
labels:
kaas.mirantis.com/baremetalhost-id: hw-master-0
kaas.mirantis.com/baremetalhost-id: <bareMetalHostHardwareNodeUniqueId>
annotations: # Since 2.21.0 (7.11.0, 12.5.0, 11.5.0)
kaas.mirantis.com/baremetalhost-credentials-name: hw-master-0-credentials
BareMetalHost configuration¶
The spec
section for the BareMetalHost
object defines the desired state
of BareMetalHost
. It contains the following fields:
bmc
Details for communication with the Baseboard Management Controller (
bmc
) module on a host. Contains the following subfields:address
URL for communicating with the BMC. URLs vary depending on the communication protocol and the BMC type, for example:
- IPMI
Default BMC type in the
ipmi://<host>:<port>
format. You can also use a plain<host>:<port>
format. A port is optional if using the default port 623.You can change the IPMI privilege level from the default
ADMINISTRATOR
toOPERATOR
with an optional URL parameterprivilegelevel
:ipmi://<host>:<port>?privilegelevel=OPERATOR
.
- Redfish
BMC type in the
redfish://
format. To disable TLS, you can use theredfish+http://
format. A host name or IP address and a path to the system ID are required for both formats. For example,redfish://myhost.example/redfish/v1/Systems/System.Embedded.1
orredfish://myhost.example/redfish/v1/Systems/1
.
credentialsName
Name of the secret containing the
BareMetalHost
object credentials.Since Container Cloud 2.21.0 and 2.21.1 for MOSK 22.5, this field is updated automatically during cluster deployment. For details, see BareMetalHostCredential.
Before Container Cloud 2.21.0 or MOSK 22.5, the secret requires the
username
andpassword
keys in the Base64 encoding.
disableCertificateVerification
Boolean to skip certificate validation when
true
.
bootMACAddress
MAC address for booting.
bootMode
Boot mode:
UEFI
if UEFI is enabled andlegacy
if disabled.
online
Defines whether the server must be online after provisioning is done.
Warning
Setting
online: false
to more than one bare metal host in a management cluster at a time can make the cluster non-operational.
Configuration example for Container Cloud 2.21.0 or later:
metadata:
name: node-1-name
annotations:
kaas.mirantis.com/baremetalhost-credentials-name: node-1-credentials # Since Container Cloud 2.21.0
spec:
bmc:
address: 192.168.33.106:623
credentialsName: ''
bootMACAddress: 0c:c4:7a:a8:d3:44
bootMode: legacy
online: true
Configuration example for Container Cloud 2.20.1 or earlier:
metadata:
name: node-1-name
spec:
bmc:
address: 192.168.33.106:623
credentialsName: node-1-credentials-secret-f9g7d9f8h79
bootMACAddress: 0c:c4:7a:a8:d3:44
bootMode: legacy
online: true
BareMetalHost status¶
The status
field of the BareMetalHost
object defines the current
state of BareMetalHost
. It contains the following fields:
errorMessage
Last error message reported by the provisioning subsystem.
goodCredentials
Last credentials that were validated.
hardware
Hardware discovered on the host. Contains information about the storage, CPU, host name, firmware, and so on.
operationalStatus
Status of the host:
OK
Host is configured correctly and is manageable.
discovered
Host is only partially configured. For example, the
bmc
address is discovered but not the login credentials.
error
Host has any sort of error.
poweredOn
Host availability status: powered on (
true
) or powered off (false
).
provisioning
State information tracked by the provisioner:
state
Current action being done with the host by the provisioner.
id
UUID of a machine.
triedCredentials
Details of the last credentials sent to the provisioning backend.
Configuration example:
status:
errorMessage: ""
goodCredentials:
credentials:
name: master-0-bmc-secret
namespace: default
credentialsVersion: "13404"
hardware:
cpu:
arch: x86_64
clockMegahertz: 3000
count: 32
flags:
- 3dnowprefetch
- abm
...
model: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
firmware:
bios:
date: ""
vendor: ""
version: ""
hostname: ipa-fcab7472-892f-473c-85a4-35d64e96c78f
nics:
- ip: ""
mac: 0c:c4:7a:a8:d3:45
model: 0x8086 0x1521
name: enp8s0f1
pxe: false
speedGbps: 0
vlanId: 0
...
ramMebibytes: 262144
storage:
- by_path: /dev/disk/by-path/pci-0000:00:1f.2-ata-1
hctl: "4:0:0:0"
model: Micron_5200_MTFD
name: /dev/sda
rotational: false
serialNumber: 18381E8DC148
sizeBytes: 1920383410176
vendor: ATA
wwn: "0x500a07511e8dc148"
wwnWithExtension: "0x500a07511e8dc148"
...
systemVendor:
manufacturer: Supermicro
productName: SYS-6018R-TDW (To be filled by O.E.M.)
serialNumber: E16865116300188
operationalStatus: OK
poweredOn: true
provisioning:
state: provisioned
triedCredentials:
credentials:
name: master-0-bmc-secret
namespace: default
credentialsVersion: "13404"