Listen to this Post

Introduction:
Deploying OpenStack has historically been a complex, error-prone process requiring deep expertise in distributed systems, networking, and storage. Kolla Ansible emerges as a transformative solution that replaces rigid, costly deployment methods with a streamlined, containerized approach, enabling operators to build production-ready clouds with minimal overhead while maintaining full customizability.
Learning Objectives:
- Understand the architecture and core components of Kolla Ansible for OpenStack deployment
- Execute a multi-node OpenStack deployment using containerized services with Ansible
- Implement high availability, security hardening, and operational maintenance tasks
You Should Know:
- Deploying OpenStack with Kolla Ansible: A Step‑by‑Step Guide
Kolla Ansible leverages containerization (Docker/Podman) and Ansible automation to transform a set of bare metal or virtual machines into a fully functional OpenStack cloud. The process begins with preparing the underlying nodes and defining the deployment topology in an inventory file. Below is an extended guide covering initial setup to post-deployment verification.
Step 1: Environment Preparation
On a deployment host (typically a control node), install the required dependencies. For a Rocky Linux 9 deployment host:
sudo dnf install -y python3-pip git sudo pip3 install ansible-core==2.15.0
Clone the Kolla Ansible repository and install the required Python packages:
git clone https://opendev.org/openstack/kolla-ansible cd kolla-ansible sudo pip3 install -r requirements.txt
Copy the example inventory and configuration files to a working directory:
cp -r etc/kolla /etc/kolla cp ansible/inventory/ /etc/kolla/
Step 2: Configure the Inventory
Edit `/etc/kolla/inventory` to match your node layout. A typical multi-node setup with HA includes three control nodes, network nodes, compute nodes, storage nodes, and monitoring nodes. Example inventory snippet:
[bash] control01 ansible_host=192.168.10.10 control02 ansible_host=192.168.10.11 control03 ansible_host=192.168.10.12 [bash] network01 ansible_host=192.168.10.20 [bash] compute01 ansible_host=192.168.10.30 compute02 ansible_host=192.168.10.31 [bash] storage01 ansible_host=192.168.10.40 [bash] monitoring01 ansible_host=192.168.10.50 [all:vars] ansible_user=root ansible_ssh_private_key_file=/path/to/private_key
Step 3: Generate Passwords and Configure global.yml
Generate secure passwords for all OpenStack services:
kolla-ansible genpass
Edit `/etc/kolla/globals.yml` to set deployment options. Essential parameters:
kolla_base_distro: "rocky" kolla_install_type: "source" network_interface: "eth0" neutron_external_interface: "eth1" enable_ha: "yes" enable_tls: "yes" kolla_enable_tls_external: "yes"
Step 4: Bootstrap and Deploy
Bootstrap the nodes to install dependencies and configure system settings:
kolla-ansible -i /etc/kolla/inventory bootstrap-servers
Pre-deployment checks ensure all prerequisites are met:
kolla-ansible -i /etc/kolla/inventory prechecks
Execute the main deployment:
kolla-ansible -i /etc/kolla/inventory deploy
Once complete, install the OpenStack client tools and generate an admin OpenRC file:
kolla-ansible -i /etc/kolla/inventory post-deploy . /etc/kolla/admin-openrc.sh
Verify the deployment by listing available images and services:
openstack image list openstack compute service list
2. Implementing High Availability and Security Hardening
Kolla Ansible incorporates built-in HA through clustered services, but proper configuration is crucial. The HA architecture relies on MariaDB Galera for database clustering, RabbitMQ mirrored queues, and HAProxy for load balancing API endpoints.
Step 1: Configure HA Services
In `globals.yml`, set the following HA parameters:
enable_mariadb: "yes" enable_rabbitmq: "yes" enable_haproxy: "yes" enable_galera: "yes"
For production, ensure you have at least three control nodes. Kolla Ansible automatically configures Galera with wsrep synchronization. To verify the cluster status from any control node:
docker exec -it mariadb mysql -e "SHOW STATUS LIKE 'wsrep_cluster_size';"
Expected output shows the number of nodes in the cluster.
Step 2: Enable TLS/SSL
Secure all API endpoints by generating self-signed or CA-signed certificates. Place certificates in `/etc/kolla/certificates/` with names like haproxy.pem. Configure globals.yml:
kolla_enable_tls_internal: "yes" kolla_enable_tls_external: "yes" kolla_external_fqdn: "openstack.example.com"
After deployment, verify SSL connectivity:
openssl s_client -connect openstack.example.com:443 -servername openstack.example.com
Step 3: Non-Root Containers and SELinux
Kolla Ansible runs all services in non-root containers by default, reducing attack surface. To verify:
docker inspect mariadb | grep -i user
For SELinux, ensure it is enabled on all nodes (getenforce should return Enforcing). The deployment process applies appropriate container policies automatically.
Step 4: Firewall Configuration
Kolla Ansible can manage firewalld rules. Enable firewall management in globals.yml:
manage_firewalld: "yes"
During bootstrap, required ports for OpenStack services (e.g., 5000 for Keystone, 8774 for Nova, 9292 for Glance) are opened. Review applied rules on a control node:
sudo firewall-cmd --list-all
3. Operational Maintenance: Upgrades, Backup, and Recovery
Maintaining a Kolla Ansible deployment involves automating upgrades, rotating passwords, and ensuring data durability. Below are essential commands for day-2 operations.
Step 1: Perform a Rolling Upgrade
Upgrade all containers to a newer OpenStack release without downtime. First, update the Kolla Ansible code and dependencies:
git pull sudo pip3 install -r requirements.txt
Re-generate passwords (new services may require new passwords):
kolla-ansible genpass
Run the upgrade playbook:
kolla-ansible -i /etc/kolla/inventory upgrade
During the upgrade, each service is updated sequentially, ensuring availability of others.
Step 2: Backup MariaDB and RabbitMQ
Kolla Ansible provides helper scripts for backups. For MariaDB, perform a logical backup using `mysqldump` from the container:
docker exec -t mariadb mysqldump --all-databases --opt --single-transaction > /backup/mariadb_backup.sql
For RabbitMQ, export definitions and message queues:
docker exec rabbitmq rabbitmqctl export_definitions /tmp/definitions.json docker cp rabbitmq:/tmp/definitions.json /backup/rabbitmq_defs.json
To restore, import definitions:
docker cp /backup/rabbitmq_defs.json rabbitmq:/tmp/ docker exec rabbitmq rabbitmqctl import_definitions /tmp/definitions.json
Step 3: Rotate Passwords
Password rotation is critical for security. Kolla Ansible supports rotating passwords for all services with minimal disruption:
kolla-ansible -i /etc/kolla/inventory rotate-passwords
The tool updates passwords in the database, RabbitMQ, and service configurations, then restarts affected containers.
Step 4: Reconfigure a Service
If you modify configuration in `globals.yml` or service-specific files, reconfigure the service without a full redeploy:
kolla-ansible -i /etc/kolla/inventory reconfigure -t nova
Replace `nova` with the service name (e.g., glance, neutron, keystone). This is useful for applying policy changes or updating service parameters.
4. Advanced Customization and Troubleshooting
Kolla Ansible allows deep customization through configuration overrides and provides robust troubleshooting tools.
Step 1: Customizing OpenStack Services
Override service configuration by placing custom files in /etc/kolla/config/. For example, to modify Nova scheduler filters, create `/etc/kolla/config/nova/nova.conf.d/50-scheduler.conf` with:
[bash] scheduler_default_filters = RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter
Reconfigure Nova to apply changes:
kolla-ansible -i /etc/kolla/inventory reconfigure -t nova
Step 2: Troubleshooting with Container Logs
View logs for a specific container:
docker logs -f nova_compute
To inspect a container’s network configuration:
docker exec nova_compute ip addr
Check if a service is properly registered in the database:
docker exec -it mariadb mysql -e "SELECT FROM nova_api.services\G"
Step 3: Rebuilding a Failed Node
If a control node fails, rebuild the OS, re-run the bootstrap playbook, and redeploy only the affected services:
kolla-ansible -i /etc/kolla/inventory bootstrap-servers --limit control01 kolla-ansible -i /etc/kolla/inventory deploy --limit control01
What Undercode Say:
- Kolla Ansible transforms OpenStack deployment from a months-long engineering project into a repeatable, automated task achievable with basic Linux and Ansible skills. Its container-first architecture ensures consistency across environments and simplifies both upgrades and scaling.
- Security is deeply integrated through non‑root containers, TLS everywhere, and SELinux enforcement, eliminating common misconfigurations. The ability to rotate passwords and reconfigure services dynamically reduces the operational burden while maintaining compliance with enterprise security policies.
- The shift toward containerized infrastructure is reshaping how private clouds are built. Kolla Ansible’s adoption of Podman and its alignment with Kubernetes ecosystem tools indicate a future where OpenStack operators can leverage the same container orchestration skills used in public cloud environments, bridging the gap between legacy virtualization and modern cloud-native operations.
Prediction:
As organizations increasingly demand hybrid cloud agility, the simplicity and speed of Kolla Ansible will drive broader adoption of private OpenStack clouds. Its integration with container orchestration platforms like Kubernetes will evolve, enabling unified management of virtual machines and containers within a single operational framework, ultimately reducing the total cost of ownership and accelerating time-to-market for infrastructure services.
▶️ Related Video (86% Match):
🎯Let’s Practice For Free:
IT/Security Reporter URL:
Reported By: Https: – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅


