Mirantis Container Cloud (MCC) becomes part of Mirantis OpenStack for Kubernetes (MOSK)!
Starting with MOSK 25.2, the MOSK documentation set covers all product layers, including MOSK management (formerly Container Cloud). This means everything you need is in one place. Some legacy names may remain in the code and documentation and will be updated in future releases. The separate Container Cloud documentation site will be retired, so please update your bookmarks for continued easy access to the latest content.
BareMetalHost resource¶
Private API since MOSK management 2.29.0
Warning
Since MOSK management 2.29.0, use the
BareMetalHostInventory resource resource instead of BareMetalHost for adding and modifying
configuration of a bare metal server. Any change in the BareMetalHost
object will be overwitten by BareMetalHostInventory.
For any existing BareMetalHost object, a BareMetalHostInventory
object is created automatically during management cluster update to the
Cluster release 16.4.0.
This section describes the BareMetalHost resource used in
MOSK. The BareMetalHost object is being created for each
Machine and contains all information about machine hardware configuration.
BareMetalHost objects are used to monitor and manage the state of a bare
metal server. This includes inspecting the host hardware, firmware, operating
system provisioning, power control, server deprovision. When a machine is
created, the bare metal provider assigns a BareMetalHost to that machine
using labels and the BareMetalHostProfile configuration.
For demonstration purposes, the BareMetalHost custom resource (CR) is split
into the following major sections:
BareMetalHost metadata¶
The BareMetalHost CR contains the following fields:
apiVersionAPI version of the object that is
metal3.io/v1alpha1.
kindObject type that is
BareMetalHost.
metadataThe metadata field contains the following subfields:
nameName of the
BareMetalHostobject.
namespaceProject in which the
BareMetalHostobject was created.
annotationsKey-value pairs to attach additional metadata to the object:
kaas.mirantis.com/baremetalhost-credentials-nameKey that connects the
BareMetalHostobject with a previously createdBareMetalHostCredentialobject. The value of this key must match theBareMetalHostCredentialobject name.
host.dnsmasqs.metal3.io/addressAvailable since Container Cloud 2.25.0 (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/detachedAvailable since Container Cloud 2.25.0 (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, addition 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-termAvailable since Container Cloud 2.25.0 (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/DESCsuffix for sorting direction. Example terms:sizeBytes DESC,hctl ASC,type ASC,name DESC.Since Container Cloud 2.26.0 (Cluster releases 17.1.0 and 16.1.0), the following default value applies:
hctl ASC, wwn ASC, by_id ASC, name ASC.
labelsLabels used by the bare metal provider to find a matching
BareMetalHostobject to deploy a machine:hostlabel.bm.kaas.mirantis.com/controlplanehostlabel.bm.kaas.mirantis.com/workerhostlabel.bm.kaas.mirantis.com/storage
Each
BareMetalHostobject added using the MOSK management console will be assigned one of these labels. If theBareMetalHostandMachineobjects 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. Do not modify them using the 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:
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:
bmcDetails for communication with the Baseboard Management Controller (
bmc) module on a host. Contains the following subfields:addressURL 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
ADMINISTRATORtoOPERATORwith 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.1orredfish://myhost.example/redfish/v1/Systems/1.
credentialsNameName of the secret containing the
BareMetalHostobject credentials.Since Container Cloud 2.21.0 (Cluster release 11.5.0), this field is updated automatically during cluster deployment. For details, see BareMetalHostCredential resource.
Before Container Cloud 2.21.0 (Cluster release 11.4.0 or earlier), the secret requires the
usernameandpasswordkeys in the Base64 encoding.
disableCertificateVerificationBoolean to skip certificate validation when
true.
bootMACAddressMAC address for booting.
bootModeBoot mode:
UEFIif UEFI is enabled andlegacyif disabled.
onlineDefines whether the server must be online after provisioning is done. Boolean.
Warning
Setting
online: falseto more than one bare metal host in a management cluster at a time can make the cluster non-operational.
Configuration example:
metadata:
name: node-1-name
annotations:
kaas.mirantis.com/baremetalhost-credentials-name: node-1-credentials
spec:
bmc:
address: 192.168.33.106:623
credentialsName: ''
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:
errorMessageLatest error message reported by the provisioning subsystem.
goodCredentialsLatest credentials that were validated.
hardwareHardware discovered on the host. Contains information about the storage, CPU, host name, firmware, and so on.
operationalStatusStatus of the host:
OKHost is configured correctly and is manageable.
discoveredHost is only partially configured. For example, the
bmcaddress is discovered but not the login credentials.
errorHost has any sort of error.
poweredOnHost availability status: powered on (
true) or powered off (false).
provisioningState information tracked by the provisioner:
stateCurrent action being done with the host by the provisioner.
idUUID of a machine.
triedCredentialsDetails 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"