CCIS Chapter 6 Openstack new (1)
CCIS Chapter 6 Openstack new (1)
OpenStack Overview
OpenStack Overview
OpenStack Modules
Heat
Ceilometer Trove Mistral Sahara Ironic Zaqar
• Shared file • DNS • Search • Key manager • Container • Root Cause • Rule-based
system orchestration Analysis alarm actions
OpenStack Architecture
• OpenStack follows a modular structure
• Different projects have distinct roles and responsibilities
• Projects are further classified into sub-projects
• Different projects communicate with each other
OpenStack Architecture
Horizon
(Dashboard)
Horizon (Dashboard)
• Provides the web interface for OpenStack services
• Makes connection with all OpenStack services to call relevant APIs
• Implemented in django framework (python)
• Manageable, extensible and flexible architecture
Horizon (Dashboard)
User Info
Branding
Dashboard
Panel Group
Panel
Sidebar
Horizon (Dashboard)
Entire Stack
Chapter # 6 Sheheryar Malik, Ph.D. 20
Cloud Computing: Infrastructure & Servi
Nova
(Compute)
Nova (Compute)
Nova (Compute)
• nova-api
o accepts and responds to end user compute API calls
o Supports OpenStack Compute API, Amazon's EC2 API and a special Admin API
(for privileged users to perform administrative actions)
o Initiates most of the orchestration activities (such as running an instance)
o Enforces some policy (mostly quota checks)
o Authentication is handled through middleware before getting to this daemon
Nova (Compute)
• nova-scheduler
o It is conceptually the simplest piece of code in OpenStack Nova
o Take a virtual machine instance request from the queue and determines
where it should run (specifically, which compute server host it should run on)
o Filtering & Weighing
o Communicates with Compute Manager of compute node via RPC calls
Nova (Compute)
• nova-compute
o Primarily a worker daemon that creates and terminates virtual machine
instances via hypervisor's APIs
o Consists of Hypervisor (Support for multiple hypervisors)
• nova-conductor
o Handles database operations for compute node
o RPC Server with client at the compute node
Nova (Compute)
Nova (Compute)
Neutron
(Networking)
Neutron (Networking)
• Neutron is responsible for providing networks for different VMs in
OpenStack system
• Neutron is a pluggable, scalable and API-driven system for managing
networks and IP addresses
• Provides API to make complex networking topologies
• Open to having plugins from different vendors
Neutron (Networking)
• Neutron relies on Keystone for authentication and authorization of all
API requests
• Nova interacts with Neutron through API calls
o As part of creating an instance, nova-compute communicates with the
Neutron API to plug each virtual NIC on the instance into a particular Neutron
network through the use of Open vSwitch
Neutron (Networking)
Neutron (Networking)
Neutron
Server
Neutron Neutron
Agent Queue Plugin
Network
Provider Database
Neutron (Networking)
Keystone
(Identity)
Keystone (Identity)
• Keystone is the identity service used by OpenStack for authentication
and high-level authorization
• It supports token-based and user-service authorization
• Keystone is organized as a group of internal services exposed on one
or many endpoints
o Many of these services are used in a combined fashion by the frontend
Keystone (Identity)
• Provides 4 primary services
o Identity
User information authentication
o Token
After logged in, replace account-password
o Service catalog
Provides an endpoint registry used for endpoint discovery
o Policies
provides a rule-based authorization engine and the associated rule management
interface
Keystone (Identity)
• User
o has account credentials and is associated with one or more tenants
• Tenant
o unit of ownership in OpenStack, contains one or more users
• Role
o a first-class piece of metadata associated with many user-tenant pairs
• Rule
o describes a set of requirements for performing an action
Keystone (Identity)
Keystone (Identity)
Glance
(Imaging)
Glance (Imaging)
• Image as a Service: a concept for having on demand VM image having
following features as well:
o Catalogue of all available images
o Have real images stored in attached devices
o Have generic APIs so that any service can query them in simple language
o Support, store and provide any kind of image abstracting the storage and
other internal details
o Highly available for other components
• Glance supported image formats: Raw, qcow2, vhd, vmdk, iso, vdi, aki,
ari, ami
Glance (Imaging)
• It provides discovery, registration and delivery services for disk and
server images
o A storage repository for the actual image files
o Glance supports normal file systems, RADOS block devices, Amazon S3, HTTP
and Swift
o glance-api
It accepts Image API calls for image discovery, image retrieval and image storage
o glance-registry
It stores, processes and retrieves metadata about images (size, type, etc.)
o glance database
A database to store the image metadata
Glance (Imaging)
• Architecture
o Glance API gets request from external components
o It will request the information from Glance Registry
o Glance Registry will have information cached and it will provide metadata
o If the information is not cached it will fetch it from Glance DB
o Glance Registry gives the data back to the Glance API (using REST API)
o The data store can be a anything to a Swift to a HTTP, reachable via Internet
o Once Glance API has the information on the image it can serve the other
components
Glance (Imaging)
• Architecture
Cinder
(Volume)
Cinder (Volume)
• Cinder is an OpenStack module to provide “block storage as a service”
• The block storage system manages the creation, attaching and
detaching of the block devices to servers
• Block storage volumes are fully integrated into OpenStack Compute
and the Dashboard
• Block storage is appropriate for performance sensitive scenarios such
as database storage, expandable file systems, or providing a server
with access to raw block level storage
Cinder (Volume)
• Component based architecture
o Quickly add new behaviors
• Highly available
o Scale to very serious workloads
• Fault-Tolerant
o Isolated processes avoid cascading failures
• Recoverable
o Failures are easy to diagnose, debug, and rectify
• Cinder strives to provide API-compatible with popular systems like
Amazon EC2
Cinder (Volume)
• Cinder manages persistent storage
o Data volumes that are attached to VM instances
o Boot from volume
o They can be detached from one instance and reattached to another, and the
data remains intact
o The storage resource outlives any other resource and is always available,
regardless of the state of a running instance
• For desktop user PCs internal disk drives are ephemeral
o persistent storage can be considered similar to an external USB drive
Cinder (Volume)
• Architecture
o Cinder API: CRUD Operations
o Cinder Volume: Actual Back-end
o Cinder Scheduler: picks the optimal storage node to create the volume on
Cinder (Volume)
• Flow for attach a volume to instance
o Volume driver returns connection information, which is passed to Nova
o Nova creates the connection to the storage using the returned information
o Nova passes the volume device/file to the hypervisor
Swift
(Object Storage)
Heat
(Orchestration)
Heat (Orchestration)
• Heat manages entire lifecycle of the application
• Launch multiple composite cloud applications based on templates
• Template based orchestration (text files treated as a form of code)
• Provide Autoscaling service which is integrated with OpenStack
Ceilometer
Heat (Orchestration)
• Allows you to spin up multiple instances, logical networks, and other
cloud services in an automated fashion
• Some important terms:
o Stack – Collection of objects or resources
o Template – Defines a stack
o Parameters – Detailed information like network or image ID etc..
o Resources – Objects created or deleted during stack operations
o Output – information passed to the user from heat-engine
o HOT – Heat Orchestration Template
o CFN – AWS CloudFormation
Heat (Orchestration)
• Architecture of OpenStack Heat
o python-heat-client
The heat tool is a CLI which communicates with the heat-api to
execute AWS cloudFormation APIs
o heat-api
The heat-api component provides an OpenStack-native ReST API
that processes API requests by sending them to the heat-engine
over RPC
o heat-api-cfn
The heat-api-cfn component provides an AWS-style Query API
that is compatible with AWS CloudFormation
o heat-engine
The heat engine does the main work of orchestrating the launch
of templates and providing events back to the API consumer
Heat – Workflow
• Collect interesting info from OpenStack components create meters
(or samples)
• Transform meters into other meters if needed
• Publish meters to any destination (including Ceilometer itself)
• Store received meters into data store
• Read data via Ceilometer REST API
Instance Volume
Spins up
Reports Load
Heat Engine
Instance
Push stats
Reports Load
Heat Engine
Scales out
Stack
Instance
Instance
Instance
Instance
Ceilometer
(Telemetry)
Ceilometer (Telemetry)
• Provides a framework for metering and monitoring in Openstack
cloud
• Meters and Monitors all resources
• Generates Alarms to create more resources
Ceilometer (Telemetry)
• Metering
o Measure and record what's happening
o Ceilometer meters whether you ask it to or not
o You can query it later when you realize you need it
• Monitoring
o Notify ("alarm") when one of the meters reaches a threshold
• Alarm
o An alarm is a monitor of a statistic that will trigger when a threshold condition
is breached
Threshold Alarms
Combinational Alarms
Injects User
Metadata Create Alarms
API Service
Heat Engine
Trigger
s
Alarms
Alarm Evaluator Ceilometer
Instance
Monitor
Instances
Compute Agent
Injects User
Metadata Create Alarms
API Service
Heat Engine
Scales Out
Stack
Alarm Evaluator Ceilometer
Instance
Instance
Instance
Instance
Instance
Compute Agent
Provides
Alarm Rules
API Service
Heat Engine
Queries
Stats
Meter store
Ceilometer
Alarm evaluator
Instance Reports
Samples
Compute Agent
Become a Contributor
• Propose blueprints & help implement them
o https://wiki.openstack.org/wiki/Blueprints
o https://blueprints.launchpad.net/openstack
• Report bugs
o http://launchpad.net/openstack
• Help users
o http://ask.openstack.org
• Documentation / manuals
o http://docs.openstack.org