OpenStack Liberty Lab Installation and Configuration Guide

rdo

Overview

In this article we will focus on installing and configuring OpenStack Liberty using RDO and the packstack installer. RDO is a community platform around Red Hat’s OpenStack Platform. It allows you to test the latest OpenStack capabilities on a stable platform such as Red Hat Enterprise Linux (RHEL) or CentOS. This guide will take you through installing the OpenStack Liberty release, configuring networking, security groups, flavors, images and are other OpenStack related services. The outcome is a working OpenStack environment based on the Liberty release that you can use as a baseline for testing your applications with OpenStack capabilities.

Install and Configure OpenStack Liberty

  • Install RHEL or CentOS 7.1.
  • Ensure name resolution is working.
# vi /etc/hosts
192.168.122.80 osp8.lab osp8
  • Set hostname.
# hostnamectl set-hostname osp8.lab.com
  • Disable firewalld since this is for a lab environment.
# systemctl disable firewalld
# systemctl stop firewalld
  • Disable NetworkManager, it is still not recommended for Liberty (at least RDO).
# systemctl stop NetworkManager
# systemctl disable NetworkManager
  • For RHEL systems register with subscription manager.
# subscription-manager register
# subscription-manager subscribe --auto
# subscription-manager repos --disable=*
# subscription-manager repos --enable=rhel-7-server-rpms
# subscription-manager repos --enable=rhel-7-server-extras-rpms 
# subscription-manager repos --enable=rhel-7-server-rh-common-rpms
# subscription-manager repos --enable=rhel-7-server-openstack-8-rpms
  • Install yum-utils and update the system.
# yum install -y yum-utils
# yum update -y
  • Reboot.
# systemctl reboot
  • Install packstack packages.
# yum install -y openstack-packstack

You can install packstack by providing command-line options or using the answers file.

Option 1: Install using command-line options

 # packstack --allinone --os-neutron-ovs-bridge-mappings=extnet:br-ex \
 --os-neutron-ovs-bridge-interfaces=br-ex:eth0 \
 --os-neutron-ml2-type-drivers=vxlan,flat \
 --os-heat-install=y --os-heat-cfn-install=y \
 --os-sahara-install=y --os-trove-install=y \
 --os-neutron-lbaas-install=y \
 --keystone-admin-passwd=redhat01

Option 2: Install using answers file

  • Create packstack answers file for customizing the installer.
# packstack --gen-answer-file /root/answers.txt
  • Update the packstack answers file and enable other OpenStack services. Note: as of the writing of this guide SSL is not working in combination with Horizon so don’t enable SSL.
# vi /root/answers.txt
 CONFIG_KEYSTONE_ADMIN_PW=redhat
 CONFIG_PROVISION_DEMO=n
 CONFIG_HEAT_INSTALL=y
 CONFIG_HEAT_CFN_INSTALL=y
 CONFIG_SAHARA_INSTALL=y
 CONFIG_TROVE_INSTALL=y
 CONFIG_CEILOMETER_INSTALL=y
 CONFIG_LBAAS_INSTALL=y
  • Install OpenStack Liberty using packstack.
# packstack --answer-file /root/answers.txt
  • Source the keystone admin profile.
# . /root/keystonerc_admin
  • Check status of openstack services.
# openstack-status
  • Backup the ifcfg-etho script.
# cp /etc/sysconfig/network-scripts/ifcfg-eth0 /root/
  • Configure external bridge for floating ip networks.
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
 DEVICE=eth0
 ONBOOT=yes
 TYPE=OVSPort
 DEVICETYPE=ovs
 OVS_BRIDGE=br-ex
# vi /etc/sysconfig/network-scripts/ifcfg-br-ex
 DEVICE=br-ex
 BOOTPROTO=static
 ONBOOT=yes
 TYPE=OVSBridge
 DEVICETYPE=ovs
 USERCTL=yes
 PEERDNS=yes
 IPV6INIT=no
 IPADDR=<www.xxx.yyy.zzz>
 NETMASK=255.255.255.0
 GATEWAY=<GW IP>
 DNS1=<DNS IP>
  • Add the eht0 physical interface to the br-ex bridge in openVswitch for floating IP networks.
# ovs-vsctl add-port br-ex eth0 ; systemctl restart network.service

Configure OpenStack

  • Create private network.
# neutron net-create private
# neutron subnet-create private 10.10.1.0/24 --name private_subnet --allocation-pool start=10.10.1.100,end=10.10.1.200
  • Create public network. Note: these steps assume the physical network connected to eth0 is 192.168.122.0/24.
# neutron net-create public --router:external
# neutron subnet-create public 192.168.122.0/24 --name public_subnet --allocation-pool start=192.168.122.100,end=192.168.122.200 --disable-dhcp --gateway 192.168.122.1
  • Add a new router and configure router interfaces.
# neutron router-create router1 --ha False
# neutron router-gateway-set router1 public
# neutron router-interface-add router1 private_subnet
  • Upload a glance image. In this case we will use a Cirros image because it is small and thus good for testing OpenStack.
# yum install -y wget
# wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
# glance image-create --name "Cirros 0.3.4" --disk-format qcow2 --container-format bare --visibility public --file /root/cirros-0.3.4-x86_64-disk.img
  • Create a new m1.nano flavor for running Cirros image.
# nova flavor-create m1.nano 42 64 0 1
  • Create security group and allow all TCP ports.
# nova secgroup-create all "Allow all tcp ports"
# nova secgroup-add-rule all TCP 1 65535 0.0.0.0/0
  • Create security group for base access
# nova secgroup-create base "Allow Base Access"
# nova secgroup-add-rule base TCP 22 22 0.0.0.0/0
# nova secgroup-add-rule base TCP 80 80 0.0.0.0/0
# nova secgroup-add-rule base ICMP -1 -1 0.0.0.0/0
  • Create a private ssh key for connecting to instances remotely.
# nova keypair-add admin
  • Create admin.pem file and add private key from output of keypair-add command.
# vi /root/admin.pem
# chmod 400 /root/admin.pem
  • List the network IDs.
# neutron net-list
 +--------------------------------------+---------+-------------------------------------------------------+
 | id | name | subnets |
 +--------------------------------------+---------+-------------------------------------------------------+
 | d4f3ed19-8be4-4d56-9f95-cfbac9fdf670 | private | 92d82f53-6e0b-4eef-b8b9-cae32cf40457 10.10.1.0/24     |
 | 37c024d6-8108-468c-bc25-1748db7f5e8f | public  | 22f2e901-186f-4041-ad93-f7b5ccc30a81 192.168.122.0/24 |
  • Start an instance and make sure to replace network id from above command.
# nova boot --flavor m1.nano --image "Cirros 0.3.4" --nic net-id=92d82f53-6e0b-4eef-b8b9-cae32cf40457 --key-name admin --security-groups all mycirros
  • Create a floating IP and assign it to the mycirros instance.
# nova floating-ip-create
# nova floating-ip-associate mycirros <FLOATING IP>
  • Connect to mycirros instance using the private ssh key stored in the admin.pem file. Note: The first floating IP in the range 192.168.122.201.
# ssh -i admin.pem cirros@192.168.122.201

Nova Nested Virtualization

Most OpenStack Lab or test environments will install OpenStack on a hypervisor platform inside virtual machines. I would strongly recommend KVM. If you are running OpenStack on KVM (Nova nested virtualization) make sure to follow these tips and tricks to get the best performance.

Summary

This article was intended as a hands on guide for standing up an OpenStack Liberty lab environment using RDO. As mentioned RDO is a stable community platform built around Red Hat’s OpenStack Platform. It provides the ability to test the latest OpenStack features against either an enterprise platform (RHEL) or community platform (CentOS). Hopefully you found the information in this article useful. If you have anything to add or feedback, feel free to leave your comments.

Happy OpenStacking!

(c) 2016 Keith Tenzer

 

 

 

 

 

9 thoughts on “OpenStack Liberty Lab Installation and Configuration Guide

  1. Awesome instructions Keith! I would like to add that for people trying to install this on vmware VMs, make sure your network is all configured to ‘accept Promiscuous Mode’ or else you’ll be banging your head on the wall. Once I did that, I could ssh into my cirros instance from a remote host.

    Like

    • I have run “packstack –gen-answer-file /root/answers.txt” many, many times and never seen this issue so maybe this is a problem specific to your environment? Are you using CentOS or RHEL?

      Like

  2. Hi Keith,
    My set-up requirements is somewhat different. I need to separate the overlay tunnel network and the management network. I don’t care about floating ip(external connectivity network).
    My question: Is there a config option in the packstack answer key file for providing the the tunnel network details ?

    Like

  3. Hi Ktenzer,

    I have installed Openstack Mitaka byh following this article and it works great. However Im having issues with Ceilometer meters and alarms. Openstack is only showing meter-list for glance images. Here is the output I get when i run ceilometer meter-list:

    [root@Controller1 ~(keystone_admin)]# ceilometer meter-list
    +—————-+——-+——+————————————–+———————————-+———————————-+
    | Name | Type | Unit | Resource ID | User ID | Project ID |
    +—————-+——-+——+————————————–+———————————-+———————————-+
    | image.download | delta | B | 3b3a858f-3ea2-4d6a-b6be-94a505106674 | 0784f68cd8a54a479b1d2512dfd26f54 | 964dda554286432c9465e1fd539ab40c |
    | image.serve | delta | B | 3b3a858f-3ea2-4d6a-b6be-94a505106674 | 0784f68cd8a54a479b1d2512dfd26f54 | 964dda554286432c9465e1fd539ab40c |
    | image.size | gauge | B | 3b3a858f-3ea2-4d6a-b6be-94a505106674 | 0784f68cd8a54a479b1d2512dfd26f54 | 964dda554286432c9465e1fd539ab40c |
    +—————-+——-+——+————————————–+———————————-+———————————-+

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s