Before you can deploy OpenStack services, you need to add hosts to the list of target nodes and add them to groups to configure the OpenStack services that the nodes to run.
On the master node, log in as a user that is a member of the kolla group.
You add users to the
kollagroup as part of setting up a master node, see Section 3.6, “Preparing a Master Node”.All of the following steps use the kollacli command, and you must be a member of the
kollagroup to use this command.Add the target nodes to the deployment.
You add nodes to the deployment with the kollacli host add command.
$ kollacli host add
hostwhere
hostis the fully qualified domain name or IP address of the host.Use the kollacli host list command to check that you have added all the hosts.
Set up the kolla user on the target nodes.
You only need to perform this step once for each target node. Only repeat this step if you change the SSH keys for the
kollauser.The
kollauser is the Ansible SSH user that is used to deploy OpenStack services. You need to copy the SSH public key for thekollauser to each host, and confirm that thekollauser can log in to the host using SSH keys.You set up the
kollauser with the kollacli host setup command.$ kollacli host setup
hostwhere
hostis the fully qualified domain name or IP address of the host.You are prompted for a password value. By default, the password is for the
rootuser on the target node.If you want to use a different user to set up the
kollauser, set theKOLLA_CLI_SETUP_USERenvironment variable before running the kollacli host setup command. The variable should contain the user name of an alternative user on the target host. The user must already exist on the target host and have sufficient privileges to be able to write to the/usr/share/kolla/.ssh/authorized_keysfile, which is owned by thekollauser and group.If you want to set up multiple hosts with a single command, you can create a YAML file that contains the names of the hosts to set up and the passwords to use. If the file specifies a user name for a host (optional), this is used instead of
rootor the user name in theKOLLA_CLI_SETUP_USERenvironment variable. For example, you might have a file namedhosts.ymlin the/myhomedirectory which contains:--- control1.example.com: password:passwordcontrol2.example.com: password:passwordcompute1.example.com: password:passworduname:user_namecompute2.example.com: password:passworduname:user_namecompute3.example.com: password:passworduname:user_namecompute4.example.com: password:passworduname:user_nameCautionFor security reasons, make sure you secure the file containing these credentials.
To set up the
kollauser using a YAML file:$ kollacli host setup --file /myhome/hosts.yml
When you have set up the
kollauser, use the kollacli host check command to verify the user.kollacli host check {host| all }where
hostis the fully qualified domain name or IP address of the host, orallfor all hosts.Assign target nodes to each group.
Groups are used to associate the target nodes with OpenStack services. Target nodes in the same group run the same OpenStack services. The default groups are control, compute, database, network, and storage.
You assign target nodes to groups with the kollacli group addhost command:
$ kollacli group addhost
group_namehostwhere
hostis the fully qualified domain name or IP address of the host.For example, to add a node to the control group:
$ kollacli group addhost control control1.example.com
A node can belong to more than one group and can run multiple OpenStack services. When you assign nodes to groups, remember the following "rules":
The nodes in the compute group must not be assigned to the control group.
The control group must contain at least two nodes.
The number of nodes in the database group must always be a multiple of two.
Each group must contain at least two nodes to enable high availability.
For more information on using groups, see Section 2.2, “Using Groups to Deploy Services”.
Use the kollacli group listhosts and the kollacli host list commands to check that you have assigned the hosts correctly.

