This guide uses Kolla-Ansible for containerized OpenStack deployment. Kolla-Ansible orchestrates Docker containers across control, compute, and network nodes.
- name: Deploy OpenStack with Kolla-Ansible
hosts: openstack_control
become: true
vars:
kolla_dir: /opt/kolla
tasks:
- name: Install dependencies
ansible.builtin.package:
name:
- python3
- python3-pip
- git
state: present
- name: Install kolla-ansible
ansible.builtin.pip:
name: kolla-ansible
- name: Ensure config directory exists
ansible.builtin.file:
path: /etc/kolla
state: directory
mode: "0755"
- name: Copy globals configuration
ansible.builtin.copy:
src: files/globals.yml
dest: /etc/kolla/globals.yml
mode: "0644"
- name: Run kolla-ansible bootstrap
ansible.builtin.command: kolla-ansible -i {{ kolla_dir }}/inventory bootstrap-servers
- name: Run kolla-ansible prechecks
ansible.builtin.command: kolla-ansible -i {{ kolla_dir }}/inventory prechecks
- name: Run kolla-ansible deploy
ansible.builtin.command: kolla-ansible -i {{ kolla_dir }}/inventory deploy
ansible-playbook -i inventory.ini openstack-kolla.yml