How to build an OpenStack Host

Reading Time: 3 minutes

OpenStack is a fantastic open source cloud computing platform that allows you to create your own scalable infrastructure-as-as-service (IAAS) solution.

This is a guide of how to install the OpenStack virtual cloud platform on the CentOS7 Operating system. It will work on Red Hat (RHEL), SUSE and Ubuntu.

I will be using Centos 7 core which is the minimal installation of CentOS.

This guide will show you how to provision 3 OpenStack Hosts, install and build an OpenStack private cloud. It will also show you the basics of using OpenStack and the initial configuration tasks needed to get it working.

In this guide, I will be using Hyper-V to create the host.

Step 1 – Create 3 Virtual Hosts in your Hypervisor

As this isn’t a guide of how to use Hyper-V I will assume you know how to create a VM in Hyper-V. It is unlikely you would be looking into OpenStack if you were unsure how to provision a VM.

My Hosts have the following Configuration

  • Host1, 4vCPU, 8GB RAM
  • Host2, 8vCPU, 8GB RAM
  • Host3, 8vCPU, 8GB RAM

All hosts have 50GB SSD System drives and host 2 and 3 have 500GB HDD storage each

This guide will focus on installing Host3 as the primary openstack node. In later blogs I will add host 1 and host 2 to the Openstack farm.

Step 2 – Install CentOS on your 3 servers

How to Install CentOS 7? Again, I will assume you already have experience of deploying your Operating System. 

Step 3 – Preparing the Operating System

There are a number of changes that need to be made to prepare the hosts. You cannot simply install OpenStack it will fail.

It is highly recommended to run a yum update to ensure your server is patched to the very latest level

yum update -y

Step 4 – Configure Network Manager

systemctl stop postfix firewalld NetworkManager
systemctl disable postfix firewalld NetworkManager
systemctl mask NetworkManager
yum remove postfix NetworkManager NetworkManager-libnm

Step 5 – Configure SELINUX

Next we need to configure SELINUX settings

navigate to the SELINUX= Section and change to disabled

setenforce 0

Step 6 – Next install NTP

yum install ntpdate -y

Step 7 – Add the Openstack Repo and install pre-reqs

Now add the repo for OpenStack

yum install -y

Next Install Openstack-Rocky

yum install -y centos-release-openstack-rocky -y

Now update Yum

yum -y update

Step 8 – Install and Configure PackStack

Next Prepare packstack – This does puppet, ssh connections -builds openstack

yum install openstack-packstack -y

Once completed you need to Generate an answer file

packstack --gen-answer-file=XXXXX-answer-file.conf

(replace XXXXX with whatever you want to call your answer file)

Now we need to edit the answer file

You do this by

nano XXXXX-answer-file.conf

Locate the CONFIG_KEYSTONE_ADMIN_PW and change it to a password of your choice

Next choose your NTP server. I am using UK CONFIG_NTP_SERVERS

Next Edit the MARIADB configuration

Locate CONFIG_MARIADB_PW and create your own password

Step 9 – Configures SSHD

Next Permit root logins

nano /etc/ssh/sshd_config

Permit root logins by uncommenting the hashtag

PermitRootLogin yes

Restart SSHD

systemctl restart sshd

Step 10 – Now use packstack to build OpenStack

packstack --answer-file <xxxxx>-answer-file.conf

Puppet takes a long time to build Openstack.

Openstack, How to build an OpenStack Host

Openstack is a vast product which has a huge amount options, this blog will show you how to set up an Openstack host which is the first step needed to create your own Cloud solution.

All your Openstack configuration files are stored in cat /root/keystonerc_admin

Follow the on screen instructions to browse to your OpenStack dashboard

Openstack, How to build an OpenStack Host
Openstack, How to build an OpenStack Host

You may also like...

Leave a Reply

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