Different types of MOSK nodes require differently
configured host storage. This section describes how to create custom
host profiles for different types of MOSK nodes.
You can create custom profiles for managed clusters using Container
Cloud API.
Note
The procedure below also applies to management clusters.
You can use flexible size units throughout bare metal host profiles.
For example, you can now use either sizeGiB:0.1 or size:100Mi
when specifying a device size.
Mirantis recommends using only one parameter name type and units throughout
the configuration files. If both sizeGiB and size are used,
sizeGiB is ignored during deployment and the suffix is adjusted
accordingly. For example, 1.5Gi will be serialized as 1536Mi. The size
without units is counted in bytes. For example, size:120 means 120 bytes.
Warning
All data will be wiped during cluster deployment on devices
defined directly or indirectly in the fileSystems list of
BareMetalHostProfile. For example:
A raw device partition with a file system on it
A device partition in a volume group with a logical volume that has a
file system on it
An mdadm RAID device with a file system on it
An LVM RAID device with a file system on it
The wipe field is always considered true for these devices.
The false value is ignored.
Therefore, to prevent data loss, move the necessary data from these file
systems to another server beforehand, if required.
To create MOSK bare metal host profiles:
Select from the following options:
For a management cluster, log in to the bare metal seed node that will be
used to bootstrap the management cluster.
For a managed cluster, log in to the local machine where you management
cluster kubeconfig is located and where kubectl is installed.
Note
The management cluster kubeconfig is created automatically
during the last stage of the management cluster bootstrap.
Select from the following options:
For a management cluster, open
templates/bm/baremetalhostprofiles.yaml.template for editing.
For a managed cluster, create a new bare metal host profile for
MOSK compute nodes in a YAML file under the
templates/bm/ directory.
Edit the host profile using the example template below to meet
your hardware configuration requirements:
apiVersion:metal3.io/v1alpha1kind:BareMetalHostProfilemetadata:name:<PROFILE_NAME>namespace:<PROJECT_NAME>spec:devices:# From the HW node, obtain the first device, which size is at least 60Gib-device:workBy:"by_id,by_wwn,by_path,by_name"minSize:60Gitype:ssdwipe:truepartitions:-name:bios_grubpartflags:-bios_grubsize:4Miwipe:true-name:uefipartflags:-espsize:200Miwipe:true-name:config-2size:64Miwipe:true# This partition is only required on compute nodes if you plan to# use LVM ephemeral storage.-name:lvm_nova_partwipe:truesize:100Gi-name:lvm_root_partsize:0wipe:true# From the HW node, obtain the second device, which size is at least 60Gib# If a device exists but does not fit the size,# the BareMetalHostProfile will not be applied to the node-device:workBy:"by_id,by_wwn,by_path,by_name"minSize:60Gitype:ssdwipe:true# From the HW node, obtain the disk device with the exact name-device:workBy:"by_id,by_wwn,by_path,by_name"minSize:60Giwipe:truepartitions:-name:lvm_lvp_partsize:0wipe:true# Example of wiping a device w\o partitioning it.# Mandatory for the case when a disk is supposed to be used for Ceph backend# later-device:workBy:"by_id,by_wwn,by_path,by_name"wipe:truefileSystems:-fileSystem:vfatpartition:config-2-fileSystem:vfatmountPoint:/boot/efipartition:uefi-fileSystem:ext4logicalVolume:rootmountPoint:/-fileSystem:ext4logicalVolume:lvpmountPoint:/mnt/local-volumes/logicalVolumes:-name:rootsize:0vg:lvm_root-name:lvpsize:0vg:lvm_lvppostDeployScript:|#!/bin/bash -execho $(date) 'post_deploy_script done' >> /root/post_deploy_donepreDeployScript:|#!/bin/bash -execho $(date) 'pre_deploy_script done' >> /root/pre_deploy_donevolumeGroups:-devices:-partition:lvm_root_partname:lvm_root-devices:-partition:lvm_lvp_partname:lvm_lvpgrubConfig:defaultGrubOptions:-GRUB_DISABLE_RECOVERY="true"-GRUB_PRELOAD_MODULES=lvm-GRUB_TIMEOUT=20kernelParameters:sysctl:# For the list of options prohibited to change, refer to# https://docs.mirantis.com/mke/3.7/install/predeployment/set-up-kernel-default-protections.htmlkernel.dmesg_restrict:"1"kernel.core_uses_pid:"1"fs.file-max:"9223372036854775807"fs.aio-max-nr:"1048576"fs.inotify.max_user_instances:"4096"vm.max_map_count:"262144"
If asymmetric traffic is expected on some of the managed cluster
nodes, enable the loose mode for the corresponding interfaces on those
nodes by setting the net.ipv4.conf.<interface-name>.rp_filter
parameter to "2" in the kernelParameters.sysctl section.
For example:
Optional. Configure wiping of the target device or partition to be used
for cluster deployment as described in Wipe a device or partition.
Optional. Configure multiple devices for LVM volume using the example
template extract below for reference.
Caution
The following template extract contains only sections relevant
to LVM configuration with multiple PVs. Expand the main template
described in the previous step with the configuration below if required.
Optional. Technology Preview. Configure support of the Redundant Array of
Independent Disks (RAID) that allows, for example, installing a cluster
operating system on a RAID device, refer to Configure RAID support.
Optional. Configure the RX/TX buffer size for physical network interfaces
and txqueuelen for any network interfaces.
This configuration can greatly benefit high-load and high-performance
network interfaces. You can configure these parameters using the udev
rules. For example:
For a managed cluster, select from the following options:
Using the Container Cloud web UI
Available since MCC 2.26.0 (Cluster releases 17.1.0 and 16.1.0)
Log in to the Container Cloud web UI with the operator
permissions.
Switch to the required non-default project using the
Switch Project action icon located on top of the main left-side
navigation panel.
In the left sidebar, navigate to Baremetal and click
the Host Profiles tab.
Click Create Host Profile.
Fill out the Create host profile form:
Name
Name of the bare metal host profile.
Specification
BareMetalHostProfile object specification in the YAML format
that you have previously created. Click Edit to edit
the BareMetalHostProfile object if required.
Note
Before Container Cloud 2.28.0 (Cluster releases 17.3.0
and 16.3.0), the field name is YAML file, and you
can upload the required YAML file instead of inserting and
editing it.
Labels
Available since Container Cloud 2.28.0 (Cluster releases 17.3.0
and 16.3.0). Key-value pairs attached to BareMetalHostProfile.
Using the Container Cloud API
Add the bare metal host profile to your management cluster: