Vladimir Khlyunev | cc648af | 2024-04-25 19:56:40 +0400 | [diff] [blame] | 1 | # BareMetalHostProfile resource allows you to define how the storage |
| 2 | # devices and the operating system are provisioned and configured. |
| 3 | apiVersion: metal3.io/v1alpha1 |
| 4 | metadata: |
| 5 | namespace: default |
| 6 | name: default-simple-since-2-24 |
| 7 | labels: |
| 8 | kaas.mirantis.com/defaultBMHProfile: 'true' |
| 9 | kind: BareMetalHostProfile |
| 10 | spec: |
| 11 | # List of definitions of the physical storage devices. To configure more |
| 12 | # storage devices per host, add additional devices to this list. |
| 13 | # Each section in the list allows you to define disk parameters and |
| 14 | # restrictions in the 'device' field, and a list of partitions to be |
| 15 | # created on the device in the 'paritions' field. |
| 16 | devices: |
| 17 | # Define configuration of the first device on the host. This device |
| 18 | # will be partitioned and used as a system boot device. Minimal size |
| 19 | # for this device is 60Gib. If your device is smaller, change |
| 20 | # the 'minSize' parameter in the device definition appropriately. |
| 21 | # Use of a system device smaller than 60Gib is not recommended. |
| 22 | - device: |
| 23 | # Use the appropriate name of the device in the system. '/dev/sda' |
| 24 | # typically defines the first device on a system with 2 disks. |
| 25 | #byName: /dev/sda |
| 26 | minSize: 60Gi |
| 27 | # Deprecated. 'wipe' field, if set to 'true', forces the Container Cloud |
| 28 | # bare metal provisioning system to erase the contents of the device before using it. |
| 29 | #wipe: true |
| 30 | wipeDevice: |
| 31 | eraseMetadata: |
| 32 | enabled: true |
| 33 | # eraseDevice: |
| 34 | # timeout: 3600 |
| 35 | # blkdiscard: |
| 36 | # enabled: false |
| 37 | # zeroout: "fallback" |
| 38 | # userDefined: |
| 39 | # enabled: false |
| 40 | # command: "" |
| 41 | # script: "" |
| 42 | # Do not change the names of partitions in this section. |
| 43 | # They are defined as expected by the Ubuntu operating system that |
| 44 | # will be installed. |
| 45 | partitions: |
| 46 | - name: bios_grub |
| 47 | # 4Mb boot partition is required for legacy (non-UEFI) systems. |
| 48 | size: 4Mi |
| 49 | partflags: ['bios_grub'] |
| 50 | - name: uefi |
| 51 | partflags: ['esp'] |
| 52 | size: 200Mi |
| 53 | - name: config-2 |
| 54 | # Size of this partition is limited to 64Mb. |
| 55 | size: 64Mi |
| 56 | - name: lvm_root_part |
| 57 | # The 0 size for the partition means that this partition will |
| 58 | # use all remaining space on the device. Change it only if |
| 59 | # you want to have a root file system of specific size. |
| 60 | # WARNING: only last one partition on disk could be set as "0" size. |
| 61 | size: 0 |
| 62 | # Define configuration of the second device on the host. This device |
| 63 | # will be used to store application data for management services of |
| 64 | # Container Cloud. |
| 65 | # The application data is stored in directories on this device, |
| 66 | # mounted as volumes to the application pods. |
| 67 | - device: |
| 68 | # Use the appropriate name of the device in the system. Typically, |
| 69 | # '/dev/sdb' defines the second device on a system with 3 disks. |
| 70 | #byName: /dev/sdb |
| 71 | minSize: 30Gi |
| 72 | # Deprecated. 'wipe' field, if set to 'true', forces the Container Cloud |
| 73 | # bare metal provisioning system to erase the contents of the device before using it. |
| 74 | #wipe: true |
| 75 | wipeDevice: |
| 76 | eraseMetadata: |
| 77 | enabled: true |
| 78 | # eraseDevice: |
| 79 | # timeout: 3600 |
| 80 | # blkdiscard: |
| 81 | # enabled: false |
| 82 | # zeroout: "fallback" |
| 83 | # userDefined: |
| 84 | # enabled: false |
| 85 | # command: "" |
| 86 | # script: "" |
| 87 | # This device is partitioned for use by local volume provisioner. |
| 88 | partitions: |
| 89 | - name: lvm_lvp_part |
| 90 | # The 0 size for the partition means that this partition will |
| 91 | # use all remaining space on the device. |
| 92 | # WARNING: only last one partition on disk could be set as "0" size. |
| 93 | size: 0 |
| 94 | volumeGroups: |
| 95 | - name: lvm_root |
| 96 | devices: |
| 97 | - partition: lvm_root_part |
| 98 | - name: lvm_lvp |
| 99 | devices: |
| 100 | - partition: lvm_lvp_part |
| 101 | logicalVolumes: |
| 102 | - name: root |
| 103 | vg: lvm_root |
| 104 | # If you set the size to 0, the logical volume will use all available |
| 105 | # space in its volume group. |
| 106 | # WARNING: only last one partition on disk could be set as "0" size. |
| 107 | size: 0 |
| 108 | - name: lvp |
| 109 | vg: lvm_lvp |
| 110 | # If you set the size to 0, the logical volume will use all available |
| 111 | # space in its volume group. |
| 112 | # WARNING: only last one partition on disk could be set as "0" size. |
| 113 | size: 0 |
| 114 | fileSystems: |
| 115 | - fileSystem: vfat |
| 116 | partition: config-2 |
| 117 | - fileSystem: vfat |
| 118 | partition: uefi |
| 119 | mountPoint: /boot/efi |
| 120 | - fileSystem: ext4 |
| 121 | logicalVolume: root |
| 122 | mountPoint: / |
| 123 | - fileSystem: ext4 |
| 124 | logicalVolume: lvp |
| 125 | mountPoint: /mnt/local-volumes/ |
| 126 | preDeployScript: | |
| 127 | #!/bin/bash -ex |
| 128 | echo $(date) 'pre_deploy_script done' >> /root/pre_deploy_done |
| 129 | postDeployScript: | |
| 130 | #!/bin/bash -ex |
| 131 | echo $(date) 'post_deploy_script done' >> /root/post_deploy_done |
| 132 | grubConfig: |
| 133 | defaultGrubOptions: |
| 134 | - 'GRUB_DISABLE_RECOVERY="true"' |
| 135 | - 'GRUB_PRELOAD_MODULES=lvm' |
| 136 | - 'GRUB_TIMEOUT=20' |
| 137 | # 'kernelParameters' section defines parameters of the operating system. |
| 138 | # See comments for the individual options for more information. |
| 139 | kernelParameters: |
| 140 | sysctl: |
| 141 | # Please check list of prohibited to change options: |
| 142 | # https://docs.mirantis.com/mke/3.6/install/predeployment/set-up-kernel-default-protections.html |
| 143 | # With this setting, kernel logs will be available only to the 'root' |
| 144 | # user. |
| 145 | kernel.dmesg_restrict: "1" |
| 146 | # Controls whether core dumps will append the PID to the core filename |
| 147 | # useful for debugging multi-threaded applications. |
| 148 | kernel.core_uses_pid: "1" |
| 149 | # Increase system file descriptor limit up to |
| 150 | # 9223372036854775807 (0x7fffffffffffffff) on a 64-bit system. |
| 151 | # Linux kernel documentation suggests that inode-max should be 3-4 times |
| 152 | # larger than this value. |
| 153 | fs.file-max: "9223372036854775807" |
| 154 | # The Linux kernel provides the Asynchronous non-blocking I/O (AIO) feature that allows a |
| 155 | # process to initiate multiple I/O operations simultaneously without having to wait for any of them to complete. |
| 156 | # This helps boost performance for applications that are able to overlap processing and I/O. |
| 157 | fs.aio-max-nr: "1048576" |
| 158 | # The inotify API provides a mechanism for monitoring file system events. |
| 159 | # Inotify can be used to monitor individual files, or to monitor directories. |
| 160 | # When a directory is monitored, inotify will return events for the directory itself, and for files inside the directory. |
| 161 | fs.inotify.max_user_instances: "4096" |
| 162 | # This file contains the maximum number of memory map areas a process may have. |
| 163 | # Memory map areas are used as a side-effect of calling malloc, directly by mmap and mprotect, and also when loading shared libraries. |
| 164 | # While most applications need less than a thousand maps, certain programs, |
| 165 | # particularly malloc debuggers, may consume lots of them, e.g., up to one or two maps per allocation. |
| 166 | vm.max_map_count: "262144" |
| 167 | # This option enables "Loose mode" assymetric-routing between k8s-lcm (LCM network) and bond0 (PXE network). |
| 168 | # Required only during bootstrap process, since bootstrap-seed node might not |
| 169 | # contain all required networks. (For example, when only pxe network configured on seed node) |
| 170 | # For details, see |
| 171 | # https://docs.mirantis.com/container-cloud/latest/deployment-guide/deploy-bm-mgmt.html |
| 172 | net.ipv4.conf.all.rp_filter: "2" |
| 173 | net.ipv4.conf.k8s-lcm.rp_filter: "2" |
| 174 | net.ipv4.conf.bond0.rp_filter: "2" |
| 175 | fs.inotify.max_user_watches: "81920" |
| 176 | # 'modules' field contains a list of files to be created in the |
| 177 | # '/etc/modprobe.d/' directory and the contents of the files. |
| 178 | # Use them to configure specific kernel modules on your system. |
| 179 | #modules: |
| 180 | # - filename: kvm_intel.conf |
| 181 | # content: | |
| 182 | # options kvm_intel nested=1 |