Ce contenu n'est pas disponible dans la langue sélectionnée.
Chapter 17. Automatically Discover Bare Metal Nodes
You can use auto-discovery to register overcloud nodes and generate their metadata, without first having to create an instackenv.json file. This improvement can help reduce the time spent initially collecting information about a node, for example, removing the need to collate the IPMI IP addresses and subsequently create the instackenv.json.
17.1. Requirements Copier lienLien copié sur presse-papiers!
- All overcloud nodes BMCs must be configured to be accessible to director through the IPMI.
- All overcloud nodes must be configured to PXE boot from the NIC connected to the undercloud control plane network.
17.2. Enable Auto-discovery Copier lienLien copié sur presse-papiers!
Enable Bare Metal auto-discovery in
undercloud.conf:enable_node_discovery = True discovery_default_driver = ipmi
enable_node_discovery = True discovery_default_driver = ipmiCopy to Clipboard Copied! Toggle word wrap Toggle overflow -
enable_node_discovery- When enabled, any node that boots the introspection ramdisk using PXE will be enrolled in ironic. -
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. You must replace the SampleUsername, RedactedSecurePassword, and bmc_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.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.3. Test Auto-discovery Copier lienLien copié sur presse-papiers!
- Power on the required nodes.
Run the
openstack baremetal node listcommand. You should see the new nodes listed in anenrolledstate: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 ; doneCopy 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-manageableCopy 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 ; doneCopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.4. Use 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.jsonwith the following contents:Copy to Clipboard Copied! Toggle word wrap Toggle overflow You must replace the username 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.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow