Install and configure OpenStack Ussuri on CentOS 8

You can support us by downloading this article in PDF format via the link below.

Download the guide in PDF format

turn off


Hello, good person! In today’s guide, I hope we introduce how to install and configure OpenStack Ussuri on a CentOS 8 Linux server. This guide does not apply to the installation of a highly available Production OpenStack Cloud on CentOS 8 servers, but it is applicable to POC and home labs. OpenStack is a free and open source software platform designed to help users build private cloud environments or customer-facing clouds. The main components of OpenStack that we will introduce in this guide are:

  • cinder – Block storage service
  • neutron – Network Service
  • Nova – Calculation
  • rapid – Object storage service
  • Keystone – Identity service
  • heat – Orchestration services
  • Glance – Picture Service
  • horizon – Dashboard

As mentioned earlier, this installation is done on a single physical server with the following hardware specifications:

Memory: 128GB RAM
CPU: Intel(R) Xeon(R) CPU E5-1650 v2 @ 3.50GHz (12 cores)
Disk: 3 x 4TB SATA
Network: 1Gbit
IPV4 Adresses: 1 x IPV4 + /28 Subnet (14 IPs)

$ grep -c ^processor /proc/cpuinfo 

$ free -h
              total        used        free      shared  buff/cache   available
Mem:           125G        207M        125G         21M        244M        124G
Swap:            0B          0B          0B

$ lsblk 
loop0   7:0    0    3G  1 loop 
sda     8:0    0  3.7T  0 disk 
sdb     8:16   0  3.7T  0 disk 
sdc     8:32   0  3.7T  0 disk 
sdd     8:32   0  3.7T  0 disk 

This is not to say that the hardware requirements must match the above requirements to provide a view of what we are studying.

Step 1: Pre-set requirements

Since we will use Packstack when installing OpenStack on CentOS 8, we need to disable certain services (such as firewalld and NetworkManager) to ensure a successful installation. Before disabling the NetworkManager service, we will install the network-scripts package. This provides network services for managing the network on the CentOS 8 system.

sudo dnf install -y network-scripts
sudo systemctl disable --now firewalld NetworkManager
sudo systemctl enable network && sudo systemctl start network

Disable deprecated warnings:

sudo touch /etc/sysconfig/disable-deprecation-warnings

Confirm the status of the network service:

$ systemctl status network
● network.service - LSB: Bring up/down networking
   Loaded: loaded (/etc/rc.d/init.d/network; generated)
   Active: active (exited) since Fri 2020-07-03 17:36:41 CEST; 11s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 14766 ExecStart=/etc/rc.d/init.d/network start (code=exited, status=0/SUCCESS)

Jul 03 17:36:40 systemd[1]: Starting LSB: Bring up/down networking...Jul 03 17:36:40 network[14766]: WARN      : [network] You are using 'network' service provided by 'network-scripts', which are now de>
Jul 03 17:36:40 network[14766]: WARN      : [network] 'network-scripts' will be removed in one of the next major releases of RHEL.Jul 03 17:36:40 network[14766]: WARN      : [network] It is advised to switch to 'NetworkManager' instead for network management.
Jul 03 17:36:41 network[14766]: Bringing up loopback interface:  [  OK  ]
Jul 03 17:36:41 network[14766]: Bringing up interface enp5s0:  ERROR     : [ipv6_set_default_route] Given IPv6 default gateway 'fe80:>
Jul 03 17:36:41 network[14766]: [  OK  ]
Jul 03 17:36:41 systemd[1]: Started LSB: Bring up/down networking.

Confirm that your DNS is working well:

$ ping -c 2
PING (2a00:1450:400f:807::200e)) 56 data bytes
64 bytes from (2a00:1450:400f:807::200e): icmp_seq=1 ttl=120 time=7.27 ms64 bytes from (2a00:1450:400f:807::200e): icmp_seq=2 ttl=120 time=7.34 ms

--- ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 3ms
rtt min/avg/max/mdev = 7.269/7.306/7.343/0.037 ms

Also disable SELinux to avoid trouble.

sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/config

Set the server host name.

sudo hostnamectl set-hostname --static

Ensure that local name resolution is valid.

$ sudo vim /etc/hosts

Finally, update the system and install basic utilities.

sudo dnf -y install vim wget curl telnet bash-completion network-scripts dnf-utils

Step 2: Install the Packstack software package

Add the OpenStack Ussuri version repository to your CentOS 8 computer. If you are using a newer version of OpenStack, please replace stein with the release name.

sudo dnf config-manager --enable PowerTools
sudo dnf install -y centos-release-openstack-ussuri
sudo dnf -y update

After adding the repository, install the packstack package for CentOS.

sudo dnf install -y openstack-packstack

Enable the advanced Virt module:

sudo dnf -y module enable virt

Update the system:

sudo dnf update -y
sudo systemctl reboot

Step 3: Use packstack to deploy OpenStack on CentOS 8

There are two ways to deploy OpenStack on CentOS 8 using packstack.

Method 1: Simple single-node OpenStack deployment-default (only for simple POC)

For single-node OpenStack deployment, run the following command:

sudo packstack --allinone

To disable the demo settings, use:

sudo packstack --allinone --provision-demo=n

Method 2: Customized single node installation

We need to generate a configuration file that will be used to install OpenStack Cloud through Packstack. This file contains information such as installation services, storage configuration, networking, etc.

sudo packstack 
  --gen-answer-file /root/packstack-answers.txt


  • /dev/sdc Is the original definition for Swift object storage. I can also be a partition, for example /dev/sdc1. If you do not have the original disk, you can delete the line and specify the size of the loopback device in the following ways: –Os-swift-storage-size =20GB
  • MySr0ngAdminPassw0rd Is the administrator user password.

Review the generated files to ensure that the correct values ​​are set for your deployment.

sudo vi /root/packstack-answers.txt

Preparation of cinder

I will use the LVM partition to create the Cinder logical volume-cinder-volumes.

For this, I have /dev/sdd with /dev/sde On my server. I will create a RAID 0 device from two disks.

$ sudo  mdadm --create --verbose /dev/md2 --level=0 --raid-devices=2 /dev/sdd /dev/sde
mdadm: chunk size defaults to 512K
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md2 started.

Then create physical volumes, volume groups and thin pools for Cinder:

$ sudo pvcreate /dev/md2
Physical volume "/dev/md2" successfully created.

$ sudo vgcreate cinder-volumes /dev/md2
Volume group "cinder-volumes" successfully created

$ sudo lvcreate -l 100%FREE -T cinder-volumes/cinder-volumes-pool
Logical volume "cinder-volumes-pool" created.

Clean LVM and RAID devices

If you want to redo, use the following command to clean up the LVM and RAID devices.

sudo vgremove cinder-volumes
sudo mdadm --stop /dev/md2
sudo mdadm --zero-superblock /dev/sdd
sudo mdadm --zero-superblock /dev/sdbe

This can also be done on a standard partition without Raid devices. See the example below.

$ sudo pvcreate /dev/sdd1
Physical volume "/dev/sdd1" successfully created. 

$ sudo vgcreate cinder-volumes /dev/sdd1
Volume group "cinder-volumes" successfully created

$ sudo lvcreate -l 100%FREE -T cinder-volumes/cinder-volumes-pool
  Logical volume "cinder-volumes-pool" created.

If you do not have any raw devices or available partitions, you can use loopback devices in the following ways: –Cinder-volumes-create = y While generating Answers.txt file or adding the following line CINDER_VOLUMES_CREATE = y Directly to the file.

Install OpenStack on CentOS 8 using Packstack

Now that we have the answer file to use, we can use the packstack command line to guide OpenStack Cloud.

sudo packstack --answer-file /root/packstack-answers.txt --timeout=1500 | tee packstrack-output.txt

See the installation output below.

Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                    [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries                        [ DONE ]
Setting up CACERT                                    [ DONE ]
Preparing AMQP entries                               [ DONE ]
Preparing MariaDB entries                            [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries                           [ DONE ]
Preparing Glance entries                             [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries                             [ DONE ]
Preparing Nova API entries                           [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Preparing Nova Compute entries                       [ DONE ]
Preparing Nova Scheduler entries                     [ DONE ]
Preparing Nova VNC Proxy entries                     [ DONE ]
Preparing OpenStack Network-related Nova entries     [ DONE ]
Preparing Nova Common entries                        [ DONE ]
Preparing Neutron API entries                        [ DONE ]
Preparing Neutron L3 entries                         [ DONE ]
Preparing Neutron L2 Agent entries                   [ DONE ]
Preparing Neutron DHCP Agent entries                 [ DONE ]
Preparing Neutron Metering Agent entries             [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Preparing OpenStack Client entries                   [ DONE ]
Preparing Horizon entries                            [ DONE ]
Preparing Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Testing if puppet apply is finished:  [  ]                           [ DONE ]           
Applying                              [ DONE ]        
Applying                              [ DONE ]        
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

 **** Installation completed successfully ******

After a successful installation, the login URL of the dashboard will be displayed.

Step 4: Configure the OpenStack network

The installer will automatically create an OVS bridge, which can be confirmed by the following command.

$ sudo ovs-vsctl show
    Manager "ptcp:6640:"
        is_connected: true
    Bridge br-ex
        Port "patch-provnet-f62aa13c-c6e5-41a2-bd30-9760f2773e07-to-br-int"
            Interface "patch-provnet-f62aa13c-c6e5-41a2-bd30-9760f2773e07-to-br-int"
                type: patch
                options: {peer="patch-br-int-to-provnet-f62aa13c-c6e5-41a2-bd30-9760f2773e07"}
        Port br-ex
            Interface br-ex
                type: internal
    Bridge br-int
        fail_mode: secure
        Port br-int
            Interface br-int
                type: internal
        Port "patch-br-int-to-provnet-f62aa13c-c6e5-41a2-bd30-9760f2773e07"
            Interface "patch-br-int-to-provnet-f62aa13c-c6e5-41a2-bd30-9760f2773e07"
                type: patch
                options: {peer="patch-provnet-f62aa13c-c6e5-41a2-bd30-9760f2773e07-to-br-int"}
    ovs_version: "2.12.0"

If the mapping between the interface and the OVS bridge is incorrect, continue to modify the interface configuration and add the interface to the bridge to be used in OpenStack.

Create an external OVS bridge on the interface.

$ sudo vi /etc/sysconfig/network-scripts/ifcfg-eno1

$ sudo vi /etc/sysconfig/network-scripts/ifcfg-br-ex

Move the static route of the configured interface to br-ex.

sudo mv /etc/sysconfig/network-scripts/route-eno1 /etc/sysconfig/network-scripts/route-br-ex

Add network physical interface to Blakes Bridge in Open vSwitch.

sudo ovs-vsctl add-port br-ex eno1; systemctl restart network.service

Other bridges can be configured in a similar manner. You need to configure the correct mapping for Open vSwitch.

$ sudo  vi /etc/neutron/plugins/ml2/openvswitch_agent.ini 

Restart the Nova service.

sudo systemctl restart openstack-nova-compute
sudo systemctl restart openstack-nova-api
sudo systemctl restart openstack-nova-scheduler

Create an OpenStack private network.

$ source keystonerc_admin
$ openstack network create private

Confirm that the network has been created.

$ openstack network list
| ID                                   | Name    | Subnets                              |
| a5e2a8f0-a953-4eb4-8fc1-2712c2c879d5 | private | 238ec5c5-602d-4fb8-9fca-053d444d9187 |

Add the subnet to the created private network.

openstack subnet create --network private 
  --allocation-pool start=,end= 

Create a public network.

openstack network create 
  --provider-network-type flat 
  --provider-physical-network extnet 

Add a subnet for the public network.

 openstack subnet create --network public 
    --allocation-pool start=,end= 
    --subnet-range /27 public_subnet

Add a new router and configure the router interface.

openstack router create --no-ha router1
openstack router set --external-gateway public router1
openstack router add subnet router1 private_subnet

Confirm the network configuration by checking the network namespace

ip netns show

Step 5: Configure Cinder to use LVM

Configure Cinder to use the configured LVM volume.

$ sudo  vi /etc/cinder/cinder.conf
volume_clear = none


After the change, you need to restart the Cinder service.

sudo systemctl restart openstack-cinder-volume
sudo systemctl restart openstack-cinder-api

After the change, restart the Cinder service.

sudo systemctl restart openstack-cinder-volume
sudo systemctl restart openstack-cinder-api

Step 6: Create taste and security groups

Let’s add OpenStack style:

openstack flavor create --id 0 --ram 1024  --vcpus  1 --swap 2048  --disk 10    m1.tiny
openstack flavor create --id 1 --ram 2048  --vcpus  1 --swap 4096  --disk 20    m1.small
openstack flavor create --id 2 --ram 4096  --vcpus  2 --swap 8192  --disk 40    m1.medium
openstack flavor create --id 3 --ram 8192  --vcpus  4 --swap 8192  --disk 80    m1.large
openstack flavor create --id 4 --ram 16384 --vcpus  8 --swap 8192  --disk 160   m1.xlarge

And basic security groups

openstack security group create basic --description "Allow base ports"
openstack security group rule create --protocol TCP --dst-port 22 --remote-ip basic
openstack security group rule create --protocol TCP --dst-port 80 --remote-ip basic
openstack security group rule create --protocol TCP --dst-port 443 --remote-ip basic
openstack security group rule create --protocol ICMP --remote-ip basic

Step 7: Create private key and add Glance picture

Create a new key for your account or use an existing key.

$ ssh-keygen -q -N "" 
$ openstack keypair create --public-key=~/.ssh/ adminkey
| Field       | Value                                           |
| fingerprint | e4:00:26:64:1c:f7:20:06:d6:59:c6:31:20:53:59:c8 |
| name        | adminkey                                        |
| user_id     | 9f7d84c3014445e7aac3048c9a0fd856                |

For Glance images, please refer to our previous guide:

How to add Glance Cloud image to OpenStack

Step 8: Access the OpenStack dashboard

To access the OpenStack dashboard, browse to http://openstackip/dashboard.

Your login credentials are stored in keystonerc_admin The file is placed in your home directory.

$ grep OS_PASSWORD keystonerc_admin
export OS_PASSWORD='c11661db5ecf4ebd'

After logging in, you can start creating instances to work on your project. We have many OpenStack articles that you can use.

How to run CentOS 8 instance on OpenStack

How to rename an instance/server in OpenStack

How to adjust/expand the size of Cinder in OpenStack

How to assign a floating IP address to an instance in OpenStack

Create OpenStack instance with fixed/static IP address

How to create OpenStack projects, users and roles

How to adjust the size of OpenStack instance/virtual machine

You can support us by downloading this article in PDF format via the link below.

Download the guide in PDF format

turn off