Hi all. I’ve decided to put together Openstack Lab guide for those who would like to test and learn about Openstack Cloud Computing platform. This is part one of Openstack Lab guide.
In this guide, we’ll go through process of Setting up networking, Configuring hostname, installing any necessary software package needed for smooth running of Openstack. If you’re new to Openstack don’t worry since we’ll go step by step to get Openstack running on your Home Lab.
I recommend you do this on a Laptop, computer or any server with at least 4GB ram, 4 virtual cpu cores and 30 GB free hard disk space. This Lab guide is done on host Machine running CentOS 7.2. You can do this on KVM guest CentOS 7.x server, all you have to do is make sure you’ve KVM nested virtualization enabled.
NOTE: If you’re using CentOS 7 server running on Hypervisor, i recommend you use KVM. If you run on hypervisor like VirtualBox, you’ll default to using QEMU as compute driver and performance won’t be appealing.KVM supports nested virtualization hence you’ll get good performance when launching/running Nova Virtual Machines.
See tutorial below on how to enable nested virtualization for KVM.

Complete Installation of KVM,QEMU and Virt Manager on Arch Linux and Manjaro

Since this is a all in one installation, we’ll run all Openstack services on single node.The services we’ll install and configure throughout this series include:

  1. Openstack OpenStack Identity (keystone) Service
  2. OpenStack Image Service ( Glance) Service
  3. OpenStack Compute Service (Nova)
  4. OpenStack Dashboard (Horizon) Service
  5. OpenStack Network (Neutron) Service
  6. OpenStack Block Storage (Cinder) Service
  7. OpenStack Object Storage (Swift) Service
  8. OpenStack Orchestration Service (Heat) Service
  9. OpenStack Metering Service (Ceilometer) Service

I assume you already have installed CentOS 7.x server. I have a good tutorial on:

Top Things to do after fresh installation of CentOS 7 minimal

  • The first step is to configure hostname:
[[email protected] ~]# hostnamectl set-hostname controller

Check hostname:

[[email protected] ~]# hostnamectl 
   Static hostname: controller
         Icon name: computer-vm
           Chassis: vm
        Machine ID: 34da37da2c2b404adbed16ea2273bc28
           Boot ID: 913135b537654e80924466455a73f558
    Virtualization: kvm
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-327.el7.x86_64
      Architecture: x86-64
  • Set timezone
[[email protected] ~]# timedatectl list-timezones 
[[email protected] ~]# timedatectl set-timezone Africa/Nairobi

Check timezone:

[[email protected] ~]# timedatectl 
      Local time: Mon 2016-03-28 15:27:41 EAT
  Universal time: Mon 2016-03-28 12:27:41 UTC
        RTC time: Mon 2016-03-28 12:27:41
       Time zone: Africa/Nairobi (EAT, +0300)
     NTP enabled: yes
NTP synchronized: yes
 RTC in local TZ: no
  • Configure ip address information:

Let’s now configure ip address for our server. First check interface name that you’ll configure:

[[email protected] ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:c7:82:36 brd ff:ff:ff:ff:ff:ff
    inet brd scope global dynamic eth0
       valid_lft 3266sec preferred_lft 3266sec
    inet6 fe80::5054:ff:fec7:8236/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:84:e2:6c brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::5054:ff:fe84:e26c/64 scope link 
       valid_lft forever preferred_lft forever

Then set ip related information:

[[email protected] ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1
## My configurations

If you copied configuration and would like to change uuid, generate new uuid using uuidgen tool:

 [[email protected] ~]# uuidgen eth1

Change settings according to your requirements, then restart networking:

[[email protected] ~]# systemctl disable NetworkManager
[[email protected] ~]# systemctl stop NetworkManager 
[[email protected] ~]# systemctl restart network.service 

Install Prerequisites:

  1. Add Repos

Epel repo:

[[email protected] ~]# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Openstack Liberty repo:
[[email protected] ~]# wget https://www.rdoproject.org/repos/rdo-release.rpm
[[email protected] ~]# rpm -Uvh rdo-release.rpm
  1. Setup Environment
[[email protected] ~]# cat > /etc/environment <<EFO
  1. Install required prerequisite Packages:

Do system update:

[[email protected] ~]# yum update -y

Install NTP service:

[[email protected] ~]# yum -y install chrony

Install Openssh clients:

[[email protected] ~]# yum -y install openssh-clients

Install Rsync:

[[email protected] ~]# yum -y install rsync

Install KVM:

[[email protected] ~]# yum -y install libvirt qemu-kvm bridge-utils virt-install

MariaDB Database server:

[[email protected] ~]# yum -y install mariadb-server
[[email protected] ~]# sed -i "/[mysqld]$/a character-set-server = utf8" /etc/my.cnf
[[email protected] ~]# sed -i "/[mysqld]$/a collation-server = utf8_general_ci" /etc/my.cnf
[[email protected] ~]# sed -i "/[mysqld]$/a init-connect = 'SET NAMES utf8'" /etc/my.cnf

Install RabbitMQ:

[[email protected] ~]# yum -y install rabbitmq-server
# Change Rabbitmq password
[[email protected] ~]# rabbitmqctl change_password guest new-password

Install Memcached :

[[email protected] ~]# yum -y install memcached

Install httpd

[[email protected] ~]# yum -y install httpd mod_wsgi

Install MongoDB:

[[email protected] ~]# yum -y install mongodb-server mongodb

Start all the services:

[[email protected] ~]# systemctl start mariadb.service
[[email protected] ~]# systemctl start libvirtd.service
[[email protected] ~]# systemctl start chronyd.service
[[email protected] ~]# systemctl start rabbitmq-server.service
[[email protected] ~]# systemctl start memcached.service
[[email protected] ~]# systemctl start httpd.service

Set all services above to start at boot:

[[email protected] ~]# systemctl enable mariadb.service
[[email protected] ~]# systemctl enable libvirtd.service
[[email protected] ~]# systemctl enable chronyd.service
[[email protected] ~]# systemctl enable rabbitmq-server.service
[[email protected] ~]# systemctl enable memcached.service
[[email protected] ~]# systemctl enable httpd.service

Install net-tools package and bash-completion if you don’t have them:

[[email protected] ~]# yum -y install net-tools
[[email protected] ~]# yum -y install bash-completion 

We’re done with Part 1, in part two, we’ll cover installation of Openstack Packages:

Openstack Liberty Lab PART TWO: Install Openstack Packages

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here