Kolla Ansible Files & Configurations for Openstack Multinode installation [Part -2]

Share this article

This article is part2, in our 4 article series of openstack deployement,

  1. OpenStack multinode environment/architecture [Part-1]
  2. Important files and configuration [Part-2]
  3. Environment setup with docker image building through kolla-ansible [Part-3]
  4. Openstack Multinode Deployment through Kolla-ansible [part-4]

In the previous post Openstack multinode deployment through Kolla-ansible [part 1], we have discussed our setup in which we are going to deploy OpenStack and Step 4: Copy important configuration files we have placed all the configurations inside /etc/kolla/ directory. Now, before deploying OpenStack in our multinode setup. First, let’s understand the important configurational files and important configurations.

/etc/kolla/multinode

As we have mentioned in our part-1 article that our inventory file is present in /root/train-venv/share/kolla-ansible/ansible/inventory/ directory and we copied it to /etc/kolla/ directory.

It is basically an Ansible inventory file that holds all the information and we can also configure it to tell Kolla Ansible which services will be deployed on which host.

# These initial groups are the only groups required to be modified. The
# additional groups are for more control of the environment.
[control]
# These hostname must be resolvable from your deployment host
control01
control02
control03

# The above can also be specified as follows:
#control[01:03]     ansible_user=kolla

# The network nodes are where your l3-agent and loadbalancers will run
# This can be the same as a host in the control group
[network]
network01
network02

[compute]
compute01

[monitoring]
monitoring01

# When compute nodes and control nodes use different interfaces,
# you need to comment out "api_interface" and other interfaces from the globals.yml
# and specify like below:
#compute01 neutron_external_interface=eth0 api_interface=em1 storage_interface=em1 tunnel_interface=em1

[storage]
storage01

When you open multinode conf. file starting part looks like it as mentioned in the above code section. The shown part is the most important part and this part configuration will suffice the whole service deployment setup.

According to the multinode configuration file, OpenStack services are categorized in 5 groups. Control, network, compute, monitoring and storage. Under these group headings, we will simply add the IP addresses or hostnames, And services related to that categories will be deployed on that host. We can also mention the specific hostname or IP to the services that lie under these groups.

In our setup, our starting multinode configuration file will look like below. Also, and rest of the file remains the same.

[control]
kolla-controler1
kolla-controler2

# The above can also be specified as follows:
#kolla-controler[1:2]    

[network]
kolla-controler1
kolla-controler2

[compute]
kolla-compute1
kolla-compute2

[monitoring]
kolla-controler1

[storage]
kolla-compute1

/etc/kolla/globals.yml

This file is also one of the most important files from this configuration file defines the Kolla options, docker options, networking options, and all the services options to configure them. The globals.yml file clearly explains all the options with comments. For more information, you can read those comments carefully. In the following code section, I will show all the configurations which we did in our environment.

###############
# Kolla options
###############
kolla_install_type: "binary"
openstack_release: "train"
kolla_internal_vip_address: "192.168.100.100"
kolla_external_vip_address: "192.168.200.100"

################
# Docker options
################
docker_registry: "192.168.100.11:5001"

##############################
# Neutron - Networking Options
##############################
network_interface: "eth1"
kolla_external_vip_interface: "eth0"
neutron_external_interface: "eth2"
neutron_plugin_agent: "openvswitch"

###################
# OpenStack options
###################
enable_neutron_agent_ha: "yes"
enable_openvswitch: "{{ enable_neutron | bool and neutron_plugin_agent != 'linuxbridge' }}"

########################
# Nova - Compute Options
########################
nova_compute_virt_type: "qemu"

We will configure the train OpenStack version and will create binary images. We will also create a local docker registry on 192.168.100.11:5001. Usually, 5000 port number is used for docker-registry but in the OpenStack environment, 5000 port is used by keystone services.

In the above configuration, we enabled high availability which means that if core services in one host go down they will be served from another server. We will talk about this in the coming articles.

/etc/kolla/build.conf

This configuration file is responsible for creating Kolla images in the development environment. In the previous article, we copied build.conf file after cloning the kolla repository, image building configuration can be controlled by this file. Following are the configurational changes to the file we have done.

[DEFAULT]

base = centos
# Push images after building (boolean value)
push = true
registry = "192.168.100.11:5001"
install_type = binary
tag = centos(9.0.0)
maintainer = funcfoo.tutorials@gmail.com

In the above configuration, we will be creating centos binary images. After building the image kolla-build will push them into our registry with a tag centos(9.0.0). Here in 9.0.0, 9 represent the train first 0 describe the major release change, and later 0 is a minor release. For more information regarding how to do version, numbering refers to operating kolla URL.

/etc/kolla/passwords.yml

In the previous article, we copied a template for the passwords needed in an OpenStack kolla-ansible deployment. Run the following command to generate the passwords in the passwords.yml and these passwords will be used later by OpenStack services.

kolla-genpwd

The above command will generate the passwords, below we have shown some of the entries generated by kolla-genpwd command in passwords.yml

(train-venv) [root@kolla-controller1 ~]# kolla-genpwd
(train-venv) [root@kolla-controller1 ~]# cat /etc/kolla/passwords.yml 
aodh_database_password: GmAGlzmJEPIMAPsoLIszipTP43BnAUZYx2nlAoga
aodh_keystone_password: agrgzxZJWpF21otYPM3hdpVYmsk1EWYoeIUTbEAl
barbican_crypto_key: KDIpDQK_JlhUysX3ySctYaxXIBXb-1NwrYFhmVTaLsA=
barbican_database_password: N0rhQat3jALSYzCPoZfSTpZYXltBB7aeQCjtNd0L
barbican_keystone_password: zpAG5kysjvVicFldrcq6B0h382t7qV3YH5HK6hLT
barbican_p11_password: NCEFNlZEQgG5UHLuhMpITIGZNjaZyg8Q7KqYeOhx

Openstack services custom configrations

To use the custom config files inside this directory first mention in /etc/kolla/globlas.yml config file about the path of the custom configs. Use the following entry if your custom configs are in /etc/kolla/config/

# The directory to merge custom config files the kolla's config files
node_custom_config: "/etc/kolla/config"


Now, from the above path, we can structure configuration files inside the config directory. By using this method, we can override per-project, per-project-service or per-project-service-on-specified-host.

Let us see few cases of how we can override the configurations.

  • Add/override keystone auth methods in all the hosts.
(train-venv) [root@kolla-controller1 ~]# cat /etc/kolla/config/keystone.conf
[auth]
methods = external,password,token,openid,application_credential

Above conf will override the auth section in keystone.conf file.

  • Set compute node cpu and ram allocation ratio on kolla-controller1
(train-venv) [root@kolla-controller1 ~]# cat /etc/kolla/config/nova/kolla-controller1/nova.conf
[DEFAULT]
cpu_allocation_ratio = 16.0
ram_allocation_ratio = 5.0

These are some examples, for more understanding you can refer to advanced configuration article. In the next articles, we will discuss more overriding configurations from this method.

Summary

In this article, we discussed important configuration files which are used to deploy OpenStack. We also shared our configurations which we are going to use in our testing setup.

Read more about the next article (Openstack Multinode environment setup and image building through Kolla-ansible [Part 3]) in this series.

1 thought on “Kolla Ansible Files & Configurations for Openstack Multinode installation [Part -2]”

Leave a Comment

Your email address will not be published. Required fields are marked *