You can support us by downloading this article as PDF from the Link below. Download the guide as PDF

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:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20hostnamectl%20set-hostname%20controller%0A”/]

Check hostname:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20hostnamectl%20%0A%C2%A0%C2%A0%20Static%20hostname%3A%20controller%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20Icon%20name%3A%20computer-vm%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20Chassis%3A%20vm%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20Machine%20ID%3A%2034da37da2c2b404adbed16ea2273bc28%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20Boot%20ID%3A%20913135b537654e80924466455a73f558%0A%C2%A0%C2%A0%C2%A0%20Virtualization%3A%20kvm%0A%C2%A0%20Operating%20System%3A%20CentOS%20Linux%207%20(Core)%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20CPE%20OS%20Name%3A%20cpe%3A%2Fo%3Acentos%3Acentos%3A7%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20Kernel%3A%20Linux%203.10.0-327.el7.x86_64%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20Architecture%3A%20×86-64″/]

  • Set timezone

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20timedatectl%20list-timezones%20%0A%5Broot%40controller%20~%5D%23%20timedatectl%20set-timezone%20Africa%2FNairobi”/]

Check timezone:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20timedatectl%20%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20Local%20time%3A%20Mon%202016-03-28%2015%3A27%3A41%20EAT%0A%C2%A0%20Universal%20time%3A%20Mon%202016-03-28%2012%3A27%3A41%20UTC%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20RTC%20time%3A%20Mon%202016-03-28%2012%3A27%3A41%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20Time%20zone%3A%20Africa%2FNairobi%20(EAT%2C%20%2B0300)%0A%C2%A0%C2%A0%C2%A0%C2%A0%20NTP%20enabled%3A%20yes%0ANTP%20synchronized%3A%20yes%0A%C2%A0RTC%20in%20local%20TZ%3A%20no”/]

  • Configure ip address information:

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

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20ip%20addr%0A1%3A%20lo%3A%20%3CLOOPBACK%2CUP%2CLOWER_UP%3E%20mtu%2065536%20qdisc%20noqueue%20state%20UNKNOWN%20%0A%C2%A0%C2%A0%C2%A0%20link%2Floopback%2000%3A00%3A00%3A00%3A00%3A00%20brd%2000%3A00%3A00%3A00%3A00%3A00%0A%C2%A0%C2%A0%C2%A0%20inet%20127.0.0.1%2F8%20scope%20host%20lo%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20valid_lft%20forever%20preferred_lft%20forever%0A%C2%A0%C2%A0%C2%A0%20inet6%20%3A%3A1%2F128%20scope%20host%20%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20valid_lft%20forever%20preferred_lft%20forever%0A2%3A%20eth0%3A%20%3CBROADCAST%2CMULTICAST%2CUP%2CLOWER_UP%3E%20mtu%201500%20qdisc%20pfifo_fast%20state%20UP%20qlen%201000%0A%C2%A0%C2%A0%C2%A0%20link%2Fether%2052%3A54%3A00%3Ac7%3A82%3A36%20brd%20ff%3Aff%3Aff%3Aff%3Aff%3Aff%0A%C2%A0%C2%A0%C2%A0%20inet%20192.168.122.230%2F24%20brd%20192.168.122.255%20scope%20global%20dynamic%20eth0%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20valid_lft%203266sec%20preferred_lft%203266sec%0A%C2%A0%C2%A0%C2%A0%20inet6%20fe80%3A%3A5054%3Aff%3Afec7%3A8236%2F64%20scope%20link%20%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20valid_lft%20forever%20preferred_lft%20forever%0A3%3A%20eth1%3A%20%3CBROADCAST%2CMULTICAST%2CUP%2CLOWER_UP%3E%20mtu%201500%20qdisc%20pfifo_fast%20state%20UP%20qlen%201000%0A%C2%A0%C2%A0%C2%A0%20link%2Fether%2052%3A54%3A00%3A84%3Ae2%3A6c%20brd%20ff%3Aff%3Aff%3Aff%3Aff%3Aff%0A%C2%A0%C2%A0%C2%A0%20inet%20192.168.1.60%2F24%20brd%20192.168.1.255%20scope%20global%20eth1%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20valid_lft%20forever%20preferred_lft%20forever%0A%C2%A0%C2%A0%C2%A0%20inet6%20fe80%3A%3A5054%3Aff%3Afe84%3Ae26c%2F64%20scope%20link%20%0A%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%C2%A0%20valid_lft%20forever%20preferred_lft%20forever”/]

Then set ip related information:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20vim%20%2Fetc%2Fsysconfig%2Fnetwork-scripts%2Fifcfg-eth1%0A%23%23%20My%20configurations%0ATYPE%3DEthernet%0ABOOTPROTO%3Dnone%0ADEFROUTE%3Dyes%0APEERDNS%3Dyes%0APEERROUTES%3Dyes%0AIPV4_FAILURE_FATAL%3Dno%0ANAME%3Deth1%0AUUID%3Dcfb13441-b545-46e6-b7c8-0275872c8f2b%0ADEVICE%3Deth1%0AONBOOT%3Dyes%0AIPADDR%3D192.168.1.60%0AGATEWAY%3D192.168.1.1%0ANETMASK%3D255.255.255.0%0ANM_CONTROLLED%3Dno”/]

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

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%C2%A0%5Broot%40controller%20~%5D%23%20uuidgen%20eth1%0Ae956aa35-91b2-4425-95cf-8f088e89c8c6%0A”/]

Change settings according to your requirements, then restart networking:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20systemctl%20disable%20NetworkManager%0A%5Broot%40controller%20~%5D%23%20systemctl%20stop%20NetworkManager%20%0A%5Broot%40controller%20~%5D%23%20systemctl%20restart%20network.service%C2%A0″/]

Install Prerequisites:

  1. Add Repos

Epel repo:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20rpm%20-Uvh%20https%3A%2F%2Fdl.fedoraproject.org%2Fpub%2Fepel%2Fepel-release-latest-7.noarch.rpm%0AOpenstack%20Liberty%20repo%3A%0A%5Broot%40controller%20~%5D%23%20wget%20https%3A%2F%2Fwww.rdoproject.org%2Frepos%2Frdo-release.rpm%0A%5Broot%40controller%20~%5D%23%20rpm%20-Uvh%20rdo-release.rpm”/]

  1. Setup Environment

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20cat%20%3E%20%2Fetc%2Fenvironment%20%3C%3CEFO%0ALANG%3Den_US.utf-8%0ALC_ALL%3Den_US.utf-8%0AEFO”/]

  1. Install required prerequisite Packages:

Do system update:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20update%20-y%0A”/]

Install NTP service:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20chrony%0A”/]

Install Openssh clients:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20openssh-clients%0A”/]

Install Rsync:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20rsync%0A”/]

Install KVM:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20libvirt%20qemu-kvm%20bridge-utils%20virt-install%0A”/]

MariaDB Database server:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20mariadb-server%0A%5Broot%40controller%20~%5D%23%20sed%20-i%20%22%2F%5Bmysqld%5D%24%2Fa%20character-set-server%20%3D%20utf8%22%20%2Fetc%2Fmy.cnf%0A%5Broot%40controller%20~%5D%23%20sed%20-i%20%22%2F%5Bmysqld%5D%24%2Fa%20collation-server%20%3D%20utf8_general_ci%22%20%2Fetc%2Fmy.cnf%0A%5Broot%40controller%20~%5D%23%20sed%20-i%20%22%2F%5Bmysqld%5D%24%2Fa%20init-connect%20%3D%20’SET%20NAMES%20utf8’%22%20%2Fetc%2Fmy.cnf”/]

Install RabbitMQ:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20rabbitmq-server%0A%23%20Change%20Rabbitmq%20password%0A%5Broot%40controller%20~%5D%23%20rabbitmqctl%20change_password%20guest%20new-password%0A”/]

Install Memcached :

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20memcached%0A”/]

Install httpd

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20httpd%20mod_wsgi%0A”/]

Install MongoDB:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20mongodb-server%20mongodb%0A”/]

Start all the services:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20systemctl%20start%20mariadb.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20start%20libvirtd.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20start%20chronyd.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20start%20rabbitmq-server.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20start%20memcached.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20start%20httpd.service”/]

Set all services above to start at boot:

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20systemctl%20enable%20mariadb.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20enable%20libvirtd.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20enable%20chronyd.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20enable%20rabbitmq-server.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20enable%20memcached.service%0A%5Broot%40controller%20~%5D%23%20systemctl%20enable%20httpd.service”/]

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

[pastacode lang=”bash” message=”” highlight=”” provider=”manual” manual=”%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20net-tools%0A%5Broot%40controller%20~%5D%23%20yum%20-y%20install%20bash-completion%C2%A0″/]

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

Openstack Liberty Lab PART TWO: Install Openstack Packages

You can support us by downloading this article as PDF from the Link below. Download the guide as PDF