OpenStack is a very powerful, and widely adopted solution used to deploy infrastructure resources within the shortest time possible similar to commercially available cloud environments. The software production is managed by Openstack foundation, with the support of thousands of community developers and users. Openstack can control large pools of networking, compute, and storage resources distributed across multiple systems in an efficient manner. OpenStack remains an essential technology to many organisations since applications still need an infrastructure to run on.
This article will be our first series on the installation of OpenStack on Rocky Linux 8 system. The same process should work on AlmaLinux 8 systems, and any other RHEL 8 based system. In this first part we shall install and configure MariaDB database server, NTP server, RabbitMQ and Memcached.
After completing the steps in this guide, open the link given at the end to access the content needed for the next actions. If you prefer an easier method for an all-in-one setup check out our RDP Packstack guide:
Step 1: Update System
Put SELinux in Permissive mode if this is allowed in your Infrastructure
sudo setenforce 0
sudo sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/selinux/configEnsure the system has been updated and is working fine.
sudo dnf -y updateInstall basic management utilities
sudo dnf -y install git tmux vim wget curl bash-completionAfter system updated let’s reboot it.
sudo rebootStep 2: Install MariaDB database server
We’ll install the latest stable release of MariaDB database server using the steps shared below.
Download installer script to your system.
curl -LsS -O https://downloads.mariadb.com/MariaDB/mariadb_repo_setupExecute the script after download to configure MariaDB repository.
sudo bash mariadb_repo_setupDisable and reset MariaDB AppStream module
sudo dnf -qy module disable mariadb
sudo dnf module reset mariadb -yExecute the following commands to install MariaDB server and client packages.
sudo dnf install vim MariaDB-server MariaDB-client MariaDB-backup -yIncrease database maximum connections to accommodate OpenStack requirements.
sudo tee /etc/my.cnf.d/openstack.cnf<<EOF
[mysqld]
max_connections=600
EOFStart and enable mariadb database service
sudo systemctl enable --now mariadbConfirm status is running
$ systemctl status mariadb
● mariadb.service - MariaDB 10.9.3 database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
Drop-In: /etc/systemd/system/mariadb.service.d
└─migrated-from-my.cnf-settings.conf
Active: active (running) since Wed 2022-10-19 22:50:46 EAT; 17s ago
Docs: man:mariadbd(8)
https://mariadb.com/kb/en/library/systemd/
Process: 9131 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 9107 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=`cd /usr/bin/..; /usr/bin/galera_recovery`; [ $? -eq 0 ] && systemctl set-environment _WSREP_START_POSIT>
Process: 9105 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Main PID: 9117 (mariadbd)
Status: "Taking your SQL requests now..."
Tasks: 14 (limit: 408287)
Memory: 82.9M
CGroup: /system.slice/mariadb.service
└─9117 /usr/sbin/mariadbd
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: 2022-10-19 22:50:46 0 [Note] InnoDB: File './ibtmp1' size is now 12.000MiB.
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: 2022-10-19 22:50:46 0 [Note] InnoDB: log sequence number 46590; transaction id 14
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: 2022-10-19 22:50:46 0 [Note] Plugin 'FEEDBACK' is disabled.
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: 2022-10-19 22:50:46 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: 2022-10-19 22:50:46 0 [Note] Server socket created on IP: '0.0.0.0'.
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: 2022-10-19 22:50:46 0 [Note] Server socket created on IP: '::'.
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: 2022-10-19 22:50:46 0 [Note] InnoDB: Buffer pool(s) load completed at 221019 22:50:46
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: 2022-10-19 22:50:46 0 [Note] /usr/sbin/mariadbd: ready for connections.
Oct 19 22:50:46 osp01.home.cloudlabske.io mariadbd[9117]: Version: '10.9.3-MariaDB' socket: '/var/lib/mysql/mysql.sock' port: 3306 MariaDB Server
Oct 19 22:50:46 osp01.home.cloudlabske.io systemd[1]: Started MariaDB 10.9.3 database server.Secure your database server
$ sudo mariadb-secure-installation
Switch to unix_socket authentication [Y/n] n
Change the root password? [Y/n] y
Remove anonymous users? [Y/n] y
Disallow root login remotely? [Y/n] y
Remove test database and access to it? [Y/n] y
Reload privilege tables now? [Y/n] yIf this will be OpenStack Controller and other server connect to this database then allow the port in the firewall.
sudo firewall-cmd --add-service=mysql --permanent
sudo firewall-cmd --reload --permanentStep 3: Install and Configure NTP Server
Set your server hostname correctly
sudo hostnamectl set-hostname osp01.home.cloudlabske.ioSet correct timezone
sudo timedatectl set-timezone Africa/NairobiEnsure chrony package is installed
sudo dnf -y install chronyEnable chronyd service
sudo systemctl enable --now chronydConfirm service status using the commands:
systemctl status chronyd.serviceNext do initial time sync to confirm this works.
$ sudo chronyc sources
MS Name/IP address Stratum Poll Reach LastRx Last sample
===============================================================================
^- time.cloudflare.com 3 6 17 48 +225us[ +225us] +/- 77ms
^- 41.175.51.165 2 6 17 50 -3294us[-3005us] +/- 67ms
^- time.cloudflare.com 3 6 17 50 +345us[ +663us] +/- 77ms
^* ntp0.icolo.io 2 6 17 50 +48us[ +385us] +/- 11msEnable network time synchronization using hostnamectl
timedatectl set-ntp yesList your settings
$ timedatectl
Local time: Wed 2022-10-19 23:00:14 EAT
Universal time: Wed 2022-10-19 20:00:14 UTC
RTC time: Wed 2022-10-19 20:00:14
Time zone: Africa/Nairobi (EAT, +0300)
System clock synchronized: yes
NTP service: active
RTC in local TZ: noStep 4: Enable required repositories
As of the time this article is updated, the latest OpenStack release is Yoga. If you need more details on this OpenStack release refer to its official documentation.
Install Openstack repository on Rocky server by running the commands shared below.
sudo dnf -y install https://repos.fedorapeople.org/repos/openstack/openstack-yoga/rdo-release-yoga-1.el8.noarch.rpmEnable PowerTools repository as well.
sudo dnf config-manager --set-enabled powertoolsConfirm the repository has been added and usable on the system.
$ sudo dnf repolist
repo id repo name
advanced-virtualization CentOS-8 - Advanced Virtualization
appstream Rocky Linux 8 - AppStream
baseos Rocky Linux 8 - BaseOS
centos-nfv-openvswitch CentOS-8 - NFV OpenvSwitch
centos-rabbitmq-38 CentOS-8 - RabbitMQ 38
ceph-pacific CentOS-8 - Ceph Pacific
extras Rocky Linux 8 - Extras
mariadb-main MariaDB Server
mariadb-maxscale MariaDB MaxScale
mariadb-tools MariaDB Tools
openstack-yoga OpenStack Yoga Repository
powertools Rocky Linux 8 - PowerToolsCheck if there are any updated to be applied.
sudo dnf update -yStep 5: Install RabbitMQ, Memcached, and Nginx
Install RabbitMQ and Memcached packages on the system.
sudo dnf install rabbitmq-server nginx-mod-stream memcachedAccept to proceed with package installation.
Transaction Summary
======================================================================================================================================================================================================
Install 115 Packages
Total download size: 70 M
Installed size: 153 M
Is this ok [y/N]: yUpdate Memcached Listen address
sudo sed -i 's/127.0.0.1,::1/0.0.0.0,::/g' /etc/sysconfig/memcachedBackup default Nginx configuration file.
sudo mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.origCreate a new configuration file using the contents provided here.
$ sudo vim /etc/nginx/nginx.conf
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
worker_connections 1024;
}
http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
include /etc/nginx/conf.d/*.conf;
}Enable and start RabbitMQ, Memcached, and Nginx services
sudo systemctl enable --now rabbitmq-server memcached nginxCheck above services current status:
systemctl status rabbitmq-server memcached nginxAllow memcache and rabbitmq services access in your firewalld. This should not be performed in Public IP setup, use firewalld rich rules for this.
sudo firewall-cmd --add-service=memcache --permanent
sudo firewall-cmd --add-port=5672/tcp --permanent
sudo firewall-cmd --reloadStep 6: Add OpenStack Rabbitmq user
Add an openstack user on RabbitMQ. We’re adding a user called openstack with the password OpenStackMQPassw0rd
sudo rabbitmqctl add_user openstack OpenStackMQPassw0rdGrant privileges to the user created
sudo rabbitmqctl set_permissions openstack ".*" ".*" ".*"This marks the end of our first article on OpenStack installation and configurations on Rocky Linux 8 servers. Proceed to next part using the link below.




























































