How to Build an OpenStack Lab using RDO Packstack

How to Build an OpenStack Lab using RDO Packstack

Introduction

If you look at the market around OpenStack distro's it can be daunting, there are many flavours, that all look to do the same thing - automate the installation of OpenStack and ease the tweaking of the nerd knobs.

In my quest to find a suitable OpenStack distro that would allow me to 1) install on top of VMs 2) easy to reconfigure for future dev projects 3) setup OVS without too much fuss - I found the following non-commercial projects:

Project Description Caveat
RDO Triple-O OpenStack On OpenStack, maintained by Redhat. Uses PXE to deploy to baremetal servers. Voodoo can be used to mimic PXE and IPMI networks to deploy to VMs.
OpenStack Ansible OSAD (OpenStack Ansible Deployment). Maintained by the good folks at Rackspace. The standard deployment is based on Linux Bridge, documentation around using OVS is limited. As the controllers use LXC containers, customizations aren't always the easiest.
OpenStack Kolla OpenStack built using Docker containers. Great distro, though to reconfigure for future projects work is required to build out containers etc. Sounds fun, but with limited time, it is one for the future.
DevStack Dev OpenStack distro Wouldn't bother, buggy and not stable, even for a dev platform..

This left me with one distro - RDO Packstack. Packstack provides a distro for dev/PoC based deployments, no containers insight, and also a nice set of command line options to use in its deployment. Niiice.

Let's install...

Environment

The following environment will be based upon 2 virtual machines (each machine consisting of 2 NICs):

  • 1 x Controller
  • 1 x Compute

With regards to the resources and IPs, please see below:

Hostname External IP vCPU RAM HDD
Controller01 172.29.236.180/24 2 16Gb 40Gb
Compute01 172.29.236.181/24 2 16Gb 40Gb

packstack2
Figure 1: Topology

Disable NetworkManager/Firewalld

Next, disable NetworkManager and Firewalld on each node.

sudo systemctl disable firewalld
sudo systemctl stop firewalld
sudo systemctl disable NetworkManager
sudo systemctl stop NetworkManager
sudo systemctl enable network
sudo systemctl start network

Install CentOS7

On each server install CentOS7.
Then configure the interfaces using the settings shown below:

Controller

/etc/sysconfig/network-scripts/ifcfg-ens192 
DEVICE=ens192 
NAME=ens192 
ONBOOT=yes 
BOOTPROTO=none 
IPADDR=172.29.236.180 
PREFIX=24 
GATEWAY=172.29.236.1 

/etc/sysconfig/network-scripts/ifcfg-ens224 
DEVICE=ens224 
NAME=ens224 
ONBOOT=yes 
BOOTPROTO=none 
IPADDR=192.168.80.180 
PREFIX=24

Compute01

/etc/sysconfig/network-scripts/ifcfg-ens192 
DEVICE=ens192 
NAME=ens192 
ONBOOT=yes 
BOOTPROTO=none 
IPADDR=172.29.236.181 
PREFIX=24 
GATEWAY=172.29.236.1 

/etc/sysconfig/network-scripts/ifcfg-ens224 
DEVICE=ens224 
NAME=ens224 
ONBOOT=yes 
BOOTPROTO=none 
IPADDR=192.168.80.181 
PREFIX=24

Once the interfaces have been configured run,

/etc/init.d/networking restart

Install Repos

On each server run the commands,

yum update -y ; yum install openssh-server vim -y

Next, we install the dependencies upon the controller node. Like so,

sudo yum install -y centos-release-openstack-ocata
sudo yum-config-manager --enable openstack-ocata
sudo yum update -y
sudo yum install -y openstack-packstack

Deploy OpenStack

Finally, we run the following command on the controller to deploy our OpenStack environment. This command will configure some key parameters, that you should be aware of. They are:

  • The VLAN network type will be mapped to ens192.
  • The VLAN range will be between 50-70 for the VLAN network type.
  • The VLAN mapped name is physnet1.
  • The VXLAN network type will be mapped to ens224.
packstack  -d  \
          --install-hosts=172.29.236.180,172.29.236.181 \
          --provision-demo=n \
          --os-neutron-ml2-type-drivers=vxlan,vlan \
          --os-neutron-ml2-tenant-network-types=vxlan    \
          --os-neutron-ml2-vlan-ranges=physnet1:50:70    \
          --os-neutron-ml2-vni-ranges=5000:6000               \
          --os-neutron-ovs-bridge-mappings=physnet1:br-vlan   \
          --os-neutron-l3-ext-bridge=provider              \
          --os-neutron-ovs-bridge-interfaces=br-vlan:ens192    \
          --os-neutron-ovs-bridges-compute=br-vlan \
          --os-neutron-ovs-tunnel-if=ens224

Subscribe to our newsletter and stay updated.

Don't miss anything. Get all the latest posts delivered straight to your inbox.
Great! Check your inbox and click the link to confirm your subscription.
Error! Please enter a valid email address!