OPENSTACK
Agenda
OpenStack
Origin
OpenStack Components
Keystone
Horizon
Glance &
Nova
Reference
2
Abbreviations/Acronyms
OpenStack
OS Operating System
VM Virtual Machine
DNS Domain Name System
DHCP Dynamic Host Configuration Protocol
LDAP Lightweight Directory Access Protocol
SQL Structured Query Language
OVF Open Virtualization format
AMQP Advanced Message Queuing Protocol
LVM Logical Volume Management
All Logos, Copyrights, Patents and Other IPRs are owned by their
respective owners 3
ORIGIN
4
Origin
OpenStack
• In simplest terms, OpenStack is a set of open services and
components to build a cloud system .
• It is also referred to as “Cloud Operating System”.
• It offers components and services to build compute, storage
and Network functionalities of a cloud system.
5
The Origin
OpenStack
• Journey commenced in 2010
• From September 2012, the independent OpenStack
Foundation came to existence for providing shared resources
to protect, empower, and promote OpenStack.
6
The Origin
OpenStack
• OpenStack Foundation Membership: Both individuals and
companies can be members of the foundation.
• It is free for individuals and you can sign up for the
Foundation membership at the URL : [Link]/join
• Companies though require paid membership to achieve
mission of protecting, empowering and promoting the
OpenStack community and software.
7
Releases in Chronologically
OpenStack
1 Austin 13 Mitaka
2 Bexar
14 Newton
3 Cactus 15 Ocata
4 Diablo 16 Pike
5 Essex 17 Queens
25 Yoga
6 Folsom 18 Rocky
26 Zed (Upcoming)
7 Grizzly
19 Stein
8 Havana
20 Train
9 Ice House
21 Ussuri
10 Juno
22 Victoria
11 Kilo
12 Liberty 23 Wallbay
24 Xena
8
Core Project’s
OpenStack
9
Other Project’s
OpenStack
10
Service Overview
OpenStack
Networking
Compute
Block service
Storage-- The
-The OpenStack
OpenStack
The OpenStack Networking
Compute service
BlockService
Storage (neutron)
(Nova)
service provides
provides
(cinder) various
services
provides to support the
•Image
Identity
Dashboard
service -
-services
The - of
The OpenStack
OpenStack
OpenStack Image
Dashboard service (glance)
Identity(horizon) provides
service (keystone) disk-image
provides aisweb-based
a shared service that
networking
management
persistent block to
storage cloud
virtual users
machine
for compute instances.
management
provides
interface
Object Storage services,
authentication
for both
- The cloud including
and
OpenStack imageStorage
administrators
authorization
Object discovery,
andservices
cloud registration,
tenants.
throughout
service andentire
the delivery
(swift) provides cloud for
support
•IP address management,
services to retrieving
the Compute
infrastructure.
storing and service.
arbitrary data in the cloud.
•DNS,
•DHCP and
•Load balancing
11
Pre-requisite Software`s
• MariaDB
OpenStack
• All of the services within an OpenStack project access a single
database.
• The database typically runs on the controller node (discussed
in detail under “Nova”).
• Each of the core OpenStack services (Compute, Identity,
Networking, Block Storage) store state and configuration
information in databases.
12
Pre-requisite Software`s
OpenStack
• RabbitMQ
• It is an Advanced Message Queuing Protocol (AMQP).
• OpenStack uses message queues to coordinate operations and
status information among services.
• The message queue service typically runs on the controller
node.
13
Pre-requisite Software`s
OpenStack
• Memcached
• OpenStack services use Memcached for in-memory caching,
which accelerates transactions.
• For example, the OpenStack Identity service (keystone) uses
Memcached for
• caching authentication tokens which ensures that token
validation does not have to complete a disk or database
transaction every time the service is asked to validate a
token.
14
OPENSTACK COMPONENTS
15
KEYSTONE
16
Keystone
Keystone
• OpenStack Identity provides user authentication and authorization to all
OpenStack components,
• Glance, Nova, Neutron, Cinder, Swift & Horizon
17
Identity Service - Keystone
Keystone
Keystone is an OpenStack service that provides API client authentication,
service discovery, and distributed multi-tenant authorization by
implementing OpenStack’s Identity API
Keystone uses a token based authentication system
Authentication methods
• User name & password
• Lightweight Directory Access Protocol (LDAP)
• Other External authentication methods
18
Keystone
Keystone
Service
User
Domain
Roles An
Credentials
Token
A
Endpoint
region
ais AOpenStack
A digital
An alpha-numeric
is Data
intended
personality
are service,
network-accessible
representation
that to
confirms
aiscollectionbe
withtext
aaofof such
defined
projectsasset
geographical
string
the
aof Compute
address,
person
identity
that enables
or
usually
and (nova),
representation:
ofservice
ofusers
the
useraccess
aidentity
user.
URL, Object
that services
rightsFor
uses
to
through Storage
OpenStack
an
example,
OpenStack
define
and enterprise
which (swift),
usertoand or
APIs
privileges cloud
may
administrative
Authentication
OpenStackClient
Project
Groupservicean a
A the
command-line
abstraction
are a collection process
used
of users byconfirming
interface
other
owned for
theOpenStack
OpenStack
bymore
a domain. ofservices
a user
to group
Image
services.
name
and
have
you resources.
can
West
and
boundaries
perform access (glance),
apassword
regionamanaging
specific
for that
service.
and
setEast provides
region.
of operations.
Identity one or
entities endpoints through which users
isolate resources.
can access resources and perform operations.
19
Identity Service – Keystone Backends
Keystone
• SQL
• Keystone includes the option to store your user(Users and Groups) in
SQL, (MySQL, PostgreSQL, and DB2).
• The settings for the database must be specified in Keystone’s
configuration file([Link]).
• LDAP
• Keystone also has the option to retrieve and store your user (Users
and Groups) in (LDAP).
• Keystone will access the LDAP just like any other application that uses
the LDAP (System Login, Email, Web Application, etc.).
20
Identity Service – Keystone Backends
Keystone
• Multiple-Backends
• Keystone supports multiple Identity backends.
• The default domain is usually an SQL backend
• Additional LDAP backends may be hosted in their own domain
21
Identity Service – Keystone Backends
Keystone
22
HORIZON
23
Horizon – Dashboard
Glance
• It provides a modular web-based user interface for all the OpenStack
services.
• With this web GUI, you can perform most operations on your cloud like
launching an instance, assigning IP addresses and setting access
controls.
24
Horizon – Dashboard
• Horizon is the canonical implementation of OpenStack’s
Glance
Dashboard, which provides a web based user interface
to OpenStack services including Nova, Swift, Keystone,
etc.
• Horizon acts as a self-service portal to provision cloud
resources.
• It has Project Tab, Admin Tab and Identity Tab.
• In Project Tab, it has API Access, Compute, Volume and
Object
25
Horizon – Dashboard
• The Admin tab, you can access Overview
Glance
• Compute
• Volume
• Network and
• System
26
Horizon – Dashboard
Glance
• Identity tab is the Keystone Component
• The Identity tab has Domains, Projects, Users,
Groups and Roles (discussed in detail “Keystone”).
27
GLANCE
28
Glance
Glance
• Openstack glance is a repository for virtual images.
• A virtual machine image ("image") is a single file that contains a virtual
disk with a bootable operating system.
• Public Cloud
• Cloud service provider delivers and manages base images
• Private Cloud
• Custom images are must for efficient operations.
29
Glance
Glance
• Glance image manages, which are used to
• Provision VMs, Bare metal, Docker containers
• VM images contains utilities and tools used for secure provisioning such
as Cloudinit, Cloudgrowrootfs
• Glance images are stored as template, which is used for launching new
instances.
• Each instance runs from a copy of the base image fetched from Glance
by Nova compute.
30
Glance
Glance
• Glance image services include
• discovering,
• registering and
• retrieving virtual machine images.
• Glance images are stored as template, which is used for launching new
instances.
31
Components
Glance
•
32
Components
Glance
• Glance-api- Accepts API calls for image discovery ,retrieval and storage.
• Glance-registry-stores, processes, and retrieves metadata information
for images, metadata includes size, type and so on.
• Database - stores image metadata and supports many backends,
including Mysql, SQlite and monogodb.
• Storage repository - integrates with various outside openstack
components such as regular file systems ,S3 and RADOS block device
(RBD) HTTP for image storages.
33
Glance Image Flow
Glance
34
Image Flow- States
Glance
35
Disk Formats
• The disk format of a virtual machine image
Glance
Disk Description
Format
Raw Unstructured disk image format
Vhd A common disk format used by virtual machine monitors from VMWare,
Xen, Microsoft, VirtualBox and others
VMDK Vmware disk format supported by many common virtual machine monitors
VDI A disk format supported by VirtualBox virtual machine monitor and
QEMU Emulator
ISO An archive format for the data contents of an optical disc
36
Glance Disk Formats
Glance
Disk Description
Format
Qcow2 A disk format supported by the QEMU emulator that can expand
dynamically and supports Copy on Write
Aki This indicates what is stored in Glance is an Amazon kernel image
Ari This indicates what is stored in Glance is an Amazon ramdisk image
Ami This indicates what is stored in Glance is an Amazon machine image
OVF Open Virtualization format
37
Image Properties
Glance
• Adding an image to Glance, some common image properties that may
prove useful to consumers of your image.
• The common image properties are also described in a JSON schema,
• Image Properties
• Architecture
• kernel_id
• os_distro
• instance_uuid
• ramdisk_id
• os_version
38
Image Conversion
Glance
• qemu-img convert -O vpc xxx.qcow2 [Link] -p
• xxx.qcow2 is input file in QCOW2 format
• [Link] is output file in VHD format
• -O output format
• -p display progress bar
39
NOVA
40
Nova
Nova
• Nova is the Computing Fabric controller for the OpenStack Cloud.
• It manages the life cycle of instances within the OpenStack cloud.
• It ensures to manages the computing resources, networking, authorizati
on and scalability.
• Nova does not provide any virtualization capabilities by itself; instead, it
uses libvirt API to interact with hypervisors.
41
Nova
Nova
Depends on
42
Nova
Nova
• Nova is divided into two
• Controller &
• Compute
• Controller
• The controller node runs the Identity service, Image service,
management portions of Compute, management portion of
Networking and the Dashboard.
• Compute
• The compute node runs the hypervisor portion of Compute that
operates instances. By default, Compute uses the kernel-based VM
(KVM) hypervisor.
43
Nova Capabilities
Nova
• Nova provides a restful APIs to manage servers also known as instances.
• Resizing: Change the ram size, VCPU count and disk.
• Rebuild: Replace data on the instance’s harddisk with data from
another image
• Suspend: Save the state of the instance
• Resume: A suspended instance back to it’s ACTIVE state
• Stop: Gracefully power off after shutting down the OS
• Start: Power on a stopped instance
• Evacuate: Move the instance from a failed compute node to another
node.
44
Nova Capabilities
Nova
• Migration : Move instance from a compute node to another
• Live Migrate : send the ram contents of an active instance to
target node
• Cold Migrate: Shuts down the instance and copies over its files
and restart on the target node
• Soft Reboot: Perform graceful reboot after shutting down the OS
• Hard Reboot: Power cycle the instance without attempting to first
shutdown guest OS
• Nova can attach & detach volumes on running instances
• It can associate fixed and floating IP address to a running instance
• It provides remote access console & snapshots
45
Nova Capabilities
Nova
• Flavor is used to specify how much vCPUs, RAM and Disk space are
allocated to an instance when it is created by Nova.
• Keypair are used to securely login to an instance
• A keypair consists of a public and private key
• Public Key: Encrypt data
• Private Key: Corresponding private key can decrypt the data
46
Nova Components
Nova
47
Nova Components
Nova
Nova-API Nova-database Nova-Queue
Nova database The messaging
Manages API
stores current that passes
HTTP and is used
state of all objects messages
to interact with
in the compute between Nova
NOVA
cluster components
Nova-Scheduler Nova-Compute Nova-Conductor
It’s determines on It’s a service that
which host the It’s creates and conducts a
instance should terminates VMs no-db-compute
run on function
48
Nova
Nova
• Nova architecture allows the components to communicate through a
message queue
• Nova is built on a messaging based architecture
• All of the major nova component can run on multiple servers
• In order to avoid blocking, each components waits for its response in the
queue
• A callback gets triggered when a response is received
• Nova together with its components share a centralized SQL-based
database
49
Nova Message Queue
Nova
50
Nova-Scheduler
Nova
• It compiles a list of hosts that successfully pass the filters and
simultaneously filters out the hosts that don’t follow the required
capabilities
• The passed hosts then can run the virtual machines instances
• After nova scheduler filtering is done ,the scheduler uses weights
mechanism to determine which host is most suitable to execute the
request and run the virtual machine instance
• Scheduler calculates host’s weight by monitoring resource consumptions of
the host
• Host with more resources is selected for running the VM instances
51
Nova-Compute
Nova
• Nova Compute is worker daemon, which primarily creates and terminates
VMs via Hypervisor API.
52
Use of Nova Conductor
Nova
• Nova compute does not have direct contact with DB, It is not able to fetch
the details of VM which is to be created.
• Nova Conductor’s work is to fetch and pass the details of VM to compute.
• Nova Conductor service is key to completing the no DB access to
Nova-Compute .
53
Nova Packet Flow
Nova
• VM creation process in OpenStack Nova
54
Ports Assigned
Openstack
e
Service Port
Nova-api 8773(For EC2 API)
8774 (for openstack API)
Nova-novncproxy 6080 5800/5900 (VNC)
Glance 9191 (glance registry)
9292 (glance api)
Keystone 5000 (public port)
55
OpenStack – Communication Types
Nova
56
Further Knowledge
Openstack
e
• The OpenStack Foundation [Link]
• Official OpenStack Documentation [Link]
• The OpenStack Cloud Computing Cookbook (Second Edition)
[Link]
/dp/1782167587/ref=sr_1_1?s=books&ie=UTF8&qid=1382033707&sr=1-1
57
Your Endeavour
Openstack
e
• Meghdoot (BOSS OS Bundled with Opensatck ) [Link]
d=cloud_ci_cloud_computing
• TryStack (OpenStack Sandbox) [Link]
• Devstack (Opensatck Development Stack) [Link]
/DevStack
58
References
Openstack
e
• [Link]
• [Link]
• [Link]
59
THANK YOU
60