Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 20. Automatically discovering bare metal nodes
You can use auto-discovery to register overcloud nodes and generate their metadata, without the need to create an instackenv.json
file. This improvement can help to reduce the time it takes to collect information about a node. For example, if you use auto-discovery, you do not to collate the IPMI IP addresses and subsequently create the instackenv.json
.
20.1. Prerequisites Copier lienLien copié sur presse-papiers!
- You have configured all overcloud nodes BMCs to be accessible to director through the IPMI.
- You have configured all overcloud nodes to PXE boot from the NIC that is connected to the undercloud control plane network.
20.2. Enabling auto-discovery Copier lienLien copié sur presse-papiers!
Enable Bare Metal auto-discovery in the
undercloud.conf
file:enable_node_discovery = True discovery_default_driver = ipmi
enable_node_discovery = True discovery_default_driver = ipmi
Copy to Clipboard Copied! Toggle word wrap Toggle overflow -
enable_node_discovery
- When enabled, any node that boots the introspection ramdisk using PXE is enrolled in the Bare Metal service (ironic) automatically. -
discovery_default_driver
- Sets the driver to use for discovered nodes. For example,ipmi
.
-
Add your IPMI credentials to ironic:
Add your IPMI credentials to a file named
ipmi-credentials.json
. Replace theSampleUsername
,RedactedSecurePassword
, andbmc_address
values in this example to suit your environment:Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Import the IPMI credentials file into ironic:
openstack baremetal introspection rule import ipmi-credentials.json
$ openstack baremetal introspection rule import ipmi-credentials.json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
20.3. Testing auto-discovery Copier lienLien copié sur presse-papiers!
- Power on the required nodes.
Run the
openstack baremetal node list
command. You should see the new nodes listed in anenrolled
state:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set the resource class for each node:
for NODE in `openstack baremetal node list -c UUID -f value` ; do openstack baremetal node set $NODE --resource-class baremetal ; done
$ for NODE in `openstack baremetal node list -c UUID -f value` ; do openstack baremetal node set $NODE --resource-class baremetal ; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the kernel and ramdisk for each node:
for NODE in `openstack baremetal node list -c UUID -f value` ; do openstack baremetal node manage $NODE ; done $ openstack overcloud node configure --all-manageable
$ for NODE in `openstack baremetal node list -c UUID -f value` ; do openstack baremetal node manage $NODE ; done $ openstack overcloud node configure --all-manageable
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Set all nodes to available:
for NODE in `openstack baremetal node list -c UUID -f value` ; do openstack baremetal node provide $NODE ; done
$ for NODE in `openstack baremetal node list -c UUID -f value` ; do openstack baremetal node provide $NODE ; done
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
20.4. Using rules to discover different vendor hardware Copier lienLien copié sur presse-papiers!
If you have a heterogeneous hardware environment, you can use introspection rules to assign credentials and remote management credentials. For example, you might want a separate discovery rule to handle your Dell nodes that use DRAC:
Create a file named
dell-drac-rules.json
with the following contents:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Replace the user name and password values in this example to suit your environment:
Import the rule into ironic:
openstack baremetal introspection rule import dell-drac-rules.json
$ openstack baremetal introspection rule import dell-drac-rules.json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow