Multinode OpenStack with Oracle Linux 6.6 in Virtual Box with GNS3
May 27, 2015 Leave a comment
In a previous post, I was showing how to setup a CentOS Multinode Openstack. In this post, I’ll show the same thing except I’ll use Oracle Linux 6.6. OpenStack on Oracle Linux has a few different variants, but in this post, I’ll use Oracle Linux as the Compute Nodes. An alternate would be to use OVM which is Xen based as the Compute Nodes. I’m going to skip the steps for getting GNS3 setup since it is the same as my other post at part 1. When you get to the section where you start to configure the eth1 interfaces and the yum repos, stop there and come back here.
The instructions are very similar to our previous setup except for a few changes and command line argument differences. As a reminder, here is the setup we built.
On the controller, do the following.
Setup Mgmt interface
cat < /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.0.10 NETMASK=255.255.255.0 EOF
Update the /etc/hosts with the hostname of the nodes.
cat <> /etc/hosts 192.168.0.10 controller controller.openstack 192.168.0.1 compute1 compute1.openstack 192.168.0.2 compute2 compute2.openstack EOF
Restart networking to pick up all the settings.
/etc/init.d/network restart
Add OpenStack repo to yum
cd /etc/yum.repos.d wget http://public-yum.oracle.com/public-yum-openstack-ol6.repo cd
Disable SELINIX
setenforce 0 sed -i "s/\(^SELINUX=\).*\$/\1disabled/" /etc/selinux/config yum -y update reboot
Now we will do similar setup on Compute node 1.
Setup Mgmt interface
cat < /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.0.1 NETMASK=255.255.255.0 EOF
Update the /etc/hosts with the hostname of the nodes.
cat <> /etc/hosts 192.168.0.10 controller controller.openstack 192.168.0.1 compute1 compute1.openstack 192.168.0.2 compute2 compute2.openstack EOF
Restart networking to pick up all the settings.
/etc/init.d/network restart
Add OpenStack repo to yum
cd /etc/yum.repos.d wget http://public-yum.oracle.com/public-yum-openstack-ol6.repo cd
Disable SELINIX
setenforce 0 sed -i "s/\(^SELINUX=\).*\$/\1disabled/" /etc/selinux/config yum -y update reboot
And finally we will do similar setup on Compute node 2.
Setup Mgmt interface
cat < /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.0.2 NETMASK=255.255.255.0 EOF
Update the /etc/hosts with the hostname of the nodes.
cat <> /etc/hosts 192.168.0.10 controller controller.openstack 192.168.0.1 compute1 compute1.openstack 192.168.0.2 compute2 compute2.openstack EOF
Restart networking to pick up all the settings.
/etc/init.d/network restart
Add OpenStack repo to yum
cd /etc/yum.repos.d wget http://public-yum.oracle.com/public-yum-openstack-ol6.repo cd
Disable SELINIX
setenforce 0 sed -i "s/\(^SELINUX=\).*\$/\1disabled/" /etc/selinux/config yum -y update reboot
On the controller node, install the packstack utility and a few extra tools.
yum install -y openstack-packstack wget screen
Install OpenStack. I’m going to use screen since this next step can take a while and I am accessing the controller over SSH. But if you are running these directly on the console, you don’t need to use screen. This command will take a long time to run, go take a break. Note that all output of the command will be captured in the pack.log in case you need to see what was output. Also, it will ask for the root password for each node. Enter them.
screen packstack --install-hosts=192.168.0.10,192.168.0.1,192.168.0.2 --neutron-ovs-tenant-network-type=vlan \ --neutron-ovs-vlan-ranges=default:1000:2000 --neutron-ovs-bridge-mappings=default:br-eth2 \ --neutron-ovs-bridge-interfaces=br-eth2:eth2 \ --novavncproxy-hosts=192.168.10.157 --nagios-install=y 2>&1 | /usr/bin/tee ~/pack.log
Do final nova and neutron network setup by linking the network node’s eth3 to your Tenant Public network.
ovs-vsctl add-port br-ex eth3 openstack-config --set /etc/neutron/dhcp_agent.ini DEFAULT enable_isolated_metadata true service neutron-dhcp-agent restart
Next we need to do some patching on the control node.
- Edit /etc/openstack-dashboard/local_settings and change the allowed hosts
ALLOWED_HOSTS = ['*', ]
ServerAlias 192.168.10.157
And reboot.
Apply a workaround to fix broken upstream changes for compatibility with OpenStack
rpm -qa | grep dnsmasq If the value is higher than 2.48-13.el6.x86_64, you need to downgrade using the following command, possibly more than once. yum downgrade -y dnsmasq dnsmasq-utils
Similar downgrades will also need to be done on both compute nodes and for both dnsmasq and kvm.
Compute1 and Compute2:
rpm -qa | grep qemu-kvm If the value is higher than 0.12.1.2-2.415.el6_5.14.x86_64, you need to downgrade. Possibly more than once. yum downgrade -y qemu-kvm qemu-img
rpm -qa | grep dnsmasq If the value is higher than 2.48-13.el6.x86_64, you need to downgrade using the following command, possibly more than once. yum downgrade -y dnsmasq dnsmasq-utils
Back in the control node, lets add an image. Become admin user
source ./keystonerc_admin
Let’s add an image to Glance
mkdir /tmp/images wget -P /tmp/images http://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img glance image-create --name "cirros-0.3.3-x86_64" --file /tmp/images/cirros-0.3.3-x86_64-disk.img \ --disk-format qcow2 --container-format bare --is-public True --progress
Create a smaller flavor size since we are running on limited memory
nova flavor-create --is-public true m1.micro 6 256 2 1
On Compute node 1, we need to do a few steps to configure it to use Qemu instead of KVM since we are running inside a VM already and VirtualBox does not support nested VMs.
openstack-config --set /etc/nova/nova.conf libvirt virt_type qemu openstack-config --set /etc/nova/nova.conf DEFAULT compute_driver libvirt.LibvirtDriver setsebool -P virt_use_execmem on ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64 reboot
And lastly, we will setup Compute node 2 with Qemu as well.
openstack-config --set /etc/nova/nova.conf libvirt virt_type qemu openstack-config --set /etc/nova/nova.conf DEFAULT compute_driver libvirt.LibvirtDriver setsebool -P virt_use_execmem on ln -s /usr/libexec/qemu-kvm /usr/bin/qemu-system-x86_64 reboot
There we have it, our multinode OpenStack is up and running and you can now start adding instances and networks. To access the OpenStack Horizon dashboard from your PC, open a browser and go to the following URL. Login as ‘admin’ and use the password found in the file keystonerc_admin.
http://192.168.0.10/dashboard
This post ‘Multinode OpenStack with Oracle Linux 6.6 in Virtual Box with GNS3’ first appeared on https://techandtrains.com/.