Automatically commission the physical nodes

Automatically commission the physical nodes

You must define all IPMI credentials in your Reclass model to access physical servers for automated commissioning. Once you define the nodes, Salt enforces them into MAAS and starts commissioning.

To automatically commission physical nodes:

  1. Define all physical nodes under classes/cluster/<cluster>/infra/maas.yml using the following structure.

    For example, to define the kvm02 node:

    maas:
      region:
        machines:
          kvm02:
            interface:
              mac: 00:25:90:eb:92:4a
            power_parameters:
              power_address: kvm02.ipmi.net
              power_password: password
              power_type: ipmi
              power_user: ipmi_user
    

    Note

    To get MAC addresses from IPMI, you can use the ipmi tool. Usage example for Supermicro:

    ipmitool -U ipmi_user-P passowrd -H kvm02.ipmi.net raw 0x30 0x21 1| tail -c 18
    
  2. (Optional) Define the IP address on the first (PXE) interface. By default, it is assigned automatically and can be used as is.

    For example, to define the kvm02 node:

    maas:
      region:
        machines:
          kvm02:
            interface:
              mac: 00:25:90:eb:92:4a
              mode: "static"
              ip: "2.2.3.15"
              subnet: "subnet1"
              gateway: "2.2.3.2"
    
  3. (Optional) Define a custom disk layout or partitioning per server in MAAS. For more information and examples on how to define it in the model, see: Add a custom disk layout per node in the MCP model.

  4. (Optional) Modify the commissioning process as required. For more information and examples, see: Add custom commissioning scripts.

  5. Once you have defined all physical servers in your Reclass model, enforce the nodes:

    Caution

    For an offline deployment, remove the deb-src repositories from commissioning before enforcing the nodes, since these repositories are not present on the reduced offline apt image node. To remove these repositories, you can enforce MAAS to rebuild sources.list. For example:

    export PROFILE="mirantis"
    export API_KEY=$(cat /var/lib/maas/.maas_credentials)
    maas login ${PROFILE} http://localhost:5240/MAAS/api/2.0/ ${API_KEY}
    REPO_ID=$(maas $PROFILE package-repositories read | jq '.[]| select(.name=="main_archive") | .id ')
    maas $PROFILE package-repository update ${REPO_ID} disabled_components=multiverse
    maas $PROFILE package-repository update ${REPO_ID} "disabled_pockets=backports"
    

    The default PROFILE variable is mirantis. You can find your deployment-specific value for this parameter in parameters:maas:region:admin:username of your Reclass model.

    For details on building a custom list of repositories, see: MAAS GitHub project.

    salt-call maas.process_machines
    

    All nodes are automatically commissioned.

  6. Verify the status of servers either through the MAAS web UI or using the salt call command:

    salt-call maas.machines_status
    

    The successfully commissioned servers appear in the ready status.

  7. Enforce the interfaces configuration defined in the model for servers:

    salt-call state.sls maas.machines.assign_ip
    
  8. To protect any static IP assignment defined, for example, in the model, configure a reserved IP range in MAAS on the management subnet.

  9. (Optional) Enforce the disk custom configuration defined in the model for servers:

    salt-call state.sls maas.machines.storage
    
  10. Verify that all servers have correct NIC names and configurations.

  11. Proceed to Provision the automatically commissioned physical nodes.