Openstack installation guide using packstack CentOS 7. Step by step installation guide of packstack using packstack in RHEL or CentOS 7 Linux. Openstack installation guide multi node in CentOS 7.Openstack installation guide single node on CentOS 7. Step by step guide for openstack installation using packstack on CentOS 7 or RHEL 7 Linux server. Openstack installation using packstack answer file on CentOS/RHEL Linux.

 

Step-by-Step OpenStack installation guide using Packstack (RHEL/CentOS 7)

 

In my earlier articles I shared the steps to bring up an openstack environment using tripleo deployment with an undercloud and overcloud. You should use tripleo deployment if you wish to bring up a multi node openstack environment. Although even with packstack you can bring up a multi node openstack deployment with two or more compute node but you cannot have more than one controller node when installing openstack using packstack. In this article I will share step by step installation Guide of OpenStack using packstack tool on Red Hat Enterprise Linux (RHEL 7). Packstack is a utility that uses puppet modules to deploy various parts of OpenStack on multiple pre-installed servers over SSH automatically

 

What is OpenStack?

OpenStack project, which is also called a cloud operational system, consists of a number of different projects developing separate subsystems. Any OpenStack installation can include only a part of them. Some subsystems can even be used separately or as part of any other OpenSource project. Their number is increasing from version to version of OpenStack project, both through the appearance of new ones and the functionality split of the existing ones. For example, nova-volume service was extracted as a separate Cinder project.

Make sure the hypervisor is enabled and supported on your blade

# grep -E ' svm | vmx' /proc/cpuinfo

You should see svm or vmx among the flags supported by the processor. Also if you execute the command:

# lsmod | grep kvm
kvm_intel 143187 3
kvm 455843 1 kvm_intel

or

# lsmod | grep kvm
kvm_amd 60314 3
kvm 461126 1 kvm_amd

you should see two kernel modules loaded in the memory. The kvm is the module independent of the vendor, and the kvm_intel or kvm_amd executes VT-x or AMD-V functionality, respectively

 

Download Links for OpenStack Distributions

Red Hat OpenStack Platform (60-day trial)
https://www.redhat.com/en/insights/openstack

RDO by Red Hat
https://www.rdoproject.org/

Mirantis OpenStack
https://www.mirantis.com/products/mirantis-openstacksoftware/

Ubuntu OpenStack
http://www.ubuntu.com/cloud/openstack

SUSE OpenStack Cloud (60-day trial)
https://www.suse.com/products/suse-openstack-cloud/

 

OpenStack installation guide using Packstack (RHEL/CentOS)

Packstack provides an easy way to deploy an OpenStack Platform environemnt on one or several machines because it is customizable through a answer file, which contains a set of parameters that allows custom configuration of underlying Openstack platform service.

 

What is Answer File?

Packstack provides by default an answer file template that deploys an all in one environment. When you run the packstack command non-interactively you must provide your configuration options via a text file, referred to as an answer file, instead of via standard input.

 

Step 1: Bring UP the physical host server

Firstly you need a base server on which you will create your entire Openstack cloud for which I have bought my server with RHEL 7.4

My setup detail

physical node details for openstack step by step installation

 

NOTE:
I have written another article with step by step guide for RHEL 7 Installation
Step by Step Red Hat Linux 7.0 installation (64 bit) with screenshots

 

  • Next login to your server and register it with Red Hat Subscription
  • Install Virtual Machine Manager (if not already installed) using the “Application Installer”
  • Next start creating your virtual machines as described in below chapters

 

Step 2: Configure BIND DNS Server

A DNS server is needed before configuring your openstack setup.

NOTE:
I have written another article which you can follow to set up a DNS server.
Step by Step tutorial guide to configure BIND DNS server in chroot environment for Red Hat (RHEL/CentOS) 7

Below are my sample configuration files

# cd /var/named/chroot/var/named

Forward zone configuration file for the controller and compute nodes

# cat example.zone
$TTL 1D
@       IN SOA  example. root (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@               IN NS   example.
                IN A    127.0.0.1
                IN A    10.43.138.12
openstack       IN A    10.43.138.12
controller      IN A    192.168.122.49
compute         IN A    192.168.122.215
compute-rhel    IN A    192.168.122.13
controller-rhel IN A    192.168.122.12

First reverse zone file for my physical host server hosting OpenStack

# cat example.rzone
$TTL 1D
@       IN SOA  example. root.example. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@       IN NS   example.
        IN A    127.0.0.1
        IN PTR  localhost.
12      IN PTR  openstack.example.

Second reverse zone file for controller and compute node

# cat openstack.rzone
$TTL 1D
@       IN SOA  example. root.example. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@       IN NS   example.
        IN A    127.0.0.1
        IN PTR  localhost.
49      IN PTR  controller.example.
215     IN PTR  compute.example.
12      IN PTR  controller-rhel.example.
13      IN PTR  compute-rhel.example.

Below content added in named.rfc1912.zones

zone "example" IN {
        type master;
        file "example.zone";
        allow-update { none; };
};

zone "138.43.10.in-addr.arpa" IN {
        type master;
        file "example.rzone";
        allow-update { none; };
};

zone "122.168.192.in-addr.arpa" IN {
        type master;
        file "openstack.rzone";
        allow-update { none; };
};

 

Step 3: Bring UP Compute VM

One of the basic services is OpenStack Compute (Nova). This service is installed on all cluster computer
nodes. It manages the level of abstraction of virtual equipment (processors, memory, block devices, network
adapters). Nova provides the management of instances of virtual machines addressing the hypervisor and
giving such commands as it is launching and stopping.

 

My setup detail

compute node details

NOTE:
The storage space used by an instance will be under /var/lib/glance due to which any partition used by /var must have some free storage space for an instance to be created. Below is my setup snippet
[[email protected] ~]# lvs
  LV   VG   Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  home rhel -wi-ao---- 134.49g
  root rhel -wi-ao----  50.00g
  swap rhel -wi-ao----  14.50g

[[email protected] ~]# pvs
  PV         VG   Fmt  Attr PSize    PFree
  /dev/vda2  rhel lvm2 a--  <199.00g 4.00m

[[email protected] ~]# vgs
  VG   #PV #LV #SN Attr   VSize    VFree
  rhel   1   3   0 wz--n- <199.00g 4.00m

[[email protected] ~]# df -h
Filesystem             Size  Used Avail Use% Mounted on
/dev/mapper/rhel-root   50G  2.3G   48G   5% /
devtmpfs                15G     0   15G   0% /dev
tmpfs                   15G     0   15G   0% /dev/shm
tmpfs                   15G   17M   15G   1% /run
tmpfs                   15G     0   15G   0% /sys/fs/cgroup
/dev/vda1             1014M  131M  884M  13% /boot
/dev/mapper/rhel-home  135G   33M  135G   1% /home
tmpfs                  2.9G     0  2.9G   0% /run/user/0

[[email protected] ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:             28           0          26           0           1          27
Swap:            14           0          14

 

Pre-requisite

Disable and stop the below services using the commands as shown

# systemctl stop NetworkManager
# systemctl disable NetworkManager

# systemctl stop firewalld
# systemctl disable firewalld

# systemctl restart network
# systemctl enable network

Register and subscribe to the necessary Red Hat channels as done for controller

# subscription-manager register

Find the entitlement pool for Red Hat Enterprise Linux OpenStack Platform in the output of the following command:

# subscription-manager list --available --all

Use the pool ID located in the previous step to attach the Red Hat Enterprise Linux OpenStack Platform entitlements:

# subscription-manager attach --pool=POOL_ID

Disable all the repos

# subscription-manager repos --disable=*

Next enable all the needed repos for openstack installation

# subscription-manager repos --enable=rhel-7-server-rh-common-rpms
Repository 'rhel-7-server-rh-common-rpms' is enabled for this system.

# subscription-manager repos --enable=rhel-7-server-openstack-8-rpms
Repository 'rhel-7-server-openstack-8-rpms' is enabled for this system.

# subscription-manager repos --enable=rhel-7-server-extras-rpms
Repository 'rhel-7-server-extras-rpms' is enabled for this system.

# subscription-manager repos --enable=rhel-7-server-rpms
Repository 'rhel-7-server-rpms' is enabled for this system.

 

Enable below repository on CentOS 7 for openstack installation

# yum install -y https://rdoproject.org/repos/rdo-release.rpm

Next install the openstack repository by installing the below rpm

# yum install -y centos-release-openstack-stein

Make sure the repository is enabled:

# yum-config-manager --enable openstack-stein

 

Step 4: Bring UP Controller VM

The Controller node is where most of the shared OpenStack services and other tools run. It supplies API, scheduling, and other shared services for the cloud.

I have already shared the configuration for my Virtual Machine. Since controller node will only host important openstack services hence we do not need too assign too much resource to this node.

My setup details

controller node details

NOTE:
I will also create an additional volume group “cinder-volumes” to be used by the CINDER service. So make sure when you are creating the controller node, create one additional volume-group “cinder-volumes” with enough space, for me I have given 100GB which will be used for adding additional volume when launching Instance.

Below is my setup snippet

[[email protected] ~]# pvs
  PV         VG             Fmt  Attr PSize    PFree
  /dev/vda3  rhel           lvm2 a--   <38.52g   <7.69g
  /dev/vdb1  cinder-volumes lvm2 a--  <100.00g <100.00g

[[email protected] ~]# vgs
  VG             #PV #LV #SN Attr   VSize    VFree
  cinder-volumes   1   0   0 wz--n- <100.00g <100.00g
  rhel             1   2   0 wz--n-  <38.52g   <7.69g

[[email protected] ~]# lvs
  LV     VG   Attr       LSize  Pool   Origin Data%  Meta%  Move Log Cpy%Sync Convert
  pool00 rhel twi-aotz-- 30.79g               15.04  11.48
  root   rhel Vwi-aotz-- 30.79g pool00        15.04

[[email protected] ~]# free -g
              total        used        free      shared  buff/cache   available
Mem:              9           2           4           0           3           7
Swap:             0           0           0

 

Pre-requisite

Disable and stop the below services using the commands as shown

# systemctl stop NetworkManager
# systemctl disable NetworkManager

# systemctl stop firewalld
# systemctl disable firewalld

# systemctl restart network
# systemctl enable network

Register your server

# subscription-manager register

Find the entitlement pool for Red Hat Enterprise Linux OpenStack Platform in the output of the following command:

# subscription-manager list --available --all

Use the pool ID located in the previous step to attach the Red Hat Enterprise Linux OpenStack Platform entitlements so that your system can access all the required rpms from the respective pool:

# subscription-manager attach --pool=POOL_ID

Disable all the repos

# subscription-manager repos --disable=*

For openstack installation enable the below repositories on RHEL server(for this article I will be using openstack-8)

# subscription-manager repos --enable=rhel-7-server-rh-common-rpms
Repository 'rhel-7-server-rh-common-rpms' is enabled for this system.

# subscription-manager repos --enable=rhel-7-server-openstack-8-rpms
Repository 'rhel-7-server-openstack-8-rpms' is enabled for this system.

# subscription-manager repos --enable=rhel-7-server-extras-rpms
Repository 'rhel-7-server-extras-rpms' is enabled for this system.

# subscription-manager repos --enable=rhel-7-server-rpms
Repository 'rhel-7-server-rpms' is enabled for this system.

Next install the packstack tool

# yum install -y openstack-packstack

Next generate your answer file /root/answers.txt and view the resulting file

# packstack --gen-answer-file ~/answer-file.txt

Now we are ready to create and modify our answers file to deploy openstack services on our controller and compute node

 

Step 5: Create answers file and Install Openstack

Below are the changes which I have done for my setup.

custom answer file for packstack

Next execute the packstack utility on the controller using the syntax as shown below

[[email protected] ~]# packstack --answer-file /root/answers.txt
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20180707-225026-DOdBB6/openstack-setup.log

Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                    [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Adding pre install manifest entries                  [ DONE ]
Installing time synchronization via NTP              [ DONE ]
Setting up CACERT                                    [ DONE ]
Adding AMQP manifest entries                         [ DONE ]
Adding MariaDB manifest entries                     [ DONE ]
Adding Apache manifest entries                       [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Adding Keystone manifest entries                     [ DONE ]
Adding Glance Keystone manifest entries              [ DONE ]
Adding Glance manifest entries                       [ DONE ]
Adding Cinder Keystone manifest entries              [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Adding Cinder manifest entries                       [ DONE ]
Adding Nova API manifest entries                     [ DONE ]
Adding Nova Keystone manifest entries                [ DONE ]
Adding Nova Cert manifest entries                    [ DONE ]
Adding Nova Conductor manifest entries               [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Adding Nova Compute manifest entries                 [ DONE ]
Adding Nova Scheduler manifest entries               [ DONE ]
Adding Nova VNC Proxy manifest entries               [ DONE ]
Adding OpenStack Network-related Nova manifest entries[ DONE ]
Adding Nova Common manifest entries                  [ DONE ]
Adding Neutron VPNaaS Agent manifest entries         [ DONE ]
Adding Neutron FWaaS Agent manifest entries          [ DONE ]
Adding Neutron LBaaS Agent manifest entries          [ DONE ]
Adding Neutron API manifest entries                  [ DONE ]
Adding Neutron Keystone manifest entries             [ DONE ]
Adding Neutron L3 manifest entries                   [ DONE ]
Adding Neutron L2 Agent manifest entries             [ DONE ]
Adding Neutron DHCP Agent manifest entries           [ DONE ]
Adding Neutron Metering Agent manifest entries       [ DONE ]
Adding Neutron Metadata Agent manifest entries       [ DONE ]
Adding Neutron SR-IOV Switch Agent manifest entries  [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Adding OpenStack Client manifest entries             [ DONE ]
Adding Horizon manifest entries                      [ DONE ]
Adding post install manifest entries                 [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.122.13_prescript.pp
Applying 192.168.122.12_prescript.pp
192.168.122.13_prescript.pp:                         [ DONE ]
192.168.122.12_prescript.pp:                         [ DONE ]
Applying 192.168.122.13_chrony.pp
Applying 192.168.122.12_chrony.pp
192.168.122.13_chrony.pp:                            [ DONE ]
192.168.122.12_chrony.pp:                            [ DONE ]
Applying 192.168.122.12_amqp.pp
Applying 192.168.122.12_mariadb.pp
192.168.122.12_amqp.pp:                              [ DONE ]
192.168.122.12_mariadb.pp:                           [ DONE ]
Applying 192.168.122.12_apache.pp
192.168.122.12_apache.pp:                            [ DONE ]
Applying 192.168.122.12_keystone.pp
Applying 192.168.122.12_glance.pp
Applying 192.168.122.12_cinder.pp
192.168.122.12_keystone.pp:                          [ DONE ]
192.168.122.12_cinder.pp:                            [ DONE ]
192.168.122.12_glance.pp:                            [ DONE ]
Applying 192.168.122.12_api_nova.pp
192.168.122.12_api_nova.pp:                          [ DONE ]
Applying 192.168.122.12_nova.pp
Applying 192.168.122.13_nova.pp
192.168.122.12_nova.pp:                              [ DONE ]
192.168.122.13_nova.pp:                              [ DONE ]
Applying 192.168.122.13_neutron.pp
Applying 192.168.122.12_neutron.pp
192.168.122.12_neutron.pp:                           [ DONE ]
192.168.122.13_neutron.pp:                           [ DONE ]
Applying 192.168.122.12_osclient.pp
Applying 192.168.122.12_horizon.pp
192.168.122.12_osclient.pp:                          [ DONE ]
192.168.122.12_horizon.pp:                           [ DONE ]
Applying 192.168.122.13_postscript.pp
Applying 192.168.122.12_postscript.pp
192.168.122.12_postscript.pp:                        [ DONE ]
192.168.122.13_postscript.pp:                        [ DONE ]
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]
 **** Installation completed successfully ******
Additional information:
 * File /root/keystonerc_admin has been created on OpenStack client host 192.168.122.12. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://192.168.122.12/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * The installation log file is available at: /var/tmp/packstack/20180707-225026-DOdBB6/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20180707-225026-DOdBB6/manifests

If everything goes nice then you should see all GREEN and at the end of you will get the link to your dashboard. So this means our openstack installation is complete.

NOTE:
However you can rerun PackStack with option -d if you need to update the configuration.

Install openstack-utils to check the status of all the openstack services

# yum -y install openstack-utils

Next check the status

[[email protected] ~]# openstack-status
== Nova services ==
openstack-nova-api:                     active
openstack-nova-cert:                    active
openstack-nova-compute:                 inactive  (disabled on boot)
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-conductor:               active
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     inactive  (disabled on boot)
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     active
neutron-l3-agent:                       active
neutron-metadata-agent:                 active
neutron-openvswitch-agent:              active
== Cinder services ==
openstack-cinder-api:                   active
openstack-cinder-scheduler:             active
openstack-cinder-volume:                active
openstack-cinder-backup:                inactive  (disabled on boot)
== Support services ==
mysqld:                                 unknown
libvirtd:                               active
openvswitch:                            active
dbus:                                   active
target:                                 active
rabbitmq-server:                        active
memcached:                              active
== Keystone users ==
Warning keystonerc not sourced

 

Step 6: Source keystonerc file

Now after the openstack installation, next you can source your keystoncerc file to get more detailed list of openstack-service status. This keystonerc file will be available at the home folder of the root user as shown below:

[[email protected] ~]# ls -l keystonerc_admin
-rw-------. 1 root root 229 Jul  7 22:57 keystonerc_admin
[[email protected] ~]# pwd
/root

[[email protected] ~]# source keystonerc_admin

Next check the status of openstack installation using packstack again

[[email protected] ~(keystone_admin)]# openstack-status
== Nova services ==
openstack-nova-api:                     active
openstack-nova-cert:                    active
openstack-nova-compute:                 inactive  (disabled on boot)
openstack-nova-network:                 inactive  (disabled on boot)
openstack-nova-scheduler:               active
openstack-nova-conductor:               active
== Glance services ==
openstack-glance-api:                   active
openstack-glance-registry:              active
== Keystone service ==
openstack-keystone:                     inactive  (disabled on boot)
== Horizon service ==
openstack-dashboard:                    active
== neutron services ==
neutron-server:                         active
neutron-dhcp-agent:                     active
neutron-l3-agent:                       active
neutron-metadata-agent:                 active
neutron-openvswitch-agent:              active
== Cinder services ==
openstack-cinder-api:                   active
openstack-cinder-scheduler:             active
openstack-cinder-volume:                active
openstack-cinder-backup:                inactive  (disabled on boot)
== Support services ==
mysqld:                                 unknown
libvirtd:                               active
openvswitch:                            active
dbus:                                   active
target:                                 active
rabbitmq-server:                        active
memcached:                              active
== Keystone users ==
+----------------------------------+---------+---------+-------------------+
|                id                |   name  | enabled |       email       |
+----------------------------------+---------+---------+-------------------+
| e97f18a9994e4b99bcc0e6fe8db95cd3 |  admin  |   True  |   [email protected]  |
| dccbaca5e2ee4866b343573678ec3bf7 |  cinder |   True  |  [email protected] |
| 7dec80c93f8a4aafa1559a59e6bf606c |  glance |   True  |  [email protected] |
| 778e4fbefdfa4329bf9b7143ce6ffe74 | neutron |   True  | [email protected] |
| e3d85ca8a8bb4ba5a9457712ce5814f5 |   nova  |   True  |   [email protected]  |
+----------------------------------+---------+---------+-------------------+
== Glance images ==
+----+------+
| ID | Name |
+----+------+
+----+------+
== Nova managed services ==
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary           | Host                   | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+
| 1  | nova-consoleauth | controller-rhel.example| internal | enabled | up    | 2018-07-07T18:02:59.000000 | -               |
| 2  | nova-scheduler   | controller-rhel.example| internal | enabled | up    | 2018-07-07T18:03:00.000000 | -               |
| 3  | nova-conductor   | controller-rhel.example| internal | enabled | up    | 2018-07-07T18:03:01.000000 | -               |
| 4  | nova-cert        | controller-rhel.example| internal | enabled | up    | 2018-07-07T18:02:57.000000 | -               |
| 5  | nova-compute     | compute-rhel.example   | nova     | enabled | up    | 2018-07-07T18:03:04.000000 | -               |
+----+------------------+------------------------+----------+---------+-------+----------------------------+-----------------+
== Nova networks ==
+----+-------+------+
| ID | Label | Cidr |
+----+-------+------+
+----+-------+------+
== Nova instance flavors ==
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name      | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1  | m1.tiny   | 512       | 1    | 0         |      | 1     | 1.0         | True      |
| 2  | m1.small  | 2048      | 20   | 0         |      | 1     | 1.0         | True      |
| 3  | m1.medium | 4096      | 40   | 0         |      | 2     | 1.0         | True      |
| 4  | m1.large  | 8192      | 80   | 0         |      | 4     | 1.0         | True      |
| 5  | m1.xlarge | 16384     | 160  | 0         |      | 8     | 1.0         | True      |
+----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
== Nova instances ==
+----+------+--------+------------+-------------+----------+
| ID | Name | Status | Task State | Power State | Networks |
+----+------+--------+------------+-------------+----------+
+----+------+--------+------------+-------------+----------+

So as you see it gives me a detailed status of all the openstack services.

So now our openstack installation is complete using packstack and we can see our services are also up and running properly. Finally now you can login to the horizon dashboard.

openstack horizon dashboard

 

Lastly I hope the steps from the article with the step by step openstack installation guide using packstack on RHEL/CentOS 7 Linux was helpful. So, let me know your suggestions and feedback using the comment section.

 

Leave a Reply

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