Openstack Liberty Lab Part 1: Setting up the network and all prerequisites

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

Hello everyone. I decided to organize the Openstack Lab guide for those who want to test and understand the Openstack Cloud Computing platform. This is part of the Openstack Lab guide. In this guide, we will cover the process of setting up the network, configuring the hostname, and installing any necessary software packages needed for Openstack to run smoothly. If you are new to Openstack, please don’t worry, because we will guide Openstack to run in your home lab step by step. I recommend you to do this on a laptop, computer or any server with at least 4GB of RAM, 4 virtual cpu cores and 30 GB of available hard disk space. This lab guide was completed on a host running CentOS 7.2. You can do this on a KVM guest CentOS 7.x server, all you have to do is to ensure that KVM nested virtualization is enabled. Note: If you are using a CentOS 7 server running on Hypervisor, I suggest you use KVM. If you are running on a hypervisor such as VirtualBox, QEMU is used as the computing driver by default, so the performance will not be very attractive. KVM supports nested virtualization, so it will get good performance when starting/running the Nova virtual machine. Please refer to the tutorial below to learn how to enable nested virtualization for KVM.

Completely install KVM, QEMU and Virt Manager on Arch Linux and Manjaro

Since this is a one-stop installation, we will run all Openstack services on a single node. The services that will be installed and configured in this series include:

  1. Openstack OpenStack identity (critical) service
  2. OpenStack Image Service (Overview) Service
  3. OpenStack Computing Service (Nova)
  4. OpenStack dashboard (Horizo​​n) service
  5. OpenStack network (Neutron) service
  6. OpenStack block storage (Cinder) service
  7. OpenStack Object Storage (Fast) Service
  8. OpenStack Orchestration Service (Hot) Service
  9. OpenStack metering service (ceilometer) service

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

The main things to do after a fresh installation of CentOS 7 Minimum

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

Check the host name:

[[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 time zone
[[email protected] ~]# timedatectl list-timezones 
[[email protected] ~]# timedatectl set-timezone Africa/Nairobi

Check the time zone:

[[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:

Now, configure the IP address for our server. First check the name of the interface to be configured:

[[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 the configuration and want to change the uuid, please use the uuidgen tool to generate a new uuid:

 [[email protected] ~]# uuidgen eth1

Change the settings according to your requirements and restart the network:

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

Installation prerequisites:

  1. Add repo

Epel repurchase:

[[email protected] ~]# rpm -Uvh
Openstack Liberty repo:
[[email protected] ~]# wget
[[email protected] ~]# rpm -Uvh rdo-release.rpm
  1. Set the environment
[[email protected] ~]# cat > /etc/environment <<EFO
  1. Install the necessary prerequisite packages:

Do system updates:

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

Install NTP service:

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

Install the Openssh client:

[[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 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 the above services to start at startup:

[[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

If not, please install the net-tools package and bash-completion:

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

We have completed the first part of the work, in the second part, we will introduce the installation of the Openstack package: Part 2:

Openstack Liberty Lab Part 2: Install the Openstack software package

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose