OpenStack

OpenStack is a free and open-source software platform for cloud computing, mostly deployed as Infrastructure-as-a-service ( IaaS). In other words, it is a cloud operating system that controls large pools of computing, storage and networking resources throughout a data center. All of these components are managed through a dashboard via the web interface. This project was launched by Rackspace and NASA in July 2010. OpenStack is managed by the OpenStack Foundation and backed up by some big companies.

Deployment Models

The following image shows how OpenStack is deployed.

#image-source:edureka

On-Premise distribution

In this model, a customer downloads and installs an OpenStack distribution within their internal network.

OpenStack-based Public Cloud

A vendor provides a public cloud computing system based on the OpenStack project. Example: AWS

Hosted OpenStack Private Cloud

A vendor hosts an OpenStack-based private cloud including the underlying hardware and the OpenStack software. You can ask cloud vendor to setup OpenStack in your own Hardware and all your information is within your control.

OpenStack-as-a-Service

A vendor hosts OpenStack management software as a service and customers use the software service. Your cloud provider will set up in their own environment and you will pay according to the service used.

OpenStack Architecture

#image-source:edureka

#image-source:cloudify

Horizon

This is the dashboard. Here the user can get a brief overview of the open-stack infrastructure. It also provides a web-based user interface to OpenStack services including Nova, Swift, Keystone, etc. It allows users and administrators of the environment to interact with and manage the various functional components without having to install any local client tools other than a web browser.

Keystone

It is used to provide an authentication and authorization service for other OpenStack services. Authorized and authentication is needed before using any services. You can add a user and grant privileges in this section. It is more like who are you and what do you can access. It uses the following service for authorization and authentication.

Token Service

It validates and manages token used for authenticating the request, once the user credentials are already being verified. It is a session based token management.

Catalog service

It provides endpoint discovery.

Assignment service

It provides a level of authorization. For example, some user can get right to access 3-services and some can get only 2. So based on these rules, rules can be created.

Nova

OpenStack compute (codename: Nova) is the component which allows the user to create and manage virtual servers using the machine images. This is the computing domain. This is the zone, where all the processing and computing happens. It is designed to provide power massively scalable, on-demand access to computer resources. It is fault tolerant, recoverable and provides API-compatibility with systems like Amazon EC2. Nova is based on messaging architecture and all of its components communicate using message queuing system such as RabbitMQ.

#image-source:edureka

Glance

It stores and retrieves the virtual machine disk image. This has got all the disk containing them like Ubuntu, Debian, etc. This is somehow similar to the repository and includes images ( ubuntu, Debian, etc… ) and metadata definitions. Glance image services include discovering, registering and retrieving virtual machine images.

#image-source:edureka

Swift

This is object storage component. This is connected to data-store such as S3, where all the files are located. You can store all kind of files, all kind of images in swift. This is completely meant for storage. You can think Swift as in-build hard-drive.

#image-source:edureka

Neutron

It is a pluggable, scalable and API-driven system for managing networks. OpenStack networking is useful for VLAN management, management of IP addresses to different VMs and management of firewalls using these components. It is responsible for communication between the services. It is focused on delivering Networking-as-a-Service (Naas) in virtual compute environments. Neutron relies on Keystore for authentication and authorization of all API requests.

#image-source:edureka

Cinder

This is block storage component and provides persistent block storage resources that OpenStack compute instances can consume. This includes secondary attached storage similar to the Amazon Elastic Block Storage ( EBS) offering. It is more oft like plug-able storage system. Think of Cinder as external Hard-disk. Cinder scheduler schedules and moves request to the appropriate volumes. Cinder Volume manages the block storage devices and specifically, they are back-end devices. Cinder database contains metadata of the files that are in the block storage system.

#image-source:edureka

Ceilometer

For metering and billing. It will produce the bill and log at the end of all the services being used. This component is also used to decide the scalability and obtain the statistics regarding the usage.

Orchestration Heat

This component manages multiple Cloud applications through an OpenStack-native REST API and a CloudFormation-compatible Query API.

Process Workflow

Finally After getting an image, Nova mounts it on a VM. During boot process, it requests Neutron ( networking components ) for an IP address.

Credit-for-processworkflow: cloudify

Install OpenStack in VMs

Things are about to get real! Let’s explore OpenStack.

Prerequisites

You need to have a system with a fresh install of Linux.

Installation

We need to add user to install DevStack.

useradd -s /bin/bash -d /opt/stack -m stack

Since this user will be making many changes to your system, it will need to have sudo privileges.

apt-get install sudo -y || yum install -y sudo
echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

Now, log out and login back as the new user. In this case, it will be “stack” user.

Download DevStack

cd /opt/stack
sudo apt-get install git -y || sudo yum install -y git
git clone https://git.openstack.org/openstack-dev/devstack
cd devstack

Run DevStack

Now to configure stack.sh, copy local.conf file from devstack/samples/local.conf in devstack root.

  • Set FLOATING_RANGE to a range not used on the local network, i.e. 192.168.1.224/27. This configures IP addresses ending in 225-254 to be used as floating IPs.
  • Set FIXED_RANGE and FIXED_NETWORK_SIZE to configure the internal address space used by the instances.
  • Set FLAT_INTERFACE to the Ethernet interface that connects the host to your local network. This is the interface that should be configured with the static IP address mentioned above.
  • Set the administrative password. This password is used for the admin and demo accounts set up as OpenStack users.
  • Set the MySQL administrative password. The default here is a random hex string which is inconvenient if you need to look at the database directly for anything.
  • Set the RabbitMQ password.
  • Set the service password. This is used by the OpenStack services (Nova, Glance, etc) to authenticate with Keystone.
[[local|localrc]]
FLOATING_RANGE=192.168.1.224/27
FIXED_RANGE=10.11.12.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=secretadmin
DATABASE_PASSWORD=secretdatabase
RABBIT_PASSWORD=secretrabbitmq
SERVICE_PASSWORD=secretservice

Run DevStack:

./stack.sh

This will install all the required files on your computer. This process may take several minutes depending on your network speed and hardware performance. When the installation is complete, you will see a summary of stack.sh , including the relevant URLs, account, and passwords.

From this point, the dashboard should be accessible through web browser.

 

GOOD LUCK!

mm

Anup Chhetri

IT system administrator

You may also like...

error: Content is protected !!