OpenStackPrivateCloudSetupbasedonVirtual Machines
OpenStackPrivateCloudSetupbasedonVirtual Machines
Education and Research Association - ITERA 2019, Indianapolis, IN , USA, April 13-15 /2019
Table of Contents
1. Introduction 1
2. OpenStack components 1
3. Installation 5
4. Automation in OpenStack 9
5. Future work – Container-based deployment 9
References: 10
1. Introduction
Many organizations are trying to move to the cloud from their legacy data centers for the
scalability, flexibility and automation that can be achieved in a cloud based environment. Cloud
services are more than the virtualization of computational resources. They have five essential
characteristics as per the National Institute of Standards and Technology (NIST): on-demand self-
service, broad network access, resource pooling, rapid elasticity, and measured service. There are
three service model in cloud computing- infrastructure as a service (IAAS), software as a service
(SAAS) and platform as a service (PAAS). NIST also describes four deployment models to access
these services – public cloud, private cloud, community cloud and hybrid cloud. OpenStack is an
open source software managed by the OpenStack foundation for creating private and public clouds.
OpenStack software mainly provides Infrastructure as a Service capabilities with a shared pool of
compute, storage and network resources [3].
In this paper we will present how OpenStack is used to setup a multinode private cloud.
The setup was implemented and tested in a University laboratory. This paper gives a brief
description of the most important services of OpenStack followed by the installation steps and then
the comments on future work.
2. OpenStack components
There are different components for OpenStack for compute, network, storage, orchestration, web
frontend etc. In this section several OpenStack components are described which were deployed
in the environment we prepared.
2
OpenStack Networking plug-ins and agents: Layer 3 agent (L3), DHCP agent and plug-in agents
are the common agents in the OpenStack environment.
Messaging queue: Keeps track of the routing information between the neutron-server and different
plug-ins. It also stores the plug-ins state information [8].
In our OpenStack set up, we had to configure two virtual interfaces for the VM containing
the neutron service. One interface was used to communicate with other OpenStack services and
the other interface was NATed with the KVM (Hypervisor) interface. This was done to provide
internet access to instances created within OpenStack. Neutron gives an internal IP address to
instances then that address is NATed with the KVM interface address which enables it to get
internet access.
3
Figure 1: Primary Nova Components and It’s interaction with neutron, glance, keystone
Source: https://docs.openstack.org/nova/latest/_images/architecture.svg
4
Figure 2: OpenStack Dashboard showing resources summary
Source: https://www.openstack.org/software/mitaka/
3. Installation
3.1 Private cloud architecture
5
The minimum requirement to install OpenStack is:
● For controller node 4GB RAM, 1 CPU and 5GB of storage
● For compute node 2GB RAM, 1 CPU and 10GB of storage
As per the architecture, different OpenStack components or set of components are to be
installed on independent machines, basically one controller node, three compute nodes and 1 block
storage node. This requires five machines with the hardware requirement mentioned above, either
physical or virtual. The available resources we had at that moment are 3 machines with 8GB of
RAM, 8CPU and 100GB storage.
As we had only 3 physical machines at that moment, we went for a nested virtualization setup,
with Ubuntu server 16.04 with KVM installed on all the three physical hosts. We then deployed 2
virtual machines on two physical hosts (ostack01 & ostack02) each. One virtual machine on
ostack02 contains controller and OpenStack services keystone, glance and neutron. The second
virtual machine has cinder. Two virtual machines on ostack01 have nova. One physical machine
ostack03 is solely used to deploy nova to utilize all its resources for the VMs that will be deployed
above the OpenStack cloud environment.
The below table gives the details on the specifications of the virtual machines or physical
machine along with the OpenStack services deployed on them:
6
Run the below command to install KVM, virt-manager which is the graphical interface:
The link referred for this installation can be found in the reference [1].
4. Opened virt-manager for host 2 and configured nested virtualization on the 2 VMs nova
and nova1:
Show virtual hardware details -> CPUs -> Configuration -> Copy host CPU
configuration checked box -> Apply
7
https://docs.openstack.org/mitaka/install-guide-ubuntu/environment-ntp.html
1.3 OpenStack packages:
https://docs.openstack.org/mitaka/install-guide-ubuntu/environment-packages.html
1.4 SQL database:
https://docs.openstack.org/mitaka/install-guide-ubuntu/environment-sql-database.html
1.5Message queue:
https://docs.openstack.org/mitaka/install-guide-ubuntu/environment-messaging.html
1.6 Memcached:
https://docs.openstack.org/mitaka/install-guide-ubuntu/environment-memcached.html
3.4.2 Identity service:
https://docs.openstack.org/mitaka/install-guide-ubuntu/keystone.html
3.4.3 image service:
https://docs.openstack.org/mitaka/install-guide-ubuntu/glance.html
3.4.4 Compute service:
https://docs.openstack.org/mitaka/install-guide-ubuntu/nova.html
● To create multiple compute nodes (nova) only hostname should be added in the /etc/hosts file
of the controller for the new compute node. No additional change is required in the controller.
Restart the compute services in the controller node once the configuration is done in the new
compute node as per the below links.
https://docs.openstack.org/mitaka/install-guide-ubuntu/nova-compute-install.html
https://docs.openstack.org/mitaka/install-guide-ubuntu/neutron-compute-install.html
3.4.5 Networking Service:
https://docs.openstack.org/mitaka/install-guide-ubuntu/neutron.html
● As the installation is done for self-service network hence follow:
“Networking Option 2: Self-service networks” in the guide after installing the prerequisite.
3.4.6 Dashboard:
https://docs.openstack.org/mitaka/install-guide-ubuntu/horizon.html
3.4.7 Block Storage:
https://docs.openstack.org/mitaka/install-guide-ubuntu/cinder.html
3.6 Issues Faced and Solutions
During the installation process we came across few challenges which we like to mention and
approaches we took to overcome them. Most of the issues are small and can be fixed with few
additional steps. These issues may be specific to the architecture we followed, so do follow our
suggested changes only if the same issues occur in your setup.
● Loopback IP should be commented in /etc/hosts, else services will start in the loopback
address.
● Population of the service database sometimes failed. Eg:
If the below command fails for keystone:
su -s /bin/sh -c "keystone-manage db_sync" keystone
Solution:
run below in the mysql database:
ALTER SCHEMA keystone DEFAULT CHARACTER SET utf8;
● For Cinder, add virtual disk to the cinder node, then run the below command to make it
visible:
8
✔ fdisk /dev/sda
✔ use t
✔ then w
✔ then pvcreate as per the documentation.
● For neutron node use additional NAT interface along with the bridge that allows the virtual
machine to access internet.
● Check the mysql mariadb bind address in the file,: /etc/mysql/mariadb.conf.d/50-server.cnf
● It should be the IP address of the controller node for the keystone database
4. Automation in OpenStack
OpenStack environments can be managed by the dashboard service called ‘horizon’ and
by command line interface. These are effective options but can be time consuming and tedious to
work with when used to manage and deploy OpenStack at large scale. For managing OpenStack
at scale, we need automation to speed up some repetitive processes like configuring similar virtual
machine instances, creating networks and volumes at scale, etc.
There are several ways by which we can do automation in OpenStack. One of the easiest
ways is by using bash scripts. We can have OpenStack commands added in the script which when
executed make API calls to different OpenStack services with given API credentials. We can also
use some automation tools like Ansible to automate OpenStack deployments. Automation in
OpenStack can be helpful when we want deployments at scale like configuring large number of
instances at a time, configuring networks faster etc. It can also be helpful in managing OpenStack
environment by automating the generation of performance reports.
OpenStack also has a service called ‘heat’ which is useful for automation and orchestration. In
this service, the user can write a human readable template which then leverages the api structure
of OpenStack to manage the deployment of VMSs and services inside the OpenStack infrastructure
[4].
9
References:
1. “How To Install KVM And Create Virtual Machines On Ubuntu." Howtogeek.com. N.
p., from https://www.howtogeek.com/117635/how-to-install-kvm-and-create-virtual- machines-
on-ubuntu/
2. Fedora Quick Docs | Fedora Quick Docs | Using nested virtualization in KVM
https://docs.fedoraproject.org/en-US/quick-docs/using-nested-virtualization-in-
kvm/index.html
3. What is OpenStack, https://www.openstack.org/software/
4. Heat - OpenStack. Wiki.openstack.org., from https://wiki.openstack.org/wiki/Heat
5. What is a Container. Docker.com. from https://www.docker.com/resources/what-
container
6. OpenStack Docs: Identity service overview. Docs.openstack.org. From
https://docs.openstack.org/mitaka/install-guide-ubuntu/common/get_started_identity.html
7. OpenStack Docs: Image service overview. Docs.openstack.org. from
https://docs.openstack.org/mitaka/install-guide-
ubuntu/common/get_started_image_service.html
8. OpenStack Docs: Networking service overview. Docs.openstack.org. from
https://docs.openstack.org/mitaka/install-guide-
ubuntu/common/get_started_networking.html
9. OpenStack Docs: Compute service overview. Docs.openstack.org., from
https://docs.openstack.org/mitaka/install-guide-
ubuntu/common/get_started_compute.htm
10. OpenStack Docs: Block Storage service overview. Docs.openstack.org., from
https://docs.openstack.org/mitaka/install-guide-
ubuntu/common/get_started_block_storage.html
11. OpenStack Docs: Dashboard. Docs.openstack.org. from
https://docs.openstack.org/mitaka/install-guide-ubuntu/horizon.html
10