Create Openstack Lab. Part 3 – Openstack Deployment

Login to maas node as ‘openstack’ user

Update repository and install required packages

sudo apt update
sudo apt install python3-dev libffi-dev gcc libssl-dev
sudo apt install python3-venv

Create virtual environment

python3 -m venv ~/venv/openstack

Activate virtual environment

source ~/venv/openstack/bin/activate

Upgrade python package management and install required packages

pip install -U pip
pip install wheel
pip install 'ansible<5.0'

Install kolla-ansible for xena

pip install git+https://opendev.org/openstack/kolla-ansible@stable/xena

Configure kolla-ansible

sudo mkdir -p /etc/kolla
sudo chown $USER:$USER /etc/kolla
cp -r ~/venv/openstack/share/kolla-ansible/etc_examples/kolla/* /etc/kolla
mkdir -p ~/projects/openstack
cp ~/venv/openstack/share/kolla-ansible/ansible/inventory/* \
~/projects/openstack

Configure ansible

sudo vi /etc/ansible/ansible.cfg

Add or modify following lines

[defaults]
host_key_checking=False
pipelining=True
forks=100

Configure openstack nodes

cd ~/projects/openstack
vi ./multinode

Add or modify following lines

[control]
node-1
node-2
node-3

[network]
node-1
node-2
node-3

[compute]
node-4
node-5
node-6

[monitoring]
node-2

[storage]
node-1
node-2
node-3
node-4
node-5
node-6

Check accessibility to all nodes

ansible -i multinode all -m ping

Generate password for openstack modules

kolla-genpwd

Configure openstack installation

vi /etc/kolla/globals.yml

Modify following lines

kolla_base_distro: "ubuntu"
kolla_internal_vip_address: "10.6.10.19"
kolla_external_vip_address: "10.6.11.19"
network_interface: "eth0"
kolla_external_vip_interface: "eth1"
storage_interface: "eth2"
neutron_external_interface: "eth4"
neutron_plugin_agent: "ovn"
keepalived_virtual_router_id: "50"
enable_cinder: "yes"
enable_mariabackup: "yes"
enable_neutron_provider_networks: "yes"
enable_neutron_trunk: "yes"
enable_prometheus: "yes"

Configure neutron

mkdir -p /etc/kolla/config/neutron
vi /etc/kolla/config/neutron/ml2_conf.ini

Add or modifiy following lines

[ml2_type_vlan]
network_vlan_ranges="physnet1:610:619"

[ml2_type_flat]
flat_networks="physnet1"

[ml2]
path_mtu = 9000

Configure ceph

mkdir /etc/kolla/config/nova
mkdir /etc/kolla/config/glance
mkdir -p /etc/kolla/config/cinder/cinder-volume
mkdir /etc/kolla/config/cinder/cinder-backup

Copy configuration and keyring files

cp ~/backups/etc/ceph/ceph.conf /etc/kolla/config/cinder/
cp ~/backups/etc/ceph/ceph.conf /etc/kolla/config/nova/
cp ~/backups/etc/ceph/ceph.conf /etc/kolla/config/glance/
cp ~/backups/etc/ceph/ceph.client.glance.keyring /etc/kolla/config/glance/
cp ~/backups/etc/ceph/ceph.client.nova.keyring /etc/kolla/config/nova/
cp ~/backups/etc/ceph/ceph.client.cinder.keyring /etc/kolla/config/nova/
cp ~/backups/etc/ceph/ceph.client.cinder.keyring /etc/kolla/config/cinder/cinder-volume/
cp ~/backups/etc/ceph/ceph.client.cinder.keyring /etc/kolla/config/cinder/cinder-backup/
cp ~/backups/etc/ceph/ceph.client.cinder-backup.keyring /etc/kolla/config/cinder/cinder-backup/

Bootstrap servers

kolla-ansible -i ./multinode bootstrap-servers

Precheck configurations

kolla-ansible -i ./multinode prechecks

Deploy

kolla-ansible -i ./multinode deploy

Leave a Reply

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