Multinode OpenStack with CentOS 6.6 in Virtual Box with GNS3 Part 2

This is the following to the part 1 of the article where I was setting up all the nodes in preparation for intalling OpenStack. Now that all the preparation work has been completed, let’s get started with installing OpenStack.

On the controller node, install the packstack utility and a few extra tools.

yum install -y openstack-packstack wget screen

Modify packstack file to allow install on CentOS

vi /usr/lib/python2.6/site-packages/packstack/plugins/serverprep_001.py

Find the following line

if config['HOST_DETAILS'][host]['os'] in ('Fedora', 'Unknown'):

and change it to

if config['HOST_DETAILS'][host]['os'] in ('Fedora', 'CentOS', 'Unknown'):

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 --os-neutron-ovs-tenant-network-type=vlan \
--os-neutron-ovs-vlan-ranges=default:1000:2000 --os-neutron-ovs-bridge-mappings=default:br-eth2 \
--os-neutron-ovs-bridge-interfaces=br-eth2:eth2 --use-epel=n --provision-demo=n \
--os-swift-install=n --os-ceilometer-install=n \
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

Become admin user

source ./keystonerc_admin

Let’s add an image to Glance

mkdir /tmp/images
wget -P /tmp/images http://cdn.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
service libvirtd restart
service openstack-nova-compute restart

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
service libvirtd restart
service openstack-nova-compute restart

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

Well, hope you enjoyed the journey as much as I did. It was quite a learning experience to put this together. In later posts, I hope to show how I added more compute nodes, compute nodes of different hypervisor types and adding an external block storage node.

This post ‘Multinode OpenStack with CentOS in Virtual Box with GNS3 Part 2’ first appeared on https://techandtrains.com/.

Advertisement

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 )

Connecting to %s

%d bloggers like this: