OpenStack Queens deployment using packstack on single VM

Dear friends, in this tutorial we will see OpenStack Queens deployment using packstack on single VM. Packstack is a command-line utility tools that rapidly deploys OpenStack. Packstack deployments are intended only for POC-type testing environments and are not suitable for production.

Prerequisites

  • Update /etc/hosts file

We need to be configured /etc/hosts file according to our hostname and IP like below:-

cat /etc/hosts
10.203.134.35 helmet helmet.localdomain
  • Set hostname
hostnamectl set-hostname helmet
  • Configure proxy for download packages

We need to be add proxy details to download packages. We can add proxy details in .bashrc file. Like below:-

vi ~/.bashrc (add below lines)
export http_proxy=http://proxy-IP:port
export https_proxy=https://proxy-IP:port
export no_proxy=localhost,helmet,127.0.0.0/8,10.203.134.35,10.203.134.0/25

source ~/.bashrc
  • Update your centos VM using yum
yum update -y
yum install -y centos-release-openstack-queens
yum install yum-utils -y
yum-config-manager --enable openstack-queens
yum update –y
  • Stop native firewall and network-manager v
systemctl disable firewalld
systemctl stop firewalld
systemctl disable NetworkManager
systemctl stop NetworkManager
systemctl enable network
systemctl start network
  • Now we need to be change our management port settings. Like below:-
[root@helmet ~]# ifconfig
ens160: flags=4163 mtu 1500
inet 10.203.134.35 netmask 255.255.255.128 broadcast 10.203.134.127
inet6 fe80::250:56ff:fe87:391c prefixlen 64 scopeid 0x20
ether 00:50:56:87:39:1c txqueuelen 1000 (Ethernet)
RX packets 119353 bytes 172989797 (164.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 71971 bytes 6050675 (5.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 9905  bytes 4049636 (3.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9905  bytes 4049636 (3.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • Edit this file /etc/sysconfig/network-scripts/ifcfg-ens160 and add this line NM_CONTROLLED=no and save the file . Like below:-
# cat /etc/sysconfig/network-scripts/ifcfg-ens160
TYPE=Ethernet
NM_CONTROLLED=no
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens160
UUID=969802f8-bebf-413b-b6d2-3701bd0e6de7
DEVICE=ens160
ONBOOT=yes
IPADDR=10.203.134.35
GATEWAY=10.203.134.1
NETMASK=255.255.255.128
  • Reboot your VM

Now we need to be reboot our VM to reflect these all the changes.

Packstack Installation

Now we can install packstack utility tool using yum.

yum install -y openstack-packstack
yum install -y screen

Packstack answer file (installation config file)

•CONFIG_PROVISION_DEMO=y => CONFIG_PROVISION_DEMO=n

packstack --gen-answer-file=/root/answer.txt 

Now we need to change below parameters in answer.txt file

We can disable the Demo project configuration like below:-

CONFIG_PROVISION_DEMO=y => CONFIG_PROVISION_DEMO=n 

We can add the heat component in the installation like below:-

CONFIG_HEAT_INSTALL=n => CONFIG_HEAT_INSTALL=y  

Openstack Installation

We need to be run this setup in screen utility to avoid any disconnection the installation. The below command will start a screen session which is independent of your console.

screen –S mypackstack_installation  

Now start the packstack command with the modified answer.txt file.

OpenStack Queens
packstack --answer-file=/root/answer.txt > 

Now our OpenStack Queens installation will be started. This will take more time to complete. You can now detach from the screen session and back to your console using below steps:-

ctrl+a and press d

To reattach to that screen session we can use below step.

screen -r mypackstack_installation

Now we will see successfully installation. Like below:-

Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20180620-140309-GPwXNU/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pu

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 ]
Preparing pre-install entries                        [ DONE ]
Setting up CACERT                                    [ DONE ]
Preparing AMQP entries                               [ DONE ]
Preparing MariaDB entries                            [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries                           [ DONE ]
Preparing Glance entries                             [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries                             [ DONE ]
Preparing Nova API entries                           [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Preparing Nova Compute entries                       [ DONE ]
Preparing Nova Scheduler entries                     [ DONE ]
Preparing Nova VNC Proxy entries                     [ DONE ]
Preparing OpenStack Network-related Nova entries     [ DONE ]
Preparing Nova Common entries                        [ DONE ]
Preparing Neutron LBaaS Agent entries                [ DONE ]
Preparing Neutron API entries                        [ DONE ]
Preparing Neutron L3 entries                         [ DONE ]
Preparing Neutron L2 Agent entries                   [ DONE ]
Preparing Neutron DHCP Agent entries                 [ DONE ]
Preparing Neutron Metering Agent entries             [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Preparing OpenStack Client entries                   [ DONE ]
Preparing Horizon entries                            [ DONE ]
Preparing Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]

Applying 10.203.134.35_controller.pp
10.203.134.35_controller.pp:                          [ DONE ]
Applying 10.203.134.35_network.pp
10.203.134.35_network.pp:                             [ DONE ]
Applying 10.203.134.35_compute.pp
10.203.134.35_compute.pp:                             [ DONE ]
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

**** Installation completed successfully ******

Additional information:
*A new answerfile was created in: /root/packstack-answers-20180620-140310.txt
*Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components
*File /root/keystonerc_admin has been created on OpenStack client host 10.203.134.35. To use the command line tools you need to source the file.
*To access the OpenStack Dashboard browse to http://10.203.134.35/dashboard .
*Please, find your login credentials stored in the keystonerc_admin in your home directory.
*Because of the kernel update the host 10.203.134.35 requires reboot.
*The installation log file is available at: /var/tmp/packstack/20180620-140309-GPwXNU/openstack-setup.log
*The generated manifests are available at: /var/tmp/packstack/20180620-140309-GPwXNU/manifests

Access OpenStack Queens via command line

To access the OpenStack cli, you need to authentication details of the user. By default packstack will create a source file with the generated authentication details at /root/keystonerc_admin

You need to source it to gain access over openstack.

source /root/keystonerc_admin

Verify OpenStack Queens installation

You can verify the running openstack process like below.

[root@helmet ~(keystone_admin)]# systemctl list-unit-files | grep openstack
openstack-aodh-api.service disabled
openstack-aodh-evaluator.service enabled
openstack-aodh-listener.service enabled
openstack-aodh-notifier.service enabled
openstack-ceilometer-central.service enabled
openstack-ceilometer-ipmi.service disabled
openstack-ceilometer-notification.service enabled

Access OpenStack Queens via browser (horizon)

Now we can access our openstak dashboard using our IP like below:-

http://10.203.134.35/dashboard/auth/login/?next=/dashboard/

That’s all we have successfully installed OpenStack Queens using packstack.

If you want to create a flavor in OpenStack, you can check below link.

How to create flavor in openstack using CLI

This Post Has 3 Comments

  1. Stephen Jeanty

    Indeed this is a nice article.

  2. oprolevorter

    Spot on with this write-up, I really assume this web site needs much more consideration. I’ll in all probability be once more to learn far more, thanks for that info.

  3. online loans with monthly payments for bad credit

    Don’t ever quit moving. Goals!

Leave a Reply