Modify the deployment model

Modify the deployment modelΒΆ

To use the OpenStack Bare Metal service, you need to modify your Reclass model before deploying a new OpenStack environment. You can also deploy the OpenStack Bare Metal service in the existing OpenStack environment.

As bare-metal configurations vary, this section provides examples of deployment model modifications. You may need to tailor them for your specific use case.

The configuration examples in this section presuppose the following:

  • The OpenStack Bare Metal API service runs on the OpenStack Controller node
  • The Bare Metal service for ironic-conductor and other services per the bare-metal role reside on the bmt01, bmt02, and bmt03 nodes
  • Separate flat network is used between the bmt* and gtw* nodes
  • The network configuration:
    • Control network: 10.11.0.0/16
    • Bare-metal network: 10.13.0.0/16
    • Bare-metal interface: ens6

To modify the deployment model:

  1. Select from the following options:

    • For the MCP versions prior to the 2019.2.6 maintenance update, Create a deployment metadata model.
    • For the MCP versions 2019.2.6 and later, when creating a deployment model as described in Create a deployment metadata model, set the ironic_enabled parameter to True that will automatically add most of the Ironic parameters and classes described in the following steps.
  2. Open the cluster level of your Reclass model.

  3. In the ./openstack/init.yml file, add or update the following parameters to match your specific bare metal configuration:

    Caution

    The openstack_baremetal_neutron_subnet_ parameters must match your bare metal network settings. The bare metal nodes must be connected to the network before the deployment. During the deployment, MCP automatically registers this network in the OpenStack Networking service.

    parameters:
      _param:
        openstack_baremetal_address: 10.11.0.5
        openstack_baremetal_node01_address: 10.11.0.6
        openstack_baremetal_node02_address: 10.11.0.7
        openstack_baremetal_node03_address: 10.11.0.8
        openstack_baremetal_node01_hostname: bmt01
        openstack_baremetal_node02_hostname: bmt02
        openstack_baremetal_node03_hostname: bmt03
        openstack_baremetal_address_baremetal: 10.13.0.10
        openstack_baremetal_node01_baremetal_address: 10.13.0.11
        openstack_baremetal_node02_baremetal_address: 10.13.0.12
        openstack_baremetal_node03_baremetal_address: 10.13.0.13
        openstack_baremetal_neutron_subnet_cidr: 10.13.0.0/16
        openstack_baremetal_neutron_subnet_allocation_start: 10.13.90.1
        openstack_baremetal_neutron_subnet_allocation_end: 10.13.199.255
        mysql_ironic_password: ${_param:mysql_ironic_password_generated}
        keystone_ironic_password: ${_param:keystone_ironic_password_generated}
        ironic_version: ${_param:openstack_version}
    
  4. Verify that the following pillars are defined in ./openstack/init.yml:

    parameters:
      linux:
        network:
          host:
            bmt01:
              address: ${_param:openstack_baremetal_node01_address}
              names:
                - ${_param:openstack_baremetal_node01_hostname}
                - ${_param:openstack_baremetal_node01_hostname}.${_param:cluster_domain}
            bmt02:
              address: ${_param:openstack_baremetal_node02_address}
              names:
                - ${_param:openstack_baremetal_node02_hostname}
                - ${_param:openstack_baremetal_node02_hostname}.${_param:cluster_domain}
            bmt03:
              address: ${_param:openstack_baremetal_node03_address}
              names:
                - ${_param:openstack_baremetal_node03_hostname}
                - ${_param:openstack_baremetal_node03_hostname}.${_param:cluster_domain}
    
  5. Verify that the following classes are included into infra/config/init.yml:

    - system.reclass.storage.system.openstack_baremetal_cluster
    - system.salt.master.formula.pkg.baremetal
    
  6. Verify that the following classes are included into openstack/database.yml:

    - system.galera.server.database.ironic
    
  7. Verify that the following parameters are defined in infra/secrets.yml:

    mysql_ironic_password: some_password
    keystone_ironic_password: some_password
    keepalived_openstack_baremetal_password_generated: some_password
    
  8. Verify that the following pillars and classes are added to openstack/control.yml:

    - system.haproxy.proxy.listen.openstack.ironic
    - system.ironic.api.cluster
    parameters:
      _param:
        ironic_service_host: ${_param:cluster_vip_address}
        cluster_baremetal_local_address: ${_param:cluster_local_address}
        ironic_api_type: 'public'
    
      neutron:
        server:
          ironic_enabled: True
          backend:
            ironic_vlan_range: 100:1000
    
  9. Verify that the following classes are included into openstack/control/init.yml:

    - service.ironic.client
    - system.neutron.client.service.ironic
    - system.keystone.client.service.ironic
    
  10. Verify that the openstack/baremetal.yml file is present in the model with the following exemplary content:

    classes:
    - system.linux.system.repo.mcp.apt_mirantis.extra
    - system.linux.system.repo.mcp.apt_mirantis.openstack
    - cluster.${CLUSTER_NAME}.infra
    - system.ironic.api.cluster
    - system.ironic.conductor.cluster
    - system.ironic.tftpd_hpa
    - system.nova.compute_ironic.cluster
    - system.apache.server.single
    - system.apache.server.site.ironic
    - system.keepalived.cluster.instance.openstack_baremetal_vip
    - system.haproxy.proxy.listen.openstack.ironic_deploy
    - system.haproxy.proxy.single
    
    parameters:
      _param:
        ironic_api_type: 'deploy'
        cluster_vip_address: ${_param:openstack_control_address}
        ironic_service_host: ${_param:cluster_vip_address}
        cluster_local_address: ${_param:single_address}
        cluster_baremetal_vip_address: ${_param:openstack_baremetal_address_baremetal}
        cluster_baremetal_local_address: ${_param:baremetal_address}
        keepalived_openstack_baremetal_vip_interface: ens6
        cluster_node01_hostname: ${_param:openstack_baremetal_node01_hostname}
        cluster_node01_address: ${_param:openstack_baremetal_node01_address}
        cluster_node02_hostname: ${_param:openstack_baremetal_node02_hostname}
        cluster_node02_address: ${_param:openstack_baremetal_node02_address}
        cluster_node03_hostname: ${_param:openstack_baremetal_node03_hostname}
        cluster_node03_address: ${_param:openstack_baremetal_node03_address}
        keepalived_openstack_baremetal_password: ${_param:keepalived_openstack_baremetal_password_generated}
    
  11. Verify that the following pillars and classes are added into openstack/proxy.yml:

    classes:
    - system.nginx.server.proxy.openstack.ironic
    parameters:
      _param:
        ironic_service_host: ${_param:openstack_control_address}
    
  12. Verify that the following pillars are added into openstack/gateway.yml:

    neutron:
      gateway:
        ironic_enabled: True
    linux:
      network:
        interface:
          br-baremetal:
            enabled: true
            type: ovs_bridge
            mtu: ${_param:interface_mtu}
          ens6:
            enabled: true
            name: ens6
            type: eth
            proto: manual
            ovs_bridge: br-baremetal
            ovs_type: OVSPort
            ipflush_onchange: true
            restart_on_ipflush: true
    
  13. In openstack/control.yml, enroll the bare metal nodes dedicated for Ironic:

    parameters:
      ironic:
        client:
          enabled: true
          nodes:
            admin_identity:
              - name: <node name>
                driver: pxe_ipmitool
                properties:
                  local_gb: <size of node's disk in GiB>
                  cpus: <Number of CPUs on the node>
                  memory_mb: <RAM size of the node in MiB>
                  cpu_arch: <architecture of node's CPU>
                driver_info:
                  ipmi_username: <username for IPMI>
                  ipmi_password: <password for the IPMI user>
                  ipmi_address: <IPMI address of the node>
                ports:
                  - address: <MAC address of the node port1>
                  - address: <MAC address of the node port2>
    
  14. Proceed to Install the Bare Metal service components.