Introduction To Openstack: Basic Principles of Openstack
Introduction To Openstack: Basic Principles of Openstack
OpenStack is a cloud OS that is used to control the large pools of computing, storage,
and networking resources within a data center. OpenStack is an open-source and free
software platform. This is essentially used and implemented as an IaaS for cloud
computing.
We can call the OpenStack a software platform that uses pooled virtual resources to
create and manage private and public cloud. OpenStack offers many cloud-related
services (such as networking, storage, image services, identity, etc.) by default. This can
be handled by users through a web-based dashboard, a RESTful API, or command-line
tools. OpenStack manages a lot of virtual machines; this permits the usage of physical
resources to be reduced.
Open Design: For the forthcoming update, the development group holds a Design
Summit every 6 months.
Open Development: The developers maintain a source code repository that is freely
accessible through projects like the Ubuntu Linux distribution via entig100s.
Open Community: OpenStack allows open and transparent documentation for the
community.
Components of OpenStack
Major components of OpenStack are given below:
Object Storage (Swift): To store and retrieve arbitrary data in the cloud, object
storage is used. In Swift, it is possible to store the files, objects, backups, images,
videos, virtual machines, and other unstructured data. Developers may use a special
identifier for referring the file and objects in place of the path, which directly points to
a file and allows the OpenStack to manage where to store the files.
Block Storage (Cinder): This works in the traditional way of attaching and detaching
an external hard drive to the OS for its local use. Cinder manages to add, remove,
create new disk space in the server. This component provides the virtual storage for
the virtual machines in the system.
Dashboard (Horizon): This is the first component that the user sees in the OpenStack.
Horizon is the web UI (user interface) component used to access the other back-end
services. Through individual API (Application programming interface), developers can
access the OpenStack's components, but through the dashboard, system
administrators can look at what is going on in the cloud and manage it as per their
need.
Identity Service (Keystone): It is the central repository of all the users and their
permissions for the OpenStack services they use. This component is used to manage
identity services like authorization, authentication, AWS Styles (Amazon Web Services)
logins, token-based systems, and checking the other credentials (username &
password).
Image Service (Glance): The glance component is used to provide the image services
to OpenStack. Here, image service means the images or virtual copies of hard disks.
When we plan to deploy a new virtual machine instance, then glance allows us to use
these images as templates. Glance allows virtual box (VDI), VMware (VMDK, OVF), Raw,
Hyper-V (VHD) and KVM (qcow2) virtual images.
Shared File System (Manila): It offers storage of the file to a virtual machine. This
component gives an infrastructure for managing and provisioning file shares.
Elastic Map-reduce (Sahara): The Sahara component offers a simple method to the
users to preplanned Hadoop clusters by referring to the multiple options such as the
Hadoop version, cluster topology and hardware details of nodes and some more.
OpenStack also provides the pre-installed ISO images of the OpenStack platform. To
download these pre-installed ISO images, click here.
We cannot use the DevStack for production purposes because sometimes, after
reboot, it is almost impossible to bring it up on the last state.
Hardware Requirements
The following are the hardware requirements for OpenStack:
o Ubuntu 16.04/17.04/18.04
o Fedora 24/25
o Debian
o CentOS/RHEL 7
o OpenSUSE
Ubuntu operating system is the most tested and most reliable option for DevStack.
Installation of OpenStack
In order to install the DevStack in a system, first, you have to create a Linux VM on
your computer (such as using VirtualBox or VMware) or remotely in the cloud (such as
using AWS).
The VM must have at least 4GB of memory, and the proper internet connection is also
important. Here, we are going to use one version of the ubuntu, i.e., 18.04.
Follow the following steps to install the OpenStack in your ubuntu virtual machine :
Open the terminal and run the following command to ensure that the system is up to
date :
Sample Output :
Reboot the system after running the above command. To reboot the system, run the
following command :
1. $ sudo reboot
or
1. $ init 6
It is important that the devstack must run as a regular user (non-root user) with the
sudo enabled.
To keep this note in mind, let's create a new user with the name "stack" and assign the
sudo permissions or privileges. To create a stack user, run the following command in
your terminal:
Output :
Now, to assign the sudo privileges to the stack user, run the following command :
Output :
You can switch to the 'stack' user by running the following command:
1. $ sudo su - stack
Output :
In Most of the ubuntu systems, git comes by default. But if git is missing on your
system, then install it by running the following command:
Sample Output :
utput :
1. $ cd devstack
Output :
Now, create a local.conf file in which you have to enter the four passwords and the
host IP address :
Output :
Copy the following line of content in the file :
1. [[local|localrc]]
2.
3. # Password for KeyStone, Database, RabbitMQ and Service
4. ADMIN_PASSWORD=StrongAdminSecret
5. DATABASE_PASSWORD=$ADMIN_PASSWORD
6. RABBIT_PASSWORD=$ADMIN_PASSWORD
7. SERVICE_PASSWORD=$ADMIN_PASSWORD
8.
9. # Host IP - To get your Server or VM IP, run the 'ip addr' or 'ifconfig' comman
d
10. HOST_IP=192.168.56.103
Output :
Press the ESC, then wq to save and then exit from the local.conf file.
Here, ADMIN_PASSWORD is the password that we will use to log into the OpenStack
login page. The default username for an OpenStack is 'admin'.
And HOST_IP is the IP address of your system. To get your Server or VM IP, run the
'ifconfig' or 'ip addr' command.
1. $ ./stack.sh
The installation will take about 10-20 minutes, mostly depends on your internet speed.
At the very end of the installation, you will get the host's IP address, URL for managing
it and the username and password to handle the administrative task.
Copy the horizon URL given in the installation output and paste it into your browser :
1. http://<IP Address>/dashboard
To login to OpenStack with the default username - admin or demo and configured
password - secret.
Once you login into the OpenStack, you will be redirected to the Dashboard of
OpenStack. This dashboard screen is called the Openstack management web console.
On the main dashboard screen, you will see the instance's overview.
You can also create your own instance in the OpenStack. Instances are nothing but a
virtual machine. To create a new virtual machine, click on the instances from the left
side of the page.
And then click on Launch Instances. Fill in all the required fields. Once you fill all the
required fields, an instance will create.
OpenStack Architecture
There are several components that form OpenStack's architecture.
Nova (Compute)
Nova is one of the most common and important components of OpenStack. Compute
is a controller that is used to handle virtualized environments' resources. It handles
several virtual machines and other instances that perform computing tasks.
Nova is written in Python language. VMware, Xen, and KVM are the hypervisor
technologies that could be used, and this choice is contingent on OpenStack's version.
Functionality :
o The Nova-api processes the requests and responses to and from the end-user.
o When a request is submitted, the Nova generates and removes the instances.
o The Nova-scheduler schedules nova-compute jobs.
o The Glace Registry, along with its metadata, stores the image information.
o The Image stores predefined images for the user or admin.
o The nova-network assures connectivity and routing of the network.
Neuron (Networking)
This component is used for networking in OpenStack. Neutron manages all the
network-related queries, such as IP address management, routers, subnets, firewalls,
VPNs, etc. It confirms that all the other components are well connected with the
OpenStack.
Glance (Image)
This component offers image services to OpenStack. Here, image service means the
images or virtual copies of hard disks. When we plan to deploy a new virtual machine
instance, glance allows us to use these images as templates.
Keystone (Identity)
It is the central repository of all the users and their permissions for the OpenStack
services they use. This component is used to manage identity services like
authorization, authentication, AWS Styles (Amazon Web Services) logins, token-based
systems, and checking the other credentials (username & password).
As we know, the Horizon is an interface for the appliance environment. Anything that
the user wants to do should use the Horizon (Dashboard). The Dashboard is a simple
graphical user interface with multiple modules, where each module performs specific
tasks.
All the actions in OpenStack work by the service API call. So, if you are performing any
task, it means you are calling a service API. Each API call is first validated by Keystone.
So, you will have to login yourself as a registered user with your login username and
password before you enter the OpenStack dashboard.
Once you successfully log in to the OpenStack dashboard, you will get many options
to create new instances, volumes, Cinder, and configure the network.
Instances are nothing but a virtual machine or environment. To generate a new VM,
use the 'instances' option from the OpenStack dashboard. In these instances, you can
configure your cloud. Instances can be RedHat, OpenSUSE, Ubuntu, etc.
The formation of an instance is also an API call. You can configure network information
in the instances. You can connect these instances to the cinder instance or volume to
add more services.
After the successful creation of an instance, you can configure it, you can access it
through CLI, and whatever data you want to add, you can do it. Even you can set up
an instance to manage and store the snapshots for future reference or backup
purposes.
AWS
AWS (Amazon Web Services) is an on-demand cloud computing platform that can
perform almost any kind of process. AWS offers a processing unit, storage, Big Data
platform, ML platform, etc. Since AWS is an on-demand platform and charges very
little, anyone can afford it according to their needs. It follows the concept of pay-as-
you-go, but you just pay for the things you are using. Unlike OpenStack, AWS is not
an open-source platform. Only as a user we can use it.
AWS is a public cloud and is mostly used by a small or medium level of companies
who do cannot afford and don't want to spend on server infrastructure.
OpenStack
Like AWS, OpenStack provides a cloud computing platform. Using OpenStack, we can
perform all types of services.
But OpenStack is an open-source platform. Using OpenStack, we can create our own
cloud and configure the things as per our needs.
We can deploy OpenStack in both private and public networks. Users can access the
OpenStack via a web-based dashboard component or APIs.
Highlights of OpenStack
o OpenStack has made it possible for companies such as Bloomberg and Disney
to handle their private clouds at very manageable prices.
o OpenStack offers mixed hypervisor environments and bare metal server
environments.
o RedHat, SUSE Linux, and Debian have all been active contributors and have
been supporting OpenStack since its inception.
o OpenStack is used by Walmart to organize more than one lac cores, which offers
100 % uptime during last year's Black Friday.
10. For networking, OpenStack uses For networking, AWS uses VPC (Virtual
Neutron. Private Cloud).
11. Machine learning (ML) and NLP Machine Learning (ML) and NLP
(Natural Language processing) are (Natural Language processing) are
not readily available. possible in AWS.
12. OpenStack has no Speech or Voice Lex is used for speech or voice
recognition solution. recognition solutions.
13. It has the Mistral - Workflow It follows the Simple Workflow Service
Service. (SWF).
14. Ceilometer - the Telemetry based AWS Usage and the Billing Report.
billing, resource tracking etc.
Benefits of OpenStack
There are a lot of benefits of OpenStack in the cloud computing platform. Let's see
one by one :
1. Open Source
As we know, using the open-source environment, we can create a truly defined data
center. OpenStack is the largest open-source platform. It offers the networking,
computing, and storage subsystems in a single platform. Some vendors (such as
RedHat) have developed and continue to support their own OpenStack distributions.
OpenStack source code is available at github. The two main advantages of the open-
source OpenStack project is :
2. Scalability
Scalability is the major key component of cloud computing. OpenStack offers better
scalability for businesses. Through this feature, it allows enterprises to spin up and spin
down servers on-demand.
3. Security
One of the significant features of OpenStack is security, and this is the key reason why
OpenStack is so popular in the cloud computing world.
o With OpenStack, your data is always secure - When company owners want to
move their IT infrastructure to the cloud, they always fear data loss. But there is
no need to think about data loss with OpenStack. It offers the best security
feature.
o OpenStack provides security professionals who are responsive to OpenStack's
strong security.
4. Automation
Automation is one of the main keys selling points of OpenStack when compared to
another option. The ease with which you can automate tasks makes OpenStack
efficient. OpenStack comes with a lot of inbuilt tools that make cloud management
much faster and easier. OpenStack provides its own API or Application Program
Interface that helps other applications to have full control over the cloud. This function
makes it easier to build your own apps that can communicate with OpenStack to
perform tasks such as firing up VMs.
Development Support
Since OpenStack's source code is freely accessible, experts from all over the world can
improve the platform. If a new feature is being designed, it can be built easily and
professionally by a development team. OpenStack is like Linux in that have many
distributions with different features but share the same component.
Support from the developers' community - Many developers are working on the
enhancement of OpenStack. They are continuously working hard to make the
OpenStack better.
Command Line Tools - We can access the OpenStack using command-line tools.
Dashboard - OpenStack offers users and administrators to access and manage various
aspects of OpenStack using GUI (graphical user interface) based dashboard
component. It is available as a web UI.
APIs - There are a lot of APIs (Application Program Interface), which is used to manage
OpenStack.
6. Services
OpenStack provides many services required for several different tasks for your public,
private, and hybrid cloud.
List of services - OpenStack offers a list of services or components such as the Nova,
Cinder, Glance, Keystone, Neutron, Ceilometer, Sahara, Manila, Searchlight, Heat,
Ironic, Swift, Trove, Horizon, etc.
Each component is used for different tasks. Such as Nova provides computing services,
Neutron provides networking services, Horizon provides a dashboard interface, etc.
7. Strong Community
OpenStack has many experts, developers, and users who love to come together to
work on the product of OpenStack and enhance the feature of OpenStack.
8. Compatibility
Public cloud systems like AWS (Amazon Web Services) are compatible with OpenStack.