Rate This Document
Findability
Accuracy
Completeness
Readability

Changing the Host Name and Mapping

To facilitate subsequent configuration operations on different nodes, change the host names and mappings on all nodes.

In this document, the compute node and storage node are deployed on the same server. If an independent storage node is deployed in your current operating environment, you need to perform the operations in this section on the storage node as well.

  1. Set the host name of each node.

    Controller node:

    hostnamectl set-hostname controller

    Compute node:

    hostnamectl set-hostname compute

    After the change, log in to the OS again for the change to take effect.

  2. Modify the /etc/hosts file on all nodes based on the network requirements.
    1. Open the file.
      vi /etc/hosts
    2. Press i to enter the insert mode and add the following content:
      192.168.14.2 controller
      192.168.14.4 compute

      In this document, the 192.168.14.0/24 subnet is used for communication of the OpenStack controller node and can be modified as required.

    1. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.