Rate This Document
Findability
Accuracy
Completeness
Readability

Creating the Bare Metal Instance Management Node

Perform the following operations on the controller node.

  1. Configure the Ironic API version.

    In Ironic API 1.11 and later versions, a new state is added to the provision_state state machine of the bare metal instance management node, and new features are added. Currently, Ironic API 1.9 is used by default, and a later version is recommended.

    You can configure the API version by setting environment variables.

    1
    2
    export IRONIC_API_VERSION=1.11
    export OS_BAREMETAL_API_VERSION=1.11
    

    You can also use --os-baremetal-api-version in the command to specify the API version. For example:

    1
    openstack baremetal --os-baremetal-api-version 1.11 node list
    
  2. Create the bare metal instance management node.

    When creating the bare metal instance management node, you must specify the management driver described in section Checking the Bare Metal Instance Management Drivers using the --driver field.

    1
    openstack baremetal node create --driver ipmi --name {BM_NAME}
    

    • You can use the UUID to specify the bare metal instance management node. If you have specified the logical name of the bare metal instance management node using the --name field, you can use the bare metal instance name to specify the node.
    • {BM_NAME} is the bare metal instance name of the bare metal instance management node. The name must be unique and does not support special characters. In this section, BM_TEST is used as an example.
  3. Check information about the bare metal instance management node.
    1
    openstack baremetal node show ${BM_UUID} 
    

    Or:

    1
    openstack baremetal node show ${BM_NAME}
    

    In this case, the value of provision_state for the management node is enroll.

  4. Configure the hardware interface information of the management node.

    In API 1.31 and later versions, you can configure hardware interface information for the bare metal instance management node. Section 2 describes the configurable options and their default values.

    1
    openstack baremetal --os-baremetal-api-version 1.31 node set ${BM_NAME} --deploy-interface iscsi  --raid-interface no-raid
    

    After the configuration is complete, you can run the following command to check the configuration:

    1
    openstack baremetal --os-baremetal-api-version 1.31 node show ${BM_NAME} --fields deploy_interface raid_interface
    

    In API 1.31, you can use --fields to specify the properties to be viewed.

  5. Configure the properties of the management driver.
    1. Use the driver_info field to set the properties required for managing the driver, including the BMC information, so that the BMS can manage the node.
      1
      openstack baremetal  node set ${BM_NAME} --driver-info ipmi_username=${USER_NAME} --driver-info ipmi_password=${PASSWORD} --driver-info ipmi_address=${ADDRESS} --driver-info ipmi_port=${PORT}
      

      USER_NAME, PASSWORD, ADDRESS, and PORT indicate the user name, password, IP address, and port number for accessing the BMC. If ipmi_port is not set, the default value 623 is used.

    2. After the configuration, view the properties of the management driver.
      1
      openstack baremetal node show {BM_NAME}
      

    3. You can use the ipmitool tool to check whether the configuration is correct and whether the network environment is normal.
      1
      ipmitool -I lanplus -H ${ADDRESS} -U ${USER_NAME} -P ${PASSWORD} -p ${PORT} power status
      

    4. You can view the startup item information of the bare metal instance to be deployed to check whether the configuration is successful.
      1
      openstack baremetal node boot device show ${BM_NAME}
      

  6. Deploy an image on the management node.
    1. Specify the deployment image kernel and deployment image temporary file system ramdisk that are compatible with the management driver.
      1
      openstack baremetal node set ${BM_NAME} --driver-info deploy_kernel=${deploy_kernel_uuid} --driver-info deploy_ramdisk=${deploy_ramdisk_uuid}
      

      The deployment image is the image described from 3 to 6 in section Creating User Images and Uploading Them to the Image Service. You can run the openstack image list command to obtain the image UUIDs. The architecture of the deployment image must match the actual physical server.

    2. After the configuration, run the following command to view the driver information of the BMS node:
      1
      openstack baremetal --os-baremetal-api-version 1.31 node show ${BM_NAME} --fields driver_info
      

  7. Configure the management node network information.
    1. If the management node uses the Neutron network interface, you need to specify provisioning_network and cleaning_network. If the management node uses the flat network interface, you only need to specify cleaning_network. The provisioning network can be the same as or different from the cleaning network. Configure the network information as required.
      1
      openstack baremetal node set ${BM_NAME} --driver-info cleaning_network=${cleaning_network_uuid} --driver-info provisioning_network=${provisioning_network_uuid}
      

      The network used here is the network created in section Creating a Provisioning Network. The values of cleaning_network and provisioning_network can be the same. You can run the openstack network list command to obtain the network UUIDs.

    2. After the configuration, run the following command to view the driver information of the BMS node:
      1
      openstack baremetal --os-baremetal-api-version 1.31 node show ${BM_NAME} --fields driver_info
      

  8. Configure the boot mode of the management node.
    1
    openstack baremetal node set ${BM_NAME} --property capabilities='boot_mode:uefi'
    
    • Kunpeng servers support only the UEFI boot mode.
    • If you use the CentOS-7-x86_64-GenericCloud-2003 image to deploy the x86_64 server, change the BIOS boot mode parameter in the command to boot_mode:bios.
  9. Configure the management port.
    1. Create a port based on the MAC address of the bare metal instance server network port. The BMS will transmit the MAC address to the network service for network configuration. Ensure that PXE has been enabled on a network port of the bare metal instance server and a port has been created based on the MAC address of the network port.
      1
      openstack baremetal --os-baremetal-api-version 1.31 port create ${MAC_ADDRESS} --node ${BM_UUID} --pxe-enabled true
      

      You should enable the PXE function of the NIC in the BIOS of the bare metal instance server. The MAC address of the network port can be obtained through the BMC.

    2. You can run the following command to view the port list:
      1
      openstack baremetal port list
      

    3. You can also run the following command to query the detailed information about the port.
      1
      openstack baremetal port show ${port_uuid}
      

    4. Run the following command to check the pxe_enabled status of the port.
      1
      openstack baremetal --os-baremetal-api-version 1.31 port list --fields address pxe_enabled node_uuid
      

      For each bare metal instance management node, there must be a port whose pxe_enabled status is True.

      If pxe_enabled of the port is False, run the command to enable PXE.

      1
      openstack baremetal port set {port_uuid} --pxe-enabled