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 run.
On the master node, log in as a user that is a member of the kolla group.
You add users to the
kolla
group as part of setting up a master node, see Section 3.7, “Preparing a Separate Master Node”.All of the following steps use the kollacli command, and you must be a member of the
kolla
group 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
host
where
host
is 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
kolla
user.The
kolla
user is the Ansible SSH user that is used to deploy OpenStack services. You need to copy the SSH public key for thekolla
user to each host, and confirm that thekolla
user can log in to the host using SSH keys.You set up the
kolla
user with the kollacli host setup command.$ kollacli host setup
host
where
host
is 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
root
user on the target node.If you want to use a different user to set up the
kolla
user, set theKOLLA_CLI_SETUP_USER
environment 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_keys
file, which is owned by thekolla
user 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
root
or the user name in theKOLLA_CLI_SETUP_USER
environment variable. For example, you might have a file namedhosts.yml
in the/myhome
directory which contains:--- control1.example.com: password:
password
control2.example.com: password:password
compute1.example.com: password:password
uname:user_name
compute2.example.com: password:password
uname:user_name
compute3.example.com: password:password
uname:user_name
compute4.example.com: password:password
uname:user_name
CautionFor security reasons, make sure you restrict access to the file containing these credentials.
To set up the
kolla
user using a YAML file:$ kollacli host setup --file /myhome/hosts.yml
When you have set up the
kolla
user, use the kollacli host check command to verify the user.kollacli host check {
host
| all }where
host
is the fully qualified domain name or IP address of the host, orall
for 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_name
host
where
host
is 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.