github.com/openshift/installer@v1.4.17/docs/user/metal/install_ipi.md (about) 1 # Bare Metal IPI (Installer Provisioned Infrastructure) Overview 2 3 This document discusses the installer support for an IPI (Installer Provisioned 4 Infrastructure) install for bare metal hosts. This includes platform support 5 for the management of bare metal hosts, as well as some automation of DNS and 6 load balancing to bring up the cluster. 7 8 The upstream project that provides Kubernetes-native management of bare metal 9 hosts is [metal3.io](http://metal3.io). 10 11 For UPI (User Provisioned Infrastructure) based instructions for bare metal 12 deployments, see [install_upi.md](install_upi.md). 13 14 ## Prerequisites 15 16 ### Network Requirements 17 18 You have the choice of a single or dual NIC setup, depending on whether 19 you would like to use PXE/DHCP-based provisioning or not. Please note 20 that disabling the provisioning network means that host BMC's must be 21 accessible over the external network which may not be desirable. 22 23 * **NIC #1 - External Network** 24 * This network is the main network used by the cluster, including API traffic 25 and application traffic. 26 * ***DHCP*** 27 * External DHCP is assumed on this network. Hosts *must* have stable 28 IP addresses, therefore you should set up DHCP reservations for 29 each of the hosts in the cluster. The addresses assigned by DHCP 30 need to be in the same subnet as the Virtual IPs discussed below. 31 * A pool of dynamic addresses should also be available on this network, as 32 the provisioning host and temporary bootstrap VM will also need addresses 33 on this network. 34 * ***NTP*** 35 * A time source must be accessible from this network. 36 * ***Reserved VIPs (Virtual IPs)*** - 2 IP addresses must be reserved on this 37 network for use by the cluster. These Virtual IPs are managed using VRRP 38 (v2 for IPv4 and v3 for IPv6). Specifically, these IPs will serve the 39 following purposes: 40 * API - This IP will be used to reach the cluster API. 41 * Ingress - This IP will be used by cluster ingress traffic 42 internal DNS requirements. 43 * ***External DNS*** - While the cluster automates the internal DNS 44 requirements, two external DNS records must be created in whatever DNS 45 server is appropriate for this environment. 46 * `api.<cluster-name>.<base-domain>` - pointing to the API VIP 47 * `*.apps.<cluster-name>.<base-domain>` - pointing to the Ingress VIP 48 49 * **NIC #2 - Provisioning Network (optional) ** 50 * A private network used for PXE based provisioning. 51 * You can specify `provisioningNetworkInterface` to indicate which 52 interface is connected to this network on the control plane nodes. 53 If not specified the interface is derived from the bootMacAddress. 54 If set, all the control plane nodes must have this interface. 55 * The provisioning network may be "Managed" (default), "Unmanaged," or 56 "Disabled." 57 * In managed mode, DHCP and TFTP are configured to run in the cluster. In 58 unmanaged mode, TFTP is still available but you must configure DHCP 59 externally. 60 * Addressing for this network defaults to `172.22.0.0/24`, but is 61 configurable by setting the `provisioningNetworkCIDR` option. 62 * Two IP's are required to be available for use, one for the bootstrap 63 host, and one as a provisioning IP in the running cluster. By 64 default, these are the 2nd and 3rd addresses in the 65 `provisioningNetworkCIDR` (e.g. 172.22.0.2, and 172.22.0.3). 66 * To specify the name of the provisioning network interface, 67 set the `provisioningNetworkInterface` option. This is the network interface 68 on a master that is connected to the provisioning network. 69 70 * **Out-of-band Management Network** 71 * Servers will typically have an additional NIC used by the onboard 72 management controllers (BMCs). These BMCs must be accessible and routed to 73 the host. 74 75 When the Virtual IPs are managed using multicast (VRRPv2 or VRRPv3), there is a 76 limitation for 255 unique virtual routers per multicast domain. In case you 77 have pre-existing virtual routers using the standard IPv4 or IPv6 multicast 78 groups, you can learn the VIPs the installation will choose by running the 79 following command: 80 81 $ podman run quay.io/openshift/origin-baremetal-runtimecfg:TAG vr-ids cnf10 82 APIVirtualRouterID: 147 83 DNSVirtualRouterID: 158 84 IngressVirtualRouterID: 2 85 86 Where `TAG` is the release you are going to install, e.g., 4.5. Let's see another example: 87 88 $ podman run quay.io/openshift/origin-baremetal-runtimecfg:TAG vr-ids cnf11 89 APIVirtualRouterID: 228 90 DNSVirtualRouterID: 239 91 IngressVirtualRouterID: 147 92 93 In the example output above you can see that installing two clusters in the 94 same multicast domain with names `cnf10` and `cnf11` would lead to a conflict. 95 You should also take care that none of those are taken by other independent 96 VRRP virtual routers running in the same broadcast domain. 97 98 ### Provisioning Host 99 100 The installer must be run from a host that is attached to the same networks as 101 the cluster, as described in the previous section. We refer to this host as 102 the *provisioning host*. The easiest way to provide a provisioning host is to 103 use one of the hosts that is intended to later become a worker node in the same 104 cluster. That way it is already connected to the proper networks. 105 106 It is recommended that the provisioning host be a bare metal host, as it must be 107 able to use libvirt to launch the OpenShift bootstrap VM locally. Additionally, 108 the installer creates a directory backed libvirt storage pool in the 109 `/var/lib/libvirt/openshift-images` directory. Sufficient disk space must be 110 available in the directory to host the bootstrap VM volume. 111 112 ### Supported Hardware 113 114 The architecture is intended to support a wide variety of hardware. This was 115 one of the reasons Ironic is used as an underlying technology. However, so far 116 development and testing has focused on PXE based provisioning using IPMI for 117 out-of-band management of hosts. Other provisioning approaches will be added, 118 tested, and documented over time. 119 120 ## Installation Process 121 122 Once an environment has been prepared according to the documented 123 pre-requisites, the install process is the same as other IPI based platforms. 124 125 `openshift-install create cluster` 126 127 Note for baremetal the installer must be built with both `libvirt` and 128 `baremetal` tags - in releases such a binary is included, 129 named `openshift-baremetal-install` 130 131 The installer supports interactive mode, but it is recommended to prepare an 132 `install-config.yaml` file in advance, containing all of the details of the 133 bare metal hosts to be provisioned. 134 135 ### Install Config 136 137 The `install-config.yaml` file requires some additional details. Most of the 138 information is teaching the installer and the resulting cluster enough about 139 the available hardware so that it is able to fully manage it. There are 140 [additional customizations](customization_ipi.md) possible. 141 142 Here is an example `install-config.yaml` with the required `baremetal` platform 143 details. 144 145 ```yaml 146 apiVersion: v1 147 baseDomain: test.metalkube.org 148 metadata: 149 name: ostest 150 networking: 151 machineNetwork: 152 - cidr: 192.168.111.0/24 153 compute: 154 - name: worker 155 replicas: 1 156 controlPlane: 157 name: master 158 replicas: 3 159 platform: 160 baremetal: {} 161 platform: 162 baremetal: 163 apiVIP: 192.168.111.5 164 ingressVIP: 192.168.111.4 165 hosts: 166 - name: openshift-master-0 167 role: master 168 bmc: 169 address: ipmi://192.168.111.1:6230 170 username: admin 171 password: password 172 bootMACAddress: 00:11:07:4e:f6:68 173 rootDeviceHints: 174 minSizeGigabytes: 20 175 bootMode: legacy 176 - name: openshift-master-1 177 role: master 178 bmc: 179 address: ipmi://192.168.111.1:6231 180 username: admin 181 password: password 182 bootMACAddress: 00:11:07:4e:f6:6c 183 rootDeviceHints: 184 minSizeGigabytes: 20 185 bootMode: UEFI 186 - name: openshift-master-2 187 role: master 188 bmc: 189 address: ipmi://192.168.111.1:6232 190 username: admin 191 password: password 192 bootMACAddress: 00:11:07:4e:f6:70 193 rootDeviceHints: 194 minSizeGigabytes: 20 195 - name: openshift-worker-0 196 role: worker 197 bmc: 198 address: ipmi://192.168.111.1:6233 199 username: admin 200 password: password 201 bootMACAddress: 00:11:07:4e:f6:71 202 rootDeviceHints: 203 minSizeGigabytes: 20 204 pullSecret: ... 205 sshKey: ... 206 ``` 207 208 #### Required Inputs 209 210 | Parameter | Default | Description | 211 | --- | --- | --- | 212 `hosts` | | Details about bare metal hosts to use to build the cluster. See below for more details. | 213 `defaultMachinePlatform` | | The default configuration used for machine pools without a platform configuration. | 214 `apiVIP` | `api.<clusterdomain>` | The VIP to use for internal API communication. | 215 `ingressVIP` | `test.apps.<clusterdomain>` | The VIP to use for ingress traffic. | 216 217 ##### VIP Settings 218 219 The `apiVIP` and `ingressVIP` settings must either be provided or 220 pre-configured in DNS so that the default names resolve correctly (see 221 the defaults in the table above). 222 223 ##### Describing Hosts 224 225 The `hosts` parameter is a list of separate bare metal assets that 226 should be used to build the cluster. The number of assets must be at least greater or equal to the sum of the configured `ControlPlane` and `compute` `Replicas`. 227 228 | Name | Default | Description | 229 | --- | --- | --- | 230 | `name` | | The name of the `BareMetalHost` resource to associate with the details. It must be unique. | 231 | `role` | | Either `master` or `worker`. | 232 | `bmc` | | Connection details for the baseboard management controller. See below for details. | 233 | `bootMACAddress` | | The MAC address of the NIC the host will use to boot on the provisioning network. It must be unique. | 234 | `rootDeviceHints` | | How to choose the target disk for the OS during provisioning - for more details see [upstream docs](https://github.com/metal3-io/baremetal-operator/blob/master/docs/api.md). | 235 | `bootMode` | `UEFI` | Choose `legacy` (BIOS) or `UEFI` mode for booting. Use `UEFISecureBoot` to enable UEFI and secure boot on the server. Only some drivers support UEFI secure boot (notably, IPMI does not). | 236 | `networkConfig` | | Yaml block describing the desired host networking settings. Must be compatible with NMState (for more details see https://nmstate.io/) | 237 238 The `bmc` parameter for each host is a set of values for accessing the 239 baseboard management controller in the host. 240 241 | Name | Default | Description | 242 | --- | --- | --- | 243 | `username` | | The username for authenticating to the BMC | 244 | `password` | | The password associated with `username`. | 245 | `address` | | The URL for communicating with the BMC controller, based on the provider being used. See [BMC Addressing](#bmc-addressing) for details. It must be unique. | 246 247 ##### BMC Addressing 248 249 The `address` field for each `bmc` entry is a URL with details for 250 connecting to the controller, including the type of controller in the 251 URL scheme and its location on the network. 252 253 IPMI hosts use `ipmi://<host>:<port>`. An unadorned `<host>:<port>` is 254 also accepted. If the port is omitted, the default of 623 is used. 255 256 Dell iDRAC hosts use `idrac://` (or `idrac+http://` to disable TLS). 257 258 Fujitsu iRMC hosts use `irmc://<host>:<port>`, where `<port>` is 259 optional if using the default. 260 261 For Redfish, use `redfish://` (or `redfish+http://` to disable 262 TLS). The hostname (or IP address) and the path to the system ID are 263 both required. For example 264 `redfish://myhost.example/redfish/v1/Systems/System.Embedded.1` or 265 `redfish://myhost.example/redfish/v1/Systems/1` 266 267 To use virtual media instead of PXE for attaching the provisioning 268 image to the host, use `redfish-virtualmedia://` or `idrac-virtualmedia://` 269 270 Please note that when the provisioning network is disabled, the only 271 supported BMC's are virtual media. 272 273 ## Known Issues 274 275 ### `destroy cluster` support 276 277 `openshift-install destroy cluster` is not supported for the `baremetal` 278 platform. 279 280 https://github.com/openshift/installer/issues/2005 281 282 ## Troubleshooting 283 284 General troubleshooting for OpenShift installations can be found 285 [here](/docs/user/troubleshooting.md). 286 287 ### Bootstrap 288 289 The bootstrap VM by default runs on the same host as the installer. This 290 bootstrap VM runs the Ironic services needed to provision the control 291 plane. Ironic being available is dependent on having successfully 292 downloaded the machine OS and Ironic agent images. In some cases, this 293 may fail, and the installer will report a timeout waiting for the Ironic 294 API. 295 296 To login to the bootstrap VM, you will need to ssh to the VM using the 297 `core` user, and the SSH key defined in your install config. 298 299 The VM obtains an IP address from your DHCP server on the external 300 network. When using a development environment with 301 [dev-scripts](https://github.com/openshift-metal3/dev-scripts), it uses 302 the `baremetal` libvirt network unless an override is specified. The IP 303 can be retrieved with `virsh net-dhcp-leases baremetal`. If the install 304 is far enough along to have brought up the provisioning network, you may 305 use the provisioning bootstrap IP which defaults to 172.22.0.2. 306 307 Viewing the virtual machine's console with virt-manager may also be 308 helpful. 309 310 You can view the Ironic logs by sshing to the bootstrap VM, and 311 examining the logs of the `ironic` service, `journalctl -u ironic`. You 312 may also view the logs of the individual containers: 313 314 - `podman logs coreos-downloader` 315 - `podman logs dnsmasq` 316 - `podman logs image-customization` 317 - `podman logs ironic` 318 - `podman logs ironic-ramdisk-logs` 319 - `podman logs httpd` 320 321 322 ### Control Plane 323 324 Once Ironic is available, the installer will provision the three control 325 plane hosts. For early failures, it may be useful to look at the console 326 (using virt-manager if emulating baremetal with vbmc, or through the BMC 327 like iDRAC) and see if there are any errors reported. 328 329 Additionally, if the cluster comes up enough that the bootstrap is destroyed, 330 but commands like `oc get clusteroperators` shows degraded operators, it 331 may be useful to examine the logs of the pods within the 332 `openshift-kni-infra` namespace. 333 334 ### Ironic 335 336 You may want to examine Ironic itself and look at the state of the 337 hosts. On the bootstrap VM there is a `/opt/metal3/auth/clouds.yaml` 338 file which may be used with the Ironic `baremetal` client. 339 340 To interact with Ironic running on the cluster, it will be necessary 341 to create a similar `clouds.yaml` using the content from the metal3-ironic 342 secrets in the openshift-machine-api namespace, and the hostIP of the 343 controlplane host running the metal3 pod.