Chapter 3. Deploying an IPv4 overcloud with the Bare Metal Provisioning service

Note

If you use OVN, the Bare Metal Provisioning service (ironic) is supported only with the neutron DHCP agent from the ironic-overcloud.yaml file. The built-in DHCP server on OVN presently cannot provision baremetal nodes or serve DHCP for the provisioning networks. Chainbooting iPXE requires tagging (--dhcp-match in dnsmasq), which is not supported in the OVN DHCP server.

The following procedures include the deployment steps that are specific to the Bare Metal Provisioning service (ironic). For more information about overcloud deployment with director, see the Director Installation and Usage guide.

Prerequisites

3.1. Creating the bare metal template

Use an environment file to deploy the overcloud with the Bare Metal Provisioning service enabled. You can use the example template that is located on the director node at /usr/share/openstack-tripleo-heat-templates/environments/services/ironic-overcloud.yaml.

Prerequisites

Completing the template

You can specify additional configuration either in the provided template or in an additional yaml file, for example ~/templates/ironic.yaml.

  • For a hybrid deployment with both bare metal and virtual instances, you must add AggregateInstanceExtraSpecsFilter to the list of NovaSchedulerDefaultFilters. If you have not set NovaSchedulerDefaultFilters anywhere, you can do so in ironic.yaml. For an example, see Example template.

    Note

    If you are using SR-IOV, NovaSchedulerDefaultFilters is already set in tripleo-heat-templates/environments/neutron-sriov.yaml. Append AggregateInstanceExtraSpecsFilter to this list.

  • The type of cleaning that occurs before and between deployments is set by IronicCleaningDiskErase. By default, this is set to full by deployment/ironic/ironic-conductor-container-puppet.yaml. You can set this to metadata to substantially speed up the process, because it cleans only the partition table. However, because the deployment is less secure in a multi-tenant environment, complete this action only in a trusted tenant environment.
  • You can add drivers with the IronicEnabledDrivers parameter. By default, ipmi, idrac and ilo are enabled.

For a full list of configuration parameters, see Bare Metal in the Overcloud Parameters guide.

3.1.1. Example template

The following is an example template file. This file might not meet the requirements of your environment. Before you use this example, ensure that it does not interfere with any existing configuration in your environment. This example contains the following configuration:

  • The AggregateInstanceExtraSpecsFilter allows both virtual and bare metal instances, for a hybrid deployment.
  • Disk cleaning that is performed before and between deployments erases only the partition table (metadata).

~/templates/ironic.yaml

parameter_defaults:

    NovaSchedulerDefaultFilters:
        - AggregateInstanceExtraSpecsFilter
        - AvailabilityZoneFilter
        - ComputeFilter
        - ComputeCapabilitiesFilter
        - ImagePropertiesFilter

    IronicCleaningDiskErase: metadata

3.2. Network configuration

If you use the default flat bare metal network, you must create a bridge br-baremetal for the Bare Metal Provisioning service (ironic) to use. You can specify this bridge in an additional template:

~/templates/network-environment.yaml

parameter_defaults:
  NeutronBridgeMappings: datacentre:br-ex,baremetal:br-baremetal
  NeutronFlatNetworks: datacentre,baremetal

You can configure this bridge either in the provisioning network (control plane) of the controllers, so that you can reuse this network as the bare metal network, or add a dedicated network. The configuration requirements are the same, however the bare metal network cannot be VLAN-tagged, as it is used for provisioning.

~/templates/nic-configs/controller.yaml

network_config:
    -
      type: ovs_bridge
          name: br-baremetal
          use_dhcp: false
          members:
            -
              type: interface
              name: eth1
Note

The Bare Metal Provisioning service in the overcloud is designed for a trusted tenant environment because the bare metal nodes have direct access to the control plane network of your Red Hat OpenStack Platform (RHOSP) installation.

3.2.1. Configuring a custom IPv4 provisioning network

The default flat provisioning network can introduce security concerns in a customer environment because a tenant can interfere with the undercloud network. To prevent this risk, you can configure a custom composable bare metal provisioning network for ironic services that does not have access to the control plane.

Prerequisites

Procedure

  1. Configure the shell to access the Identity service (keystone) as the administrative user:

    $ source ~/stackrc
  2. Copy the network_data.yaml file:

    (undercloud) [stack@host01 ~]$ cp /usr/share/openstack-tripleo-heat-templates/network_data.yaml .
  3. Edit the new network_data.yaml file and add a new network for IPv4 overcloud provisioning:

    # custom network for overcloud provisioning
    - name: OcProvisioning
    name_lower: oc_provisioning
    vip: true
    vlan: 205
    ip_subnet: '172.23.3.0/24'
    allocation_pools: [{'start': '172.23.3.10', 'end': '172.23.3.200'}]
  4. Update the network_environments.yaml and nic-configs/controller.yaml files to use the new network.

    1. In the network_environments.yaml file, remap Ironic networks:

      ServiceNetMap:
         IronicApiNetwork: oc_provisioning
         IronicNetwork: oc_provisioning
    2. In the nic-configs/controller.yaml file, add an interface and the necessary parameters:

      $network_config:
           - type: vlan
               vlan_id:
                 get_param: OcProvisioningNetworkVlanID
               addresses:
               - ip_netmask:
                   get_param: OcProvisioningIpSubnet
  5. Copy the roles_data.yaml file:

    (undercloud) [stack@host01 ~]$ cp /usr/share/openstack-tripleo-heat-templates/roles_data.yaml .
  6. Edit the new roles_data.yaml and add the new network for the controller:

      networks:
       ...
        OcProvisioning:
          subnet: oc_provisioning_subnet
  7. Include the new network_data.yaml and roles_data.yaml files in the deploy command:

    -n /home/stack/network_data.yaml \
    -r /home/stack/roles_data.yaml \

3.3. Enabling bare metal introspection in the overcloud

To enable bare metal introspection, include both of the following files in the deployment command:

For deployments that use OVN
  • ironic-overcloud.yaml
  • ironic-inspector.yaml
Note

Spine-leaf routed deployments might require a DHCP relay on ToR router, or a DHCP agent for each subnet. The metadata service must have a static route to the metadata server. OVN does not provide this route on bare metal nodes by default.

For deployments that use OVS
  • ironic.yaml
  • ironic-inspector.yaml

You can find these files in the /usr/share/openstack-tripleo-heat-templates/environments/services directory. Use the following example to include configuration details for the ironic inspector that correspond to your environment:

parameter_defaults:
  IronicInspectorSubnets:
    - ip_range: <ip_range>
  IPAImageURLs: '["http://<ip_address>:<port>/agent.kernel", "http://<ip_address>:<port>/agent.ramdisk"]'
  IronicInspectorInterface: 'br-baremetal'

IronicInspectorSubnets

This parameter can contain multiple ranges and works with both spine and leaf.

IPAImageURLs

This parameter contains details about the IPA kernel and ramdisk. In most cases, you can use the same images that you use on the undercloud. If you omit this parameter, you must include alternatives on each Controller.

IronicInspectorInterface

Use this parameter to specify the bare metal network interface.

Note

If you use a composable Ironic or IronicConductor role, you must include the IronicInspector service in the Ironic role in your roles file.

ServicesDefault:
  OS::TripleO::Services::IronicInspector

3.4. Deploying the overcloud

To enable the Bare Metal Provisioning service, include your ironic environment files with the -e option when you deploy or redeploy the overcloud, along with the rest of your overcloud configuration. Use the following example as a guide:

$ openstack overcloud deploy \
  --templates \
  -e ~/templates/node-info.yaml \
  -e /usr/share/openstack-tripleo-heat-templates/environments/network-isolation.yaml \
  -e ~/templates/network-environment.yaml \
  -e /usr/share/openstack-tripleo-heat-templates/environments/services/ironic-overcloud.yaml \
  -e ~/templates/ironic.yaml \

Additional resources

3.5. Testing the Bare Metal Provisioning service

You can use the OpenStack Integration Test Suite to validate your Red Hat OpenStack deployment. For more information, see the OpenStack Integration Test Suite Guide.

Additional verification methods for the Bare Metal Provisioning service:

  1. Configure the shell to access Identity as the administrative user:

    $ source ~/overcloudrc
  2. Check that the nova-compute service is running on the Controller nodes:

    $ openstack compute service list -c Binary -c Host -c Status
  3. If you changed the default ironic drivers, ensure that the required drivers are enabled:

    $ openstack baremetal driver list
  4. Ensure that the ironic endpoints are listed:

    $ openstack catalog list