Introduction

This article is my note during installing OpenStack AIO via Kolla-ansible.

Topology

We will use two nodes. One is for OpenStack, one is for Kolla-ansible which will be used to install OpenStack to the OpenStack node.

Kolla two node

Installing

Step 1: Prepare environment

  • Networking: You need to setup two nodes with two interfaces as the above topology. Kolla-ansible node with connect to OpenStack node via management network. OpenStack node will be configured to get public network as provider network in OpenStack system.

  • On Kolla-ansible node, we need to install Git, and some packages.

yum install epel-release -y
yum install python-pip -y
yum install python-devel libffi-devel gcc openssl-devel libselinux-python -y
yum install ansible -y
  • On OpenStack node, we need to create a volume group. Assuming, OpenStack node has two disks including sda and sdb. sdb is for cinder volume using.
pvcreate /dev/sdb
vgcreate cinder-volumes /dev/sdb

Step 2: Prepare Kolla-ansible on Kolla node

Note: Run below commands on Kolla node

  • Edit /etc/hosts and copy public key to ssh connect to OpenStack node without password.
echo "192.168.20.30 kolla-aio" >> /etc/hosts
ssh-keygen
# Note: Just press Enter to continue
ssh-copy-id root@ssh-copy-id
  • Install Kolla-ansible version

    pip install kolla-ansible==6.1.0
    pip show kolla-ansible
    
  • Copy the configuration file

cp -r /usr/share/kolla-ansible/etc_examples/kolla /etc/
cp /usr/share/kolla-ansible/ansible/inventory/* ~/
  • Edit all-in-one inventory and the globals.yml file to map my requirements.

    • The globals.yml file should be like this link
    • The all-in-one inventory should be like this link

Step 3: Start installing OpenStack

Run below commands on Kolla-ansible node

  • Boottrap to install Docker on OpenStack node
kolla-ansible -i /root/all-in-one bootstrap-servers
  • Prechecks to make sure everity is OK
kolla-ansible -i /root/all-in-one prechecks
  • Pull neccessary images
kolla-ansible -i /root/all-in-one pull
  • Deploy OpenStack
kolla-ansible -i /root/all-in-one deploy

Idealy, the result of above command is OK and OpenStack is already installed on the OpenStack node.

  • Create admin file and install OpenStack client.
kolla-ansible -i /root/all-in-one post-deploy
yum install centos-release-openstack-queens -y
yum install python-openstackclient -y
  • Create a script to setup prepare OpenStack resource before using
wget https://gist.githubusercontent.com/namnh68/1b5e25a270c5ff6b6bc9adf362398a30/raw/68072e9a7f423c0a61f8b4c39fbb7ac5b414175e/init-runonce.sh

bash init-runonce.sh

Done, you can access Horizon for now. See the /etc/kolla/admin-openrc.sh to know your admin password.