태그 보관물: openstack

Red Hat Enterprise Linux OpenStack Platform 4 Installation with Packstack

There are many ways to install/deploy OpenStack but it looks rare to use packstack for Red Hat Enterprise Linux OpenStack Platform(hereafter RHEL OSP) 4 Havana. For my personal test, I used packstack to install RHEL OSP4 and it just took about 30 minutes. How easy it is.

Here is my target architecture.
rhel_osp4_target_architecture

  • 1 x Control Node : Keystone, Glance, Cinder, Neutron, Heat (No Swift)
  • 2 x Compute Nodes : Nova

 

Preparation

  • 3 Physical Machines or 3 Virtual Machines (KVM Nested)
  • Red Hat Enterprise Linux 6.5 ISO
  • Red Hat Enterprise Linux OpenStack Platform 4

It is always true that more physical machines can give you more chance to know about OpenStack, so I would like to recommend you to have more machine as many as possible. However, it is also enough to install RHEL OSP 4 on Nested KVM VMs to taste it.

I am not going to describe 1) Hardware or Nested KVM preparation and 2) RHEL 6.5 installation. Since RHEL OSP 4 was released after RHEL 6.5, RHEL 6.5 needs to be updated to the latest versions.

 

Configure the Control Node

I didn’t use a external DNS server so put all hostname into /etc/hosts file.

# vi /etc/hosts
192.168.30.40    control.osp4.example.com  control
192.168.30.201    compute1.osp4.example.com compute1
192.168.30.202    compute2.osp4.example.com compute2

And, configure the fake external network. At this moment, RHEL 6.5 won’t understand OVSPort and OVSBridge type but it will work anyway after RHEL OSP4 installation.

# vi /etc/sysconfig/network-scripts/ifcfg-eth0   // 192.168.30.40 – API/OpenStack Network

# vi /etc/sysconfig/network-scripts/ifcfg-eth1   // 192.168.50.40 – GRE Tenant Network

# vi /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
NM_CONTROLLED="no"
TYPE=OVSPort
DEVICETYPE=ovs
OVS_BRIDGE=br-ex
ONBOOT=yes

# vi /etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.60.40
NETMASK=255.255.255.0
GATEWAY=192.168.60.254
ONBOOT=yes

 

Install Control Node with packstack

# yum -y install openstack-packstack
# packstack –allinone \
–timeout=600 \
–keystone-admin-passwd=rhelosp4 \
–provision-all-in-one-ovs-bridge=n \
–os-swift-install=n \
–ntp-servers=NTPD_IP

“–timeout” was needed when installing RHEL OSP4 in Nested KVM VMs because I used my laptop and it is not powerful workstation so packstack could fail to install due to the timeout.

To use the existing bridge for the fake external network, need to add “–provision-all-in-one-ovs-bridge=n” option.

It’s all done. You are now ready to use RHEL OSP4.

# firefox http://192.168.30.40/dashboard

There was a bug in RHEL OSP4 early version I used, and it block you to log in the dashboard. To make it work, need to create a Member role.

# source ~/keystonerc_admin
# keystone role-create –name=Member

Let’s check if OpenStack’s integration bridge(br-int) and external bridge(br-ex) properly configured.

# ovs-vsctl show
55aba8c5-a6bb-4159-84c6-8226f1404b06
Bridge br-int
Port br-int
Interface br-int
type: internal
Port "tapfd3ab27e-f0"
tag: 1
Interface "tapfd3ab27e-f0"
type: internal
Bridge br-ex            // br-ex connected to eth2 interface
Port br-ex
Interface br-ex
type: internal
Port "eth2"
Interface "eth2"
ovs_version: "1.11.0"

 

Configure GLANCE in control node

I added two new disks into the control node for Glance, Cinder service.

# mkfs.ext4 /dev/sdx
# vi /etc/fstab
/dev/sdx     /var/lib/glance/images/        ext4    defaults     1 2

# mount -a
# chown glance.glance /var/lib/glance/images

You can download pre-built images for OpenStack from http://openstack.redhat.com/Image_resources

Then, add the downloaded images into your glance service.

# glance image-create –name rhel65x64 –is-public true –disk-format qcow2 –container-format bare –file ./rhel-guest-image-6.5-20140630.0.x86_64.qcow2

 

Configure CINDER in control node

Packstack automatically created a volume group named ‘cinder-volumes’ for Cinder but I will re-create it for newly added disk.

# vgremove cinder-volumes
# pvcreate /dev/sdy
# vgcreate cinder-volumes /dev/sdy

 

 Add a new compute node

To make our work more easier, use the same order of network interfaces over the all machines. eth0 in all machines should be connected to OpenStack API network (192.168.30.x) and eth1 should be connected to GRE Tenant network (192.168.50.x). Compute Nodes don’t need to be connected to the fake external network in my test environment.

Configure GRE for neutron for OVS plugin
Note : this will be replaced by ML2 plugin in OSP5

Packstack will create the answer file and I will update it for the new compute node.
Note : Ignore all NOVA_NETWORK configurations since we are using OVS instead

# vi packstack-answer-xxxx.txt
CONFIG_NOVA_COMPUTE_HOSTS=192.168.30.201    // Compute IP
CONFIG_NOVA_COMPUTE_PRIVIF=eth0
....
CONFIG_NEUTRON_OVS_TENANT_NETWORK_TYPE=gre
CONFIG_NEUTRON_OVS_TUNNEL_RANGES=1:1000
CONFIG_NEUTRON_OVS_TUNNEL_IF=eth1
....

Re-run packstack with updated answer file.

# packstack –answer-file=packstack-answers-xxxx.txt

Let check if your new compute node successfully added.

# source ~/keystonerc_admin
# nova service-list

You can update the answer file to add another compute node.

 

Enjoy RHEL OSP 4

To complete the installation, you probably need to add a router, public, private networks and link them work together. It could be done via Dashboard or CLI.

Here is an example of CLI.

1) Router and Internal Network

# neutron router-create router1
# neutron net-create private
# neutron subnet-create private 192.168.100.0/24 –name internal        // for tenant
# neutron router-interface-add router1 internal

2) External and Router

# neutron net-create public –router:external=True
# neutron subnet-create public 192.168.60.0/24 –name external –enable_dhcp=False –allocation-pool start=192.168.60.200,end=192.168.60.240 –gateway=192.168.60.254
Note : this will be the floating ip and will associate to an instance
# neutron router-gateway-set router1 public

3) Floating IP

# neutron floatingip-list
# neutron folatingip-create public
# neutron port-list
# neutron floatingip-associate <IP> <Port>

 

I hope this article can help you to enjoy RHEL OSP 4.

Rogan.

Advertisements