Add Hosts Using the Command Line¶
You can add hosts to the system inventory using the host-add command.
About this task
There are several ways to add hosts to StarlingX; for an overview, see the StarlingX Installation Guides, https://docs.starlingx.io/deploy_install_guides/index.html for your system. Instead of powering up each host and then defining its personality and other characteristics interactively, you can use the system host-add command to define hosts before you power them up. This can be useful for scripting an initial setup.
On systems that use static IP address assignment on the management network, new hosts must be added to the inventory manually and assigned an IP address using the system host-add command. If a host is not added successfully, the host console displays the following message at power-on:
This system has been configured with static management and infrastructure IP address allocation. This requires that the node be manually provisioned in System Inventory using the 'system host-add' CLI, GUI, or stx API equivalent.
Add the host to the system inventory.
The host must be added to the system inventory before it is powered on.
On controller-0, acquire Keystone administrative privileges:
$ source /etc/platform/openrc
Use the system host-add command to add a host and specify its personality. You can also specify the device used to display messages during boot.
The hostname parameter is required for worker hosts. For controller and storage hosts, it is ignored.
~(keystone_admin)]$ system host-add -n <hostname> \ -p <personality> [-s <subfunctions>] \ [-l <location>] [-o <install_output>[-c <console>]] [-b <boot_device>] \ [-r <rootfs_device>] [-m <mgmt_mac>] [-i <mgmt_ip>] [-D <ttys_dcd>] \ [-T <bm_type> -I <bm_ip> -U <bm_username> -P <bm_password>]
is a name to assign to the host. This is used for worker nodes only. Controller and storage node names are assigned automatically and override user input.
is the host type. The following are valid values:
are the host personality subfunctions (used only for a worker host).
For a worker host, the only valid value is worker,lowlatency to enable a low-latency performance profile. For a standard performance profile, omit this option.
For more information about performance profiles, see StarlingX Deployment Configurations: Worker Function Performance Profiles.
is a string describing the location of the host
is the output device to use for message display on the host (for example, tty0). The default is ttys0, 115200.
is the format for console output on the host (text or graphical). The default is text.
The graphical option currently has no effect. Text-based installation is used regardless of this setting.
is the host device for boot partition, relative to /dev. The default is sda.
is a logical volume cgts-vg/root-lv. The default is sda, it should be the same value as specified for the boot_device.
is the MAC address of the port connected to the internal management or PXE boot network.
is the IP address of the port connected to the internal management or PXE boot network, if static IP address allocation is used.
The <mgmt_ip> option is not used for a controller node.
is set to True to have any active console session automatically logged out when the serial console cable is disconnected, or False to disable this behavior. The server must support data carrier detect on the serial console port.
is the board management controller type. Use bmc.
is the board management controller IP address (used for external access to board management controllers over the OAM network)
is the username for board management controller access
is the password for board management controller access
~(keystone_admin)]$ system host-add -n compute-0 -p worker -I 10.10.10.100
Verify that the host has been added successfully.
Use the fm alarm-list command to check if any alarms (major or critical) events have occurred. You can also type fm event-list to see a log of events. For more information on alarms, see Fault Management Overview.
With controller-0 running, start the host.
The host is booted and configured with a personality.
Verify that the host has started successfully.
The command system host-list shows a list of hosts. The added host should be available, enabled, and unlocked. You can also check alarms and events again.
After adding the host, you must provision it according to the requirements of the personality.