Add a compute node

Add a compute node

This section describes how to add a new compute node to an existing OpenStack environment.

To add a compute node:

  1. Add a physical node using MAAS as described in the MCP Deployment Guide: Provision physical nodes using MAAS.

  2. Verify that the compute node is defined in /classes/cluster/<cluster_name>/infra/config.yml.

    Note

    Create as many hosts as you have compute nodes in your environment within this file.

    Note

    Verify that the count parameter is increased by the number of compute nodes being added.

    Configuration example if the dynamic compute host generation is used:

    reclass:
      storage:
        node:
          openstack_compute_rack01:
            name: ${_param:openstack_compute_rack01_hostname}<<count>>
            domain: ${_param:cluster_domain}
            classes:
            - cluster.${_param:cluster_name}.openstack.compute
            repeat:
              count: 20
              start: 1
              digits: 3
              params:
                single_address:
                  value: 172.16.47.<<count>>
                  start: 101
                tenant_address:
                  value: 172.16.47.<<count>>
                  start: 101
            params:
              salt_master_host: ${_param:reclass_config_master}
              linux_system_codename: xenial
    

    Configuration example if the static compute host generation is used:

    reclass:
      storage:
        node:
          openstack_compute_node01:
            name: cmp01
            domain: ${_param:cluster_domain}
            classes:
            - cluster.${_param:cluster_name}.openstack.compute
            params:
              salt_master_host: ${_param:reclass_config_master}:
              linux_system_codename: xenial
              single_address: 10.0.0.101
              deploy_address: 10.0.1.101
              tenant_address: 10.0.2.101
    
  3. Define the cmp<NUM> control address and hostname in the <cluster>/openstack/init.yml file:

    _param:
      openstack_compute_node<NUM>_address: <control_network_IP>
      openstack_compute_node<NUM>_hostname: cmp<NUM>
    
    linux:
      network:
        host:
          cmp<NUM>:
            address: ${_param:openstack_compute_node<NUM>_address}
            names:
            - ${_param:openstack_compute_node<NUM>_hostname}
            - ${_param:openstack_compute_node<NUM>_hostname}.${_param:cluster_domain}
    
  4. Apply the reclass.storage state on the Salt Master node to generate node definitions:

    salt '*cfg*' state.sls reclass.storage
    
  5. Verify that the target nodes have connectivity with the Salt Master node:

    salt '*cmp<NUM>*' test.ping
    
  6. Apply the following states:

    salt 'cfg*' state.sls salt.minion.ca
    salt '*cmp<NUM>*' state.sls salt.minion.cert
    
  7. Deploy a new compute node as described in MCP Deployment Guide: Deploy physical servers.

    Caution

    Do not use compounds for this step, since it will affect already running physical servers and reboot them. Use the Salt minion IDs instead of compounds before running the pipelines or deploying physical servers manually.

    Incorrect:

    salt -C 'I@salt:control or I@nova:compute or I@neutron:gateway' \
     cmd.run "touch /run/is_rebooted"
    salt --async -C 'I@nova:compute' cmd.run 'salt-call state.sls \
     linux.system.user,openssh,linux.network;reboot'
    

    Correct:

    salt cmp<NUM> cmd.run "touch /run/is_rebooted"
    salt --async cmp<NUM> cmd.run 'salt-call state.sls \
     linux.system.user,openssh,linux.network;reboot'
    

    Note

    We recommend that you rerun the Jenkins Deploy - OpenStack pipeline that runs on the Salt Master node with the same parameters as you have set initially during your environment deployment. This guarantees that your compute node will be properly set up and added.