Intro

Building an Openstack environment can be a daunting, error riddled process. To help alleviate this pain the RDO project provides an "easy button" to install Openstack in an all in one VM for testing purposes called Packstack.

RDO is the community supported distribution of Openstack for RHEL-based platforms. At the time of writing The Packstack installer is based on the Pike release of Openstack.

Environment

I will be utilizing Vagrant to build a Centos 7 VM to install Openstack with Packstack. Initially, I built this lab to follow along with the excellent book by James Denton Openstack Networking Essentials so the environment is loosley based on that.

blog/openstack-packstack-install/packstack-vm.svg

For reference, the software used in this lab is as follows:

  • Ubuntu - 1604 (Host OS)
  • Libvirt - 1.3.1
  • Vagrant - 2.0.1
  • Centos - 7 Minimal (Guest OS)
  • Openstack - Pike

Vagrantfile

The following Vagrantfile can be used to build the VM with the vagrant-libvirt provider.

file
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure(2) do |config|

  config.vm.define "rdo" do |node|
    node.vm.hostname = "rdo"
    node.vm.box = "centos/7"
    node.vm.synced_folder ".", "/vagrant", disabled: true
    node.ssh.insert_key = false

    node.vm.provider :libvirt do |domain|
      domain.memory = 8192
      domain.cpus = 2
    end

    # Additional Interfaces
    node.vm.network :"private_network",
      :libvirt__network_name => "os-data",
      :libvirt__forward_mode => "none",
      :dhcp_enabled => false,
      :ip => '10.254.254.100',
      :libvirt__netmask => '255.255.255.0'

    node.vm.network :"private_network",
      :libvirt__network_name => "os-mgmt",
      :libvirt__forward_mode => "none",
      :dhcp_enabled => false,
      :ip => '169.254.169.254',
      :libvirt__netmask => '255.255.255.255'

  end

end

Install

Set your locale settings in the /etc/environment file.

file
# /etc/environment

LANG=en_US.utf-8
LC_ALL=en_US.utf-8

Stop and disable firewalld .

cmd
sudo systemctl disable firewalld
sudo systemctl stop firewalld

Stop and disable NetworkManager .

cmd
sudo systemctl disable NetworkManager
sudo systemctl stop NetworkManager

Start and enable network .

cmd
sudo systemctl enable network
sudo systemctl start network

Install the depenencies.

cmd
sudo yum install -y centos-release-openstack-pike
sudo yum update -y
sudo yum install -y openstack-packstack

Create an answers.cfg file with the following contents.

file
# answers.cfg

[general]

# Generic config options
CONFIG_UNSUPPORTED=n
CONFIG_DEBUG_MODE=n
CONFIG_PROVISION_DEMO=n

# Default password to be used everywhere
CONFIG_DEFAULT_PASSWORD=openstack

#Install the following services
CONFIG_MARIADB_INSTALL=y
CONFIG_GLANCE_INSTALL=y
CONFIG_NOVA_INSTALL=y
CONFIG_NEUTRON_INSTALL=y
CONFIG_HORIZON_INSTALL=y
CONFIG_CLIENT_INSTALL=y

# Configure networking
EXCLUDE_SERVERS=
CONFIG_NTP_SERVERS=
CONFIG_CONTROLLER_HOST=10.254.254.100
CONFIG_COMPUTE_HOSTS=10.254.254.100
CONFIG_NETWORK_HOSTS=10.254.254.100
CONFIG_MARIADB_HOST=10.254.254.100
CONFIG_AMQP_HOST=10.254.254.100
CONFIG_STORAGE_HOST=10.254.254.100
CONFIG_SAHARA_HOST=10.254.254.100
CONFIG_KEYSTONE_LDAP_URL=ldap://10.254.254.100
CONFIG_MONGODB_HOST=10.254.254.100
CONFIG_REDIS_HOST=10.254.254.100

# Configure Neutron
CONFIG_NEUTRON_L3_EXT_BRIDGE=provider
CONFIG_NEUTRON_ML2_MECHANISM_DRIVERS=openvswitch
CONFIG_NEUTRON_ML2_VLAN_RANGES=
CONFIG_NEUTRON_L2_AGENT=openvswitch
CONFIG_NEUTRON_ML2_TYPE_DRIVERS=vxlan,flat
CONFIG_NEUTRON_ML2_FLAT_NETWORKS=*
CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=physnet1:br-ex
CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:eth2

#Do not install the following services
CONFIG_CINDER_INSTALL=n
CONFIG_MANILA_INSTALL=n
CONFIG_SWIFT_INSTALL=n
CONFIG_CEILOMETER_INSTALL=n
CONFIG_HEAT_INSTALL=n
CONFIG_SAHARA_INSTALL=n
CONFIG_TROVE_INSTALL=n
CONFIG_IRONIC_INSTALL=n
CONFIG_NAGIOS_INSTALL=n
CONFIG_VMWARE_BACKEND=n

Install Packstack using the answers.cfg file.

cmd
sudo packstack --answer-file=answers.cfg

# output

Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20180108-202416-is4yF6/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pub

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 ]
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 Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 10.254.254.100_controller.pp
10.254.254.100_controller.pp:                        [ DONE ]
Applying 10.254.254.100_network.pp
10.254.254.100_network.pp:                           [ DONE ]
Applying 10.254.254.100_compute.pp
10.254.254.100_compute.pp:                           [ DONE ]
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

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

Additional information:
* 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.254.254.100. To use the command line tools you need to source the file.
* To access the OpenStack Dashboard browse to http://10.254.254.100/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
* Because of the kernel update the host 10.254.254.100 requires reboot.
* The installation log file is available at: /var/tmp/packstack/20180108-202416-is4yF6/openstack-setup.log
* The generated manifests are available at: /var/tmp/packstack/20180108-202416-is4yF6/manifests

The install takes about 30 minutes so grab a covfefe, when the install is complete reboot the VM.

Verification

Once the VM has rebooted, browse to the Horizon dashboard at http://10.254.254.100/dashboard and login with the username: admin and password openstack .

blog/openstack-packstack-install/openstack-login.png
blog/openstack-packstack-install/horizon-dashboard.png

Outro

Packstack is a nice way to install the community supported version of Openstack for RHEL-based systems with minimal fuss.