Questo contenuto non è disponibile nella lingua selezionata.
Chapter 5. 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.
5.1. Enabling auto-discovery Copia collegamentoCollegamento copiato negli appunti!
Enable and configure Bare Metal auto-discovery to automatically discover and import nodes that join your provisioning network when booting with PXE.
Procedure
Enable Bare Metal auto-discovery in the
undercloud.conffile: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 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_addressvalues 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
5.2. Testing auto-discovery Copia collegamentoCollegamento copiato negli appunti!
PXE boot a node that is connected to your provisioning network to test the Bare Metal auto-discovery feature.
Procedure
- 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
5.3. Using rules to discover different vendor hardware Copia collegamentoCollegamento copiato negli appunti!
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.
Procedure
Create a file named
dell-drac-rules.jsonwith 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.jsonCopy to Clipboard Copied! Toggle word wrap Toggle overflow